This blog post is a follow-up for two previous blog posts: "I was programming fractals a bit" and "More fractal wallpapers related to the Sierpinski Triangle". First it came to my mind that I could transform the coordinates of the next iteration point by taking the distance between 0 and 1, then executing "y=Math.sqrt(x*(2-x))" or "y=1-Math.sqrt(1-x*x)" on the distance, and then getting the transformed point based on the new distance. However, this idea did not provide nice pictures, unless I made a mistake in the algorithm:
1. Fractal-like picture by mistake:
2. Fractal-like picture by mistake:
After I've figured the mistake out, I realized that I can make nicer fractals if I get a weighted arithmetic mean between x and y as described above (because my original transformation was too much). So here are some nicer pictures:
3. (Math.sqrt(num*(2-num)) + 4*num) / 5:
4. ((1 - Math.sqrt(1-num*num)) + num) / 2:
5. The same as above, but added triangles in the centers:
So these are the ideas I had for triangles, not as nice as expected. Another idea has come to my mind that I could also do the same with regular heptagons and the colors of the rainbow instead of just red, green and blue in the corners. I did not feel like to spend the time computing every ratios exactly, so the following pictures are the result of experimentation with shrinking values:
1. Regular heptagon fractal wallpaper on black background:
2. Regular heptagon fractal wallpaper on white background:
I think that's all for today... but I also have other ideas for programming math pictures, not only fractals... I may implement them if I have free time for it, and feel like to do it.







No comments:
Post a Comment