Saturday, 6 October 2012

OpenGL - Sierpinski Gaskets

As part of our learning of OpenGL we had to create several different iterations of the Sierpinski Gasket which is a fractal. The pattern itself it created when you divide a triangle down into smaller versions of itself.
Original Triangle followed by 1 subdivision
As we can see here each individual triangle create can then be subdivided again and the same process can be applied to each of the triangles created from that process.

The first Gasket I produced was one using individual pixels and randomly assigning points to render.
500000 Pixel based gasket
The second one used triangles instead to render.
5 Subdivisions
The final gasket on the other hand proved a little more difficult. For a long time we got problem after problem.

Strange...
Finally though! I cracked the problem, and here you can see the actual gasket fully rendered and spinning about!

No comments:

Post a Comment