Terrain Generation Progress: Fractal Explorer Phase 1.5ish
by Demolishun · 10/02/2012 (10:45 pm) · 2 comments
I admit it. I am having way too much fun with these fractals. I am also learning a lot about translating algorithms from math (maths for you English folks) expressions to code. I have finally gotten some consistency on output between my Python version and my OpenCL version of the algorithm. It is really getting interesting as to the type of fractal projections I can create as well.
First the obligatory awesome photo:

This image looked better in color, but I forgot my output right now shifts to grey scale. That is another option for another day. Anyway, this was a tweak to "see what would happen" if I combined the raw values of the real and imaginary parts of the image into the output value. Well it certainly illustrates the branching self similar nature of the fractal. It also accentuates the other patterns. So you see these plant like growths along with what looks like a spinal column. It looks like stuff out of the movie Alien. Cool, wild, fun stuff!
The math behind this is getting nailed down and I am starting to add the adjustment features to the application. I have some work to do on zooming, palette selection (more than just grey scale output), dynamic maxit and color depth settings, alternate equations, and more. I have speed covered at this point. The above image would have taken way too long as I set the maxit to a number like 512 or something ridiculous. It calculates the 1024x1024 and 512 maxit in like 0.1 second. I have set the maxit to like 2048 and it bogs down to like 0.4 seconds. So the math calculations are not limiting the output. It is freaking fast as long as you have an OpenCL computing device. So a decent ATI card, NVidia card, or a CPU that is supported by the AMD driver (most any modern CPU with x86 instruction set).
I think spending the time to get this tool working well is going to be very rewarding. It has caused me to learn a ton of concepts that I was really rusty on. Nothing like leveraging the mother of invention. Another thing is happening which I did not expect. My family is taking a greater interest in the direction of the project as a whole. They are finding pictures of zoomed in broccoli that show a definite fractal pattern when zoomed in. I am also starting to notice simple patterns in every day items. It really opens one's eyes to the possibilities and the equations that might help to describe anything from toothpaste to galaxy formation. Absolutely amazing!

First the obligatory awesome photo:

This image looked better in color, but I forgot my output right now shifts to grey scale. That is another option for another day. Anyway, this was a tweak to "see what would happen" if I combined the raw values of the real and imaginary parts of the image into the output value. Well it certainly illustrates the branching self similar nature of the fractal. It also accentuates the other patterns. So you see these plant like growths along with what looks like a spinal column. It looks like stuff out of the movie Alien. Cool, wild, fun stuff!
The math behind this is getting nailed down and I am starting to add the adjustment features to the application. I have some work to do on zooming, palette selection (more than just grey scale output), dynamic maxit and color depth settings, alternate equations, and more. I have speed covered at this point. The above image would have taken way too long as I set the maxit to a number like 512 or something ridiculous. It calculates the 1024x1024 and 512 maxit in like 0.1 second. I have set the maxit to like 2048 and it bogs down to like 0.4 seconds. So the math calculations are not limiting the output. It is freaking fast as long as you have an OpenCL computing device. So a decent ATI card, NVidia card, or a CPU that is supported by the AMD driver (most any modern CPU with x86 instruction set).
I think spending the time to get this tool working well is going to be very rewarding. It has caused me to learn a ton of concepts that I was really rusty on. Nothing like leveraging the mother of invention. Another thing is happening which I did not expect. My family is taking a greater interest in the direction of the project as a whole. They are finding pictures of zoomed in broccoli that show a definite fractal pattern when zoomed in. I am also starting to notice simple patterns in every day items. It really opens one's eyes to the possibilities and the equations that might help to describe anything from toothpaste to galaxy formation. Absolutely amazing!

About the author
I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67
#2
Patience my precious, patience...
Some things I have learned how to do:
Originally I was just hoping for some diversity and grabbing partial fractal bits here and there. Now with what I have learned I may be able to control the patterns and draw terrain features in a non-fixed way. I experimented with this when applying a linear function to the fractal. I stumbled on a upon something that looked like a bird shape. As I tweaked the linear data I was able to pull more and more of a pattern from the fractal projection that resembled a phoenix. This showed me that I can use geometric data in a straight line or in a 2D grid to calculate custom fractal data. I have no idea if anyone else has figured this out, but it is like a directed and controllable noise function. It will take some tweaking and some creativity to figure out a straight forward way to use this. The hard part will be designing data to produce desirable fractal patterns. Or it may be as easy as feeding it a bitmap. Not sure yet.
I added the Phoenix fractal to the blog.
10/03/2012 (4:29 am)
@Lukas,Patience my precious, patience...
Some things I have learned how to do:
- Fractals are just series of numbers within a set.
- Keeping the z portion of the input sets within one range and keeping the c portion of the sets fixed I can get the Julia set.
- Tailoring an equation to produce geometric shapes for the c portion of the sets I can actually design my fractals sets.
- Want fissures, tailor the fractal to create fissures and even choose the direction of the fissure. Want lightning, want flower patterns, want spirals, etc...
- Mapping the sets will give me some points in a database to index and pull specific fractal patterns out.
Originally I was just hoping for some diversity and grabbing partial fractal bits here and there. Now with what I have learned I may be able to control the patterns and draw terrain features in a non-fixed way. I experimented with this when applying a linear function to the fractal. I stumbled on a upon something that looked like a bird shape. As I tweaked the linear data I was able to pull more and more of a pattern from the fractal projection that resembled a phoenix. This showed me that I can use geometric data in a straight line or in a 2D grid to calculate custom fractal data. I have no idea if anyone else has figured this out, but it is like a directed and controllable noise function. It will take some tweaking and some creativity to figure out a straight forward way to use this. The hard part will be designing data to produce desirable fractal patterns. Or it may be as easy as feeding it a bitmap. Not sure yet.
I added the Phoenix fractal to the blog.

Torque Owner Lukas Joergensen
WinterLeaf Entertainment
Although I still find it hard to imagine how that fractal art will ever become a heightmap! Very excited about this anw!