Title: mandelbox request Post by: gussetCrimp on February 24, 2010, 09:39:01 PM I have been really enjoying the Mandelbox renders and animations. A request from a mere observer: is it possible for anyone to put together a post with a couple of images that show the folding of the box, step by step? I have looked at the formulas but I can't figure out what's going on the way I can with the Mandelbulb. Like, could someone show how a single point is successively transformed, for one that escapes and one that doesn't?
Title: Re: mandelbox request Post by: bib on February 24, 2010, 09:50:23 PM Good idea. To me as well the "folding" is a mystery!
Title: Re: mandelbox request Post by: Timeroot on February 25, 2010, 01:14:18 AM I can try to explain it just with words... though I might fail...
Probably the easiest way to visualize is it through the 2D version. You can't really "fold" it in 3D without going through the fourth dimension, and that obviously makes things harder to visualize. In the 2D version, you have a plane which you then fold over. If you draw a square on a piece of graph paper, with each side two units long, you can extend the four edges and make four very long "strips" going out to infinity (or at least the edges of the paper). Now take each of these strips, and fold them over the edge of the square. They will collide with one another, but let's pretend that doesn't happen. Once you've folded all four, you've still got four strips going out to infinity, but some parts have been folded over onto the cube. And for the four quarter planes that fill up the rest of space, they get "folded" twice. You can't actually do it with paper without cutting them first, but what happens is that the paper gets flipped into the other quarter-plane, while it keeping its corner in the same place. In 3D, a similar thing happens, but just as the strips of paper temporarily fold "up" into the third dimension, in 3D the infinite rectangular prisms briefly fold into the fourth dimension. It still has the same effect though: they are reflected over the sides of the cube, so (3,0,0) becomes (-1,0,0) and (15,-4,0.5) becomes (-13,2,0.5). It's important to remember that 0.5 stays 0.5, because only spots outside the cube are folded. This is also why 0 stays 0. Hope that can help explain things for you! O0 O0 O0 O0 Title: Re: mandelbox request Post by: M Benesi on February 25, 2010, 03:26:50 AM I have been really enjoying the Mandelbox renders and animations. A request from a mere observer: is it possible for anyone to put together a post with a couple of images that show the folding of the box, step by step? I have looked at the formulas but I can't figure out what's going on the way I can with the Mandelbulb. Like, could someone show how a single point is successively transformed, for one that escapes and one that doesn't? Let's go through some iterations of (99,0,0) (gonna escape...): 1) x>1 so x=2-x (y and z values are 0, so neither less than -1 or greater than 1, nothing to do to them here) x=-97 2) length = sqrt( (-97)^2 +0^2 +0^2)= 97 3) check if length is < minRadius.... nope (minRadius=.5 97 is not less than .5) do nothing 4) since it is not less than <minRadius check to see if it is less than <fixedRadius .... nope (fixedRadius=1 97 is not less than 1) do nothing 5) multiply all 3 values by scale (x, y and z values) y and z are 0.... so stay 0. x=-97 scale = 2 so x= -97 * 2 = -194 6) add the initial values of the pixel to the new values: y and z are 0... added to 0... so remain 0. initial x was 99, new x is -194, so x= 99-194= -95 7) check bailout: x^2+y^2+z^2= (-95)^2 + 0 + 0 = 9025 so if yer <--- (spelled correctly) bailout was below 9025, yer pixel escaped <--spelled exactly like "escaped", how strange. Anyways, what happened here is what happens to any escaping pixel. Some of them need to be switched around more (lets say your bailout was 9026 and we did another couple iterations): 1) now x is <-1 so x= -2 - (-95) = 93 2) radius checks, z and y are all passed same as last iteration 3)multiply by scale x= 2 * 93 = 186 4) add in pixel value x= 186+ 99 = 285 5) do another bailout check 285^2 + 0 + 0 = 81255 So unless your bailout is insanely high, the pixel escapes <-- funny, it's still spelled like "escapes". It's weird how totally different words are spelled the same way. Here is a pixel that stays in the system (.584,.584,.584) definitely for a few iterations: 1st iteration Passes all tests, multiplied by scale, added to itself (1.752, 1.752, 1.752) passes bailout (magnitude is ~9.209) 2nd iteration all values greater than 1 so = 2- value x,y,z = -.248 length ~=.429 so less than min radius so multiply all values by 4 x,y,z = -.992 skip other length test, since it hit the first one (part of the formula) multiply by scale of 2 x,y,z = -1.984 add initial value x,y,z= -1.4 check bailout (5.88) passes 3rd iteration all values less than 1 so value = -2 -value x,y,z= -.6 length ~= 1.03.. is not < .5 (minRadius) so check if < 1 (fixedRadius) is not so do nothing multiply by scale of 2 x,y,z=-1.2 add in initial value x,y,z=-.616 bailout passes 4th iteration value = -2 - value xyz= -1.384 length > .5 && 1 so do nothing && means "and" in logic speak multiply by scale of 2 xyz = -2.768 add in initial value xyz = -2.184 bailout passes 5th iteration value = -2 - value xyz = .184 xyz is not <-1 or >1 so do nothing || means or... but no confusion needed length = .319 is less than min radius so * 4 xyz= .736 skip next check because we hit on the first multiply by scale xyz=1.472 add in initial value xyz=2.056 bailout passes 6th iteration.... I've got other stuff to do. I'll write a maxima script later, if I remember and don't get caught up in something else, that will give us pixel values after a number of iterations. Might be interesting.. I think it will be. I like patterns. Title: Re: mandelbox request Post by: Tglad on February 26, 2010, 02:33:02 AM Here's a video to demonstrate the folding on a 2d Mandelbox. The 4 stages are the replacement for Z^2 on the Mandelbrot.
The 3d version just expands this to 3d. By folding you can think reflecting, same result. http://vimeo.com/9745981 (http://vimeo.com/9745981) Title: Re: mandelbox request Post by: M Benesi on February 26, 2010, 04:38:22 AM Tglad, if you don't mind a bit of extra explaining:
How did you work out the visualization mathematically? I'm getting a picture of a pixel (or point) moving from one side of a cube to the other side, but this really doesn't explain why a pixel is included or not included in the set. If we go to the most basic set (one in which there are no spherical magnitude transforms), we end up with a bunch of little rounded cubes (higher number of cubes for a higher iteration). If a pixel escapes on the one side of the set, it will have corresponding escapees on the other sides. If a pixel stays in the set for a certain number of iterations, it has "partners" on the other sides that behave the same way. The system doesn't appear like a folding operation: it resembles a Sierpinski elimination operation, like the one that generates the Sierpinski icosahedron, triangle, or tetrahedron, but for the Julia at (0,0,0) I get a perfect cube (for the simplified formula) instead of a Sierpinski-like object. Do you have some links to mathematical explanations, or feel like throwing one out here? BTW, thanks for coming up with the awesome formula! Title: Re: mandelbox request Post by: Tglad on February 26, 2010, 05:23:26 AM I'm afraid I don't really understand your questions
"How did you work out the visualization mathematically? what do you mean? "I'm getting a picture of a pixel (or point) moving from one side of a cube to the other side, but this really doesn't explain why a pixel is included or not included in the set. As I said, the video shows the replacement for Z^2 in the Mandelbrot formula. If a point stays bounded it's in the set. "The system doesn't appear like a folding operation The video looks like folding to me ??? But as I said, you can equally think of it as reflection "Do you have some links to mathematical explanations Of what exactly? The code is here- http://www.fractalforums.com/3d-fractal-generation/amazing-fractal/msg12467/#msg12467 (http://www.fractalforums.com/3d-fractal-generation/amazing-fractal/msg12467/#msg12467) Title: Re: mandelbox request Post by: M Benesi on February 26, 2010, 08:39:15 AM I'm afraid I don't really understand your questions What equations did you use? If you simply inputted your Mandelbox formula, what software did you use that interpreted it in that manner?"How did you work out the visualization mathematically? what do you mean? Quote from: Tglad Quote from: M Benesi "I'm getting a picture of a pixel (or point) moving from one side of a cube to the other side, but this really doesn't explain why a pixel is included or not included in the set." As I said, the video shows the replacement for Z^2 in the Mandelbrot formula. If a point stays bounded it's in the set. Quote "The system doesn't appear like a folding operation" The video looks like folding. The Mandelbox formula ("the system") doesn't look like it carries out a folding operation, rather it appears to carry out a removal operation (like a Sierpinski type formula). The video looks like folding to me ??? But as I said, you can equally think of it as reflection Quote "Do you have some links to mathematical explanations I wondered about the math of folding objects. BTW- I took what we learned from your amazing Mandelbox approach (applied my formula type D) and applied it to a few Sierpinski objects I wrote up (an icosahedron and tetrahedron). Interesting.Of what exactly? The code is here- Title: Re: mandelbox request Post by: Tglad on February 26, 2010, 10:16:36 AM Thanks for explaining further.
Taking your questions together, I think I get how to answer them. The mandelbrot has a Z^2 operation. Most people think of this as an operation which doubles the angle of a 2d point and squares its radius. That the correct interpretation for how Z^2 transforms a single point. But to really visualise the Z^2 operation, you have to see how it transforms all possible points, how Z^2 transforms the entire complex plane. The best way is to draw a 2d grid then animate the grid to show how every point on the gridlines get distorted when they are squared. A rather boring 1 frame animation. The intermediate frames are just for our convenience to show _how_ the grid gets into its distorted shape. In the case of Z^2 the grid twists around 0,0 and reconnects with itself, and the radius of each point squares. OK, back to the 2d mandelbox. The video shows instead of Z squared, the process of Z mandelbox-folded. It shows how one single iteration of the mandelbox folding formula is applied to a grid. Quote what software did you use that interpreted it in that manner? It is a custom written animation using C code.Quote rather it appears to carry out a removal operation Well nothing gets removed at any point, or torn, or stretched on any Mandelbox Julia. 2d space is just folded repeatedly. Likewise for 3d space. Quote I wondered about the math of folding objects There might be some helpful explanations for you on the net somewhere, but the 'folding' is simple, you just reflect about different planes, or you do a disk or ball inversion (radius = k / radius for any k). Quote BTW- ... The pictures look really nice and I'd like to see the formula/pseudocode you use for them. Can I suggest that is done in a different thread so this thread doesn't go off-topic.Title: Re: mandelbox request Post by: M Benesi on February 26, 2010, 08:04:13 PM Thanks for your patience Tglad.
I was really wondering about the intermediary steps (I didn't see how the Mandelbox formula could calculate them, although the beginning and end steps are Mandel~'squarish?'). I didn't know it was a transform from one iteration to the next until I read your explanation. After that, I still don't think that the process is one of folding pixels, but rather of removal (although it can be represented as a fold with the correct transform applied to 2 different iterations, as you showed). It appears similar to a Sierpinski type process, in which a fractal is created by removal of certain portions. If this is the case, the 2d Mandelbox (should the 2d version have a name other than "box"?) would be a more complex relative of the Sierpinski Carpet (http://en.wikipedia.org/wiki/Sierpinski_carpet) or Cantor dust (http://en.wikipedia.org/wiki/Cantor_dust#Cantor_dust) and the 3d versions would be relatives of the Menger sponge (http://en.wikipedia.org/wiki/Menger_sponge) or 3d version of the Cantor dust fractal. Title: Re: mandelbox request Post by: gussetCrimp on February 26, 2010, 11:40:07 PM Tglad - thank you for that explanation, it is very helpful, esp. the 2D animation. It's kind of hard to visualise the 3D version but that's ok, I'm happy tp understand by analogy. I have a couple of remaining questions though.
Could you tell me what the values are for minRadius and fixedRadius in your animation, in terms of the big grid units? In this case it seems the first folding steps didn't affect the object you were transforming (the small grid), since it was all inside the folding edges. Right? On the next iteration, when you fold everything over again, all the dark markings (transformed from the minigrid) will now be inside the radius of one big-grid unit, right? (I.e. all we'd see after folding along both dimensions would be contained within a 2-by-2 square). In this case then it seems that everything will stay bounded for ever, am I right? So you know nothing will ever escape, but you still reiterate--after a certain number of iterations does the result settle down into a fixed cycle, or does it keep evolving? Most important question: your animation shows (beautifully) the result of one iteration when the input shape is a grid. What is the input shape in 3D that gives the Mandelbox?? If you were to do another one, it would be great to see one where the folding has an effect, and where some parts of the input shape escape, and to do more than one iteration. But that is very greedy of me to ask :-) Thanks again. Title: Re: mandelbox request Post by: gussetCrimp on February 26, 2010, 11:45:08 PM Oh I think I get it--there is no "input shape" for the Mandelbox, but instead the Mandelbox is the set of all points in the entire 3D space that have still not escaped after a certain number of iterations (tending towards infinity). Is this right?
But in that case, wouldn't there be a solid core to the Mandelbox--all the points that start off in your square of radius 1 (or that get folded into it) will never escape, so at the very least there's a 2x2 square in the middle of the plane that will be part of the final 2D mandelbox? Title: Re: mandelbox request Post by: Tglad on February 27, 2010, 12:02:58 AM Quote Could you tell me what the values are for minRadius and fixedRadius in your animation, in terms of the big grid units? The big grid lines are unit length, the minRadius is 0.5 and fixedRadius is 1 as in the standard mandelbox. Quote In this case it seems the first folding steps didn't affect the object you were transforming (the small grid), since it was all inside the folding edges. Right? rightQuote On the next iteration... Quote But in that case, wouldn't there be a solid core to the Mandelbox Perhaps you missed the 4th step in the animation, scaling by 2. This means at the end of the animation each grid cell is 2 units in length. If you doubt that numbers can be unbounded, see Benesi's example earlier in the thread. A simple example of a bounded point is (0,0). I expect the behaviour matches that of the Mandelbrot, I think some points never settle into a fixed cycle, but never-the-less stay bounded. Think its called a 'strange attractor' look it up.Quote Oh I think I get it--there is no "input shape" for the Mandelbox, but instead the Mandelbox is the set of all points in the entire 3D space that have still not escaped after a certain number of iterations (tending towards infinity). Is this right? Correct :)Title: Re: mandelbox request Post by: gussetCrimp on February 27, 2010, 01:02:56 AM Tglad wrote:
> Perhaps you missed the 4th step in the animation, scaling by 2. This means at the end of the animation each grid cell is 2 units in length. Ok. Now it's clear. I was misled by the fact the white gridlines were scaled up, too... I thought we were just zooming in to get a better picture. Thanks! Title: Re: mandelbox request Post by: Timeroot on February 27, 2010, 01:21:28 AM Quote But in that case, wouldn't there be a solid core to the Mandelbox If I could add to that, I'd like to point out that not *all* points are folded into that 2x2 square. The animation just didn't show any. All the points on the grid in the video were between -3 and 3 for both x and y. But if you think of something like (5,2), you'll see it get's folded to (-3,0). This is because the folds only do a limited amount - they won't fold the entire plane. If you want another example of a point escaping, think of it like this: Each time you fold, you basically - as a maximum - reduce the size of each coordinate by 2. Then you invert, which does nothing to larger points. Then you scale, which doubles the size. And then you add the constant. You can see why the doubling could outweigh everything else... |