recursahedrons
my current favorite geometric shape in the entire world is the icosahedron. a twenty sided die. i made one 4' in diameter for garrett's birthday one year. that was fun. so anywho. i needed to write a test program for work. it needed to exercise the gpu. what better way than to draw some icosahedrons. lots of icosahedrons. but we'll get to that. the first step was to write the code to generate the vertices. heh. the zeroth step was to figure out where the vertices are. anywho. each vertex got its own color. white on top. black on the bottom. and hue all the way around. the next step was to list all the triangles. the vertices are all used by many triangles. so i didn't even consider not using an index buffer. first i used a triangle list. then two fans and a strip. then one strip. which i thought was a pretty clever trick. but wait, there's more. the point is to exercise the gpu. and one icosahedron really isn't gonna do it. i needed more. many more. what pattern what pattern. i considered an array, a spiral, an oscillating snake. and then it hit me. i'll arrange 12 icosahedrons in an icosahedron. i made the camera move around them. it was kinda pretty. but if 12 icosahedrons are pretty then 144 icosahedrons would be pretty squared. so i duplicated the 12 icosahedrons 12 times and offset them to be centered at the vertices of a super icosahedron. but why stop there? if 144 icosahedrons are pretty squared, then 1728 icosahedrons would be pretty cubed. so i duplicated the 144 icosahedrons 12 times and offset them to be centered at the vertices of a meta icosahedron. but why stop there? if 1728 icosahedrons are pretty cubed then 20,736 icosahedrons would be pretty to the fourth. so i duplicated the 1728 icosahedrons 12 times and offset them to be centered at the vertices of an uber icosahedron. at this point the gpu was pretty well loaded. so i stopped. there was no need to go for pretty to the fifth. all that geometry is still just one triangle strip. using the aforementioned clever trick in an super meta uber way. the point was to exercise the gpu with a minimum amount work by the cpu. i think i succeeded.