Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Sierpinski Triangle

Author
Message
RobertK
14
Years of Service
User Offline
Joined: 12th Feb 2010
Location:
Posted: 15th Feb 2010 03:02
I'm trying to make Sierpinski triangles. Anyone take a look at the code and see what I'm doing wrong? >_<

Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 15th Feb 2010 19:24 Edited at: 15th Feb 2010 19:25
I can't comment on the mathematical algorythm, but you never update the screen (dbSync is missing from the Dark GDK loop), and you have an infinite loop with the "while(sizeLength == 100)". If I run the code like this, the screen is black and the program is frozen. Try this and the triangles will show up:



Also, why do you need three identical functions? If I exchange the function calls to function 1 everywhere instead of 1-2-3, and comment out functions 2 and 3, it produces the same picture on the screen.

Login to post a reply

Server time is: 2024-11-20 03:35:39
Your offset time is: 2024-11-20 03:35:39