From 113334f65015710189b56ed0b1874655b2dbfa64 Mon Sep 17 00:00:00 2001 From: matteo78 Date: Sun, 15 Dec 2013 23:13:17 +0100 Subject: [PATCH] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 475f40f..7a9745f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# chaos-game +# Chaos game app A Javascript web app that allows you to test the "Chaos game" algorithm that consists in a few steps : @@ -10,6 +10,14 @@ A Javascript web app that allows you to test the "Chaos game" algorithm that con This game was created by Michael Barnsley and was described in his book _Fractals everywhere_ in 1993. When using a triangle and a factor 1/2, you get the Sierpinski's triangle. Other fractal forms can also be plotted using other settings. Most common settings are present in the "Presets" section in the app. +## Technical details + +This experiment made me try several ways of drawing a lot of points on a canvas element. Actually, the coordinates of the points are calculated in a separate thread using Workers (js/lib/chaos.js), and then plotted using putDataImage. I wrote some [performance tests here](http://jsperf.com/filling-a-bunch-of-points-in-canvas) and the result is that this method is about 100x faster. + +Points of a regular polygon are calculated using a circle and a loop that iterates along it (angle per angle). Using trigonometric functions, we can then retrieve the actual coordinates of these points (more in the js/lib/script.js file). + +## Links + [More on Michael Barnsley](http://en.wikipedia.org/wiki/Michael_Barnsley) [More on Chaos game](http://en.wikipedia.org/wiki/Chaos_game) [See the app](http://matteo78.github.io/chaos-game) \ No newline at end of file