It's only fair. I won't feel right claiming that every inch of this was my work. Which won't be a problem. We only lose marks (or rather don't get any marks for the bit) when the code we use wasn't ours.
Anyway, I've come up with another slight problem.
Here's the basic algorithm of what I'm doing:
pushMatrix();vec3 sum;vec3 templist[];loop sum the poly point into 'sum'; store the poly point in templist;end loopsum /= num_poly_points; // to get the center of the polyloop templist -= sum; // to translate the poly to the originend loopglTranslate(sum.x, sum.y, sum.z); // to try and place the poly back where it should beglRotate(rotation, 0.0f, 0.0f, 1.0f); // but rotated a bit.// draw around the origin (so the translation and rotation will do what we want)loop glVertex3fv(templist);end looppopMatrix();
That's basically what I'm doing and what I'm getting (not too surprising now that I think about it) is a single triangle that is centered at the origin and as I increase the depth of the gasket (increase the complexity) the triangle gets smaller (as the complexity increases, the triangles added to the final shape get smaller for each complexity level), and it stays only a single triangle.
Isn't this the way to do it? Make sure that you draw around the origin so the translation and rotation have the proper effect? Because it looks like all the triangles are getting translated to around the origin, and because I think that they should be the same size, we only see 1 triangle.