Warning: setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead in /websites/users/pyth/public_html/pythwww/common/footer.php on line 5

Pythagoras interactief

de driehoek van Sierpinski

In this Java applet, we used the Random Iteration Algorithm or Chaos Game to compute the Sierpinski-Triangle.
Its rules are very simple. First, you need 3 fixpoints (like the default ones we're using in our applet) and a randomly placed starting point within the square.
Assign to every fixpoint a number. Now you need to get a random number that is either 1, 2 or 3, (for us, the random number generator is doing this.) Measure the distance between your starting point and the designated fixpoint and draw a new point right in the middle between these points. This is your new point, now you need to get a new random number, measure the distance between the new point and the fixpoint, and so on.
The order in which the points are appearing is absolutely chaotic, but the end result is always the same (by setting the iterations to 100 and computing a couple times you can see that it's never the same 100 points).
By setting the starting point yourself, you can see that the starting point won't affect the result.Experimenting with the fixpoints is fun, too.
SierpinskiApplet User's Guide
To start computation press the "start" button next to the canvas.
Pressing the "stop" button will stop computation, pressing the "start" button againwill erase the fractal and recompute it.
If you check "chose starting point yourself", click (after stopping a possible computation and hitting the "clear" button) somewhere into the canvas. This spot will serve as thestarting point for the next computation.
Checking "chose fixpoints yourself" lets you chose the fixpoints by clicking into the canvas while holding down the CTRL-Key.
Fixpoints are plotted in blue, starting points in red.
Pressing "clear" will stop the current computation, clear the canvas, clear the fix- and startingpoints and reset the fixpoints to default.
Checking "slow computation" makes the applet execute a sleep statement at each iteration. In this mode, it is a bit easier to follow the way the pixels appear.
"Iteration colors" assigns colors to the iteration numbers. With this option and a low iteration number the order in which the points were computed is roughly visible, with a high iteration number, the triangle just keeps changeing colors during computation (what is also nice to watch).
To change the number of iterations, simply delete the default number in the textfield and type your own.
Hitting the "reset" button will reset all settings to default.
Every change of the settings while computation is running will only have effect on a newly started computation.
Auteurs: Susi Reffert and Monika Meyer. E-mail us at sreffert@ccc.cscs.ch.
Laatst bijgewerkt op: Friday 16 May 2003, 15:39

naar boven  home  e-mail de webmaster