Home
Lichenyote [entries|archive|friends|userinfo]
Sowelu

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Fractalicious [Jun. 16th, 2008|03:38 pm]
[Tags|]

I dunno how many fractal or graphics geeks read my journal, but I'm looking for some specific ideas that maybe someone could help me out with (or be fascinated by the very concept of).

Fractals. The Mandelbrot set is 2-dimensional. (Wikipedia will tell you about Hausdorff–Besicovitch dimensions and I don't care about them. When you look at it, it has an X and a Y axis but no Z axis, and that's what I'm referring to here.) I want to find a 3-dimensional one. I could rotate Mandelbrot around its X-axis and get something pretty, but I was hoping for something with tubes that snake around--not vast arcing swaths cut out of space. And I can't just easily port Mandelbrot to three dimensions unless someone makes some really fascinating changes to math sometime very soon, because it's an iterative algorithm that puts the X and Y coordinates in the real and complex part of a number. There's nowhere for Z to go, and it would REALLY not look good if Z replaced the power of 2 in that equation. I think.

So, I need a nice 3-dimensional, or at least natively 3-variable fractal.

Even more demanding: It'd be nice to have an escape-time fractal instead of an iterating fractal. Yes, yes, Sierpinski is very nice, but iterating fractals really don't work for the specific application I have in mind. Specifically I want an escape-time fractal because you can calculate the value of any point to arbitrary depth in a vacuum. You don't need to calculate the rest of the fractal to do it, like you do for Sierpinski. Mandelbrot is an escape-time one, and it's pretty nice.

I'm -considering- doing this with Julia sets... except that Julia is FOUR-dimensional. Each Julia set is a 2D picture, and you define a Julia set out of two more variables. I could always set one dimension constant, or I could try doing something really bizarre with time travel, I guess. Holding one variable constant is an effective, if unbeautiful, solution. At least it allows for multiple maps to explore.


... Voxels. A voxel is a volume-pixel, for the uninitiated. An MRI is a collection of many slices of pictures of your brain, so each picture has X and Y, and the location of that picture in the stack of pictures is Z. Voxels are a different way to do 3d rendering...you just divide space into a bunch of cubes, instead of using polygons. You shoot a ray of light into the scene, and look at which cube(s) it hits, in order to determine the color of the pixel to draw on the screen. Very very good for simplistic, non-reflective raytracing.

Are these two things coming together yet? I want to render a fractal in voxels. I want to render it in variable depth, so when you get close to a wall, it scrapes more detail out of it--but far away, it doesn't bother to calculate things yet. I know this part is very do-able. Maybe even 'easy'.

The hard part is making it interesting to LOOK at! See, the problem with escape-time fractals is that they define a monochrome set--either a pixel/voxel 'escapes' after a bunch of iterations, or it doesn't. That means all the walls are just one color. In order to make it interesting, I want to do something with the SLOPE of the volume, and have reflections. I might be able to puzzle out my own way to calculate the slope of a surface at a given voxel, but I'd really like it if anyone reading this has any experience with that (or knows someone who does / can point me at a paper on the subject).

Besides that, pixels are colored based on how far away from the camera they are, like it was in a foggy place. It'll take work to make this good.

Yeah this is a pet project I thought a lot about over the weekend. My last 3d fractal renderer (it's OLD) just made a height-map out of Mandelbrot with some interpolation, and rendered it with polygons...that was a disaster for a LOT of reasons. Time for a different approach. And for those of you who are boggling at all this, um...sorry?
link7 comments|post comment

navigation
[ viewing | most recent entries ]