Allegro.cc
Projects
Action252
Adventure22
Arcade216
Board Games30
Demos24
Emulators10
Other68
Puzzle139
Role Playing40
Sports25
Strategy58
Utilities46
Resource Directory
Code Gallery3
Compilers12
Help & Documents13
Libraries63
Media2
Tools8
Depot Games: Serpinsky's Triangle

Current Version: 1.0

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

Name Comments Size Date
Serpinsky.zip Windows Binary & Source Code 9,271 05/28/2007 4:53 PM
Screenshots
Serpinsky's Triangle
Serpinsky's Triangle
Public Opinion
The Developer
Ender Wiggin
Ender Wiggin (View Profile)