Allegro.cc
Projects
Resource Directory
|
Depot Games: Serpinsky's Triangle
Project Status: Completed Links: Web Site Category: Demos Developers: Ender Wiggin Ports: Windows Source Code: Available Author's Description: Serpinsky's Triangle is a very simple yet nice fractal (a shape with a certain pattern that repeats itself all the time). It makes a cool triangle, all colored except for some triagnles within it: first a triangle in the middle, upside-down, with the base as the middle line of the triangle and the top at the middle of the base in the original triangle. This un-colored triangle divides the originl triangle to three more triangles, and within each of them, there is yet another triangle parting them, too, to three triangles, and so on. The more intriguing thing about this triangle is how it is made by a program. There are 3 points around the screen (these will be the vertexes of the triangle). The program starts in the middle of the triangle, and each time it picks a different point, randomally. It then goes half way to that point, and where it stops - it puts a pixel. After many times this triangle is formed. This just proves that there is order in randomization, too. The settings can be changed from the ini file. The source is included, of course. I added two other codes that show how to make the triangle easier, without the ini support and all - only the plain code that does it. Enjoy! Downloads
|
Screenshots Serpinsky's Triangle Public Opinion
The Developer
Ender Wiggin
(View Profile) |