RosettaCodeData/Task/Chaos-game/00-TASK.txt
2023-07-01 13:44:08 -04:00

14 lines
738 B
Text

The [[wp:Chaos_game|Chaos Game]] is a method of generating the attractor of an iterated function system (IFS).
One of the best-known and simplest examples creates a fractal, using a polygon and an initial point selected at random.
;Task
Play the Chaos Game using the corners of an equilateral triangle as the reference points.   Add a starting point at random (preferably inside the triangle).   Then add the next point halfway between the starting point and one of the reference points.   This reference point is chosen at random.
After a sufficient number of iterations, the image of a Sierpinski Triangle should emerge.
;See also
* [http://www.geoastro.de/ChaosSpiel/ChaosEnglish.html The Game of Chaos]
<br><br>