Hacker News new | ask | show | jobs
by rubatuga 1432 days ago
Great YouTube video of a deep zoom: https://www.youtube.com/watch?v=2S3lc2G3rWs
4 comments

What's the trick to implement a zoom like this in software? I remember many years ago implementing a trivial program to display the mandelbrot fractal, but as you zoomed in you quickly ran out of precision even if you used 64bit double floats.

Is it just using "bignums" behind the scenes or is there a trick to "reset" the exponent due to the fractal nature of the display? I always wondered if, thanks to the self-similar nature of fractals, one could convert a set of coordinates to another at a different scale and yield the same results.

My intuition tells me that it wouldn't work for all fractals though, and probably not for Mandelbrot because while it's self-similar it never seems to look exactly the same at different scales.

I'm a noob in this kind of stuff but maybe they're using fixed-point math and dynamically redefining the scaling to always have enough precision? But then if you do use fixed point you could as well use integer big numbers. Though I imagine that using any form of big numbers, int or float, is going to hurt the performance more and more as you zoom further. You may also be able to use the rule that you can multiply or divide both sides of an equation by the same number and it will remain valid.
I’d guess you need some kind of floating point bignum to do this. You can cache/memoize repeated Evals of the same point. But I think it would have to be the same point to some pretty tight tolerance (determined by screen resolution at the time). Regardless this video clearly had a lot of compute put into it.
I ran into the same problem, gave up on it. There must be some trick to it.
This is crazy. How do they pilot the zooming of the fractal? It must be carefully planned and programmed in to generate the video.

edit: I guess if they find an interesting thing very zoomed-in, then zoom out from that, the whole video will be interesting.

How is it possible that most stages have symmetries around the center of view?
The center of view coordinate was specifically chosen before the video was made. There is an infinite number of “interesting” coordinates.
I'm not sure your edit is right. No reason why there can't be a tiny but very complex thing which looks single-colour at the next 1 or 10 or 100 orders of magnitude.

But there are an infinite number of very interesting things in this fractal. If you constantly zoom in on interesting looking areas, you will find this kind of complexity with minimal need for backtracking.

I'm guessing most fractals don't have a smooth boundary anywhere, so if you know any boundary point, you can zoom in on it and it'll be "interesting."
Yeah I think you're right mike_hock.

On top of that I think that locations on (or near) the boundary, tend to stay on the boundary (and stay in the center of the image too) when zooming out.

While purely zooming (not translating) to a known boundary (or near) point, you won't ever see a move to another section-of-boundary, so if there are both 'inside' and 'outside' regions, corresponding to attractors at 0 and infinity, (the 2 main ones in these types of fractals) in the most-zoomed in state, then there will always be regions of both states contained in the final image when zoomed out (until you get to the 'top').

Maybe it would be possible for there to be formulae that don't hold to this? If the fractal had an incredibly sparse structure, say? To be honest I'm more interested in the opposite myself: Structures where the boundary (between N regions or behaviors) is so wiggly, it's almost 2 dimensional itself!. (If anyone wants to read more, I've called one particular interesting example of this: 'mandelfield' on UltraIterator)

...except when you run out of precision in an "unsophisticated" implementation as simias mentioned, then you'll eventually get smooth boundaries - which are just an artifact however.
The whole path of the video is define by a single complex number, with absurdly high precision. It’s just zooming in on that point.
Really enjoyed this, the Mandel build one on the same channel is also incredible.
I was hoping that a random Mandelbrot shows up at the end.

(Spoiler: it doesn’t)

Try this:

  Z := 1/Z - Z - C
(in complex numbers, with Z0 = i). Plenty of Mandelbrot sets in there.

[Edit for Z0 value]