Tuesday, July 28, 2015

Playing with the Chaos Game: non-Euclidean Sierpinski attractor in spherical coordinates

In my former post about The Chaos Game I did a non-Euclidean Sierpinski attractor by using polar coordinates in the XY plane (2D). Now I have tried to make a new "flavor" by using spherical coordinates in the XYZ region (3D)

In this case, I have divided the sphere into 8 quarters, and the Sierpinski attractor is generated in the surface of a quarter of the sphere and the rules of the Chaos Game regarding how to manage the angles are exactly the same rules as for the polar coordinates version of my former post, but with one more dimension (in other words, one more angle to play with). Specifically the three attractor points are at A=(phi=0,theta=0,r) (east of the XY plane), B=(phi=3PI/2,theta=0,r) (south of the XY plane) and C=(phi=7PI/4,tetha=PI,r) (north of the XZ plane). This produces a non-Euclidean spherical Sierpinski attractor in this fashion:

 

The next step is just replicating the pattern symmetrically on the surfaces of the rest of quarters of the sphere, and this is the result! (it is an animated gif, it could take a little bit to load):




Two more views:



I am really very happy with the results! The spherical symmetry is beautiful. It is easy to do bad calculations when working with polar and spherical coordinates. If possible I will try to add more "flavors" of The Chaos Game. If somebody is interested in the Python code, please just let me know!

No comments:

Post a Comment