This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

dan11
dan11 presents ...

2014/6/26

Sierpinski Triangle/Chaos Game

Press run to begin simulation. Drag the red nodes with the mouse while paused or in the middle of a simulation if you wish to make multiple triangles or 3D shapes. Feel free to change the speed! (Space bar will make it faster also if you are already at the max speed).

Hold the space bar at the beginning for a very bold triangle.

One cool thing to do is pause it after making a triangle and drag nodes into certain spots to make 3D pyramid.

This simulation simply adds a dot halfway between the last dot's position and one of the nodes. When done thousands of times, a pattern appears that can be recognized as a fractal: the Sierpinski Triangle.

It will probably have lag after a running for a while. Hold space to speed up the process; this will make more dots placed per act cycle, however there will be slightly more lag)

1593 views / 17 in the last 7 days

2 votes | 0 in the last 7 days

Tags: mouse game simulation triangle fractal chaos sierpinski

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Thu Jun 26 00:27:43 UTC 2014
A new version of this scenario was uploaded on Thu Jun 26 00:28:48 UTC 2014
A new version of this scenario was uploaded on Thu Jun 26 00:40:39 UTC 2014
lordhersheylordhershey

2014/6/26

Seeing the source on this would be cool :D
MatheMagicianMatheMagician

2014/6/26

I like it!
A new version of this scenario was uploaded on Fri Jun 27 01:19:46 UTC 2014 -Triangle edges look much cleaner -Improved dot placing code -Hold space to darken the triangles and speed up the process
A new version of this scenario was uploaded on Fri Jun 27 01:25:06 UTC 2014 -Triangle edges look much cleaner -Improved dot placing code -Hold space to darken the triangles and speed up the process -Code released
A new version of this scenario was uploaded on Fri Jun 27 01:28:03 UTC 2014 -Triangle edges look much cleaner -Improved dot placing code -Hold space to darken the triangles and speed up the process -Code released

Want to leave a comment? You must first log in.

Who likes this?

MatheMagician lordhershey