Welcome to Fractal Forums

Fractal Software => Programming => Topic started by: floppyHat on July 28, 2016, 03:22:14 AM




Title: From 2d to 3d: how to generate surfaces from iteration counts?
Post by: floppyHat on July 28, 2016, 03:22:14 AM
I have been developing my 2d fractal program in Java for some months now, implementing many features including composing or alternating (based on a selectable condition) any of the 200+ functions I have discovered, plagiarised or invented, and making fractal movies by automating the variation of parameters (e.g. letting the value of c for the original z^2 + c Mandelbrot follow a path around parameter space so the Julia sets morph in time when the frames are assembled into a movie - using the great open-source program Fiji / ImageJ - https://fiji.sc/ (https://fiji.sc/) btw).

I have been getting a great deal of satisfaction by producing artistic images and trippy videos just by a combination of maths and programming.   Now, however, I'd like to start programming 3d fractals.  I'm not really interested in using other fractal programs to go 3d, as I really want to get down to the hardcore of it.

 I don't really have a serious problem  understanding the maths (I'm at home in the Complex plane and have ideas about generalising functions.   There's stuff on the web about this side of things seemingly too.)

However, what I don't understand is how you generate 3d surfaces from a 3d array of iteration counts, for example.   Once I have iterated a function for every point (x, y, z) in a cube, if things are as in 2d, I will have a number for each point.   In 2d, I map these numbers to colours using a variety of algorithms.   If I do this in 3d, how do I decide which points are connected to which in order to form a polygonal mesh to which I can apply lighting, transforms, textures, and render?   I can see that I could slice through the cube in an orthogonal plane, or even an arbitrary plane, but this would just give me 2d views.

Can some clever person please help me see what I missing here?


Title: Re: From 2d to 3d: how to generate surfaces from iteration counts?
Post by: valera_rozuvan on July 28, 2016, 05:26:04 AM
Take a look at:

1. simple point clouds (http://www.iquilezles.org/www/articles/pclouds/pclouds.htm)
2. 3D Graphic Java: Render fractal landscapes (http://www.javaworld.com/article/2076745/learn-java/3d-graphic-java--render-fractal-landscapes.html)
3. A local Mesh Method for Solving PDEs on Point Clouds (ftp://ftp.math.ucla.edu/pub/camreport/cam12-60.pdf)

Especially of interest is the visualization on page 17 of the paper [3].


Title: Re: From 2d to 3d: how to generate surfaces from iteration counts?
Post by: valera_rozuvan on July 28, 2016, 06:00:53 AM
Oh, and one more ABSOLUTELY MUST READ PAPER: "Ray Tracing Deterministic 3-D Fractals" [Hart, 1989]. http://graphics.cs.illinois.edu/node/58 (http://graphics.cs.illinois.edu/node/58) It is the first paper to introduce the ray tracing method as a means to render 3D fractals. Someone can correct me if I am wrong, but I think it's at the basis of most of today's 3D fractal programs.


Title: Re: From 2d to 3d: how to generate surfaces from iteration counts?
Post by: floppyHat on July 28, 2016, 06:34:14 PM
Many thanks for the links valera_rozuvan.   I shall have a good look at them as soon as I've sorted out the mess of a failed XenialXerus upgrade ;)