Script here: http://jsbin.com/mikuzuge/1/edit
I just wondered how to make the algorithm more beautiful and effective.
And i found what a render in FF 31 and Opera 20 is different, as can be seen in the following screenshot:
http://i.imgur.com/m6V8Csp.png
Why?