Chaos game: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created Chaos game draft task)
 
m (added link)
Line 3: Line 3:
The [[wp:https://en.wikipedia.org/wiki/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.
The [[wp:https://en.wikipedia.org/wiki/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.


'''The task''': play the Chaos Game using the corners of an equilateral triangle as the reference points. Add a
'''The 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 the starting point and one of the reference points. This reference point is chosen at random.
starting point at random. Then add the next point halfway the starting point and one of the three corner points
of the triangle. This corner point is chosen at random.


After a sufficient number of iterations, the image of a Sierpinski Triangle should emerge.
After a sufficient number of iterations, the image of a Sierpinski Triangle should emerge.

See also<br>
* [http://www.geoastro.de/ChaosSpiel/ChaosEnglish.html The Game of Chaos]

Revision as of 13:28, 1 March 2016

Chaos game is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

The 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.

The 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 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