Logo by Fiery - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. September 28, 2021, 06:45:10 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: How does the "Infinite zoom into the Mandelbulb" work? Looking for an approach.  (Read 2605 times)
0 Members and 1 Guest are viewing this topic.
paradox
Guest
« on: June 12, 2010, 12:56:17 PM »

Hi,

I am new to the world of 2D/3D Fractals and want to learn how they work. At the moment I am implementing a real-time OpenCL raytracing version of a Mandelbulb with a friend of mine which can be rotated and zoomed but it is not possible to zoom infinitely. What I am doing so far is to change the camera's viewpoint toward the fractal but I don't change the epsilon for the DE which determines the minimal distance step to break out of the DE. As a result I get a very undetailed Mandelbulb while I zoom more and more into it since the detail remains constant due to the epsilon. Another problem is I zoom with constant steps toward the Mandelbulb until I reach the inside of the Mandelbulb or origin of the coordinate system which is not the desired behavior. What I want is an infinite zoom (with the mouse wheel) into the exterior of the Mandelbulb, so my question:

Is there a good approach (formula or paper) to adjust the epsilon and the zoom step depending on the camera's distance to the exterior of the fractal? And is it better to use the field of view parameter instead of the camera's viewpoint to zoom toward the Mandelbulb?

TIA for your answers! smiley
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #1 on: June 12, 2010, 03:53:42 PM »

The best way to zoom in to a Mandelbulb as regards the location, magnification and fov is to move the viewpoint towards the Mandelbulb increasing the field of view (ie. reducing the image plane distance) and increasing the magnification - if you do this without increasing the magnification then you'll soon get clipping to the viewplane or even z distance zero.
As for epsilon (the distance estimate threshold) that should be dynamically calculated based on the distace from the viewpoint and the current distance from viewpoint to image plane, I do this:

          distmin = alpha*(@minscale*@mindist/@ip)


Where distmin is the epsilon to be used for the current step on the current ray, alpha is the distance from the viewpoint of the current step on the current ray, @minscale is a user parameter scale factor (i.e. a user "fudge" factor, normally 1.0) fixed at compile time, @mindist is the user's specification of epsilon also fixed at compile time and @ip is the distance from the viewpoint to the image plane also fixed at compile time.
Note that @minscale is fairly superfluous if you're only using the above dynamic adjustment for epsilon but I also use the same adustment for dynamic modification of my minimum step distance, my minimum search distance (for doing a binary search when "hit solid") and my delta value for the delta DE methods and so my formula needs an overall adjustment to keep these values consistent with each other.
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
paradox
Guest
« Reply #2 on: June 12, 2010, 06:36:47 PM »

Hey, thanks for your reply, David! smiley

My camera approach is another. I don't use a variable distance to an image plane (mine is fixed to 1.0); I use the FOV angle to calculate the view planes dimensions. So I have to use other factors.

What I don't understand is [..] that should be dynamically calculated based on the distace from the viewpoint and [..], [..] magnification [..] and [..] distmin is the epsilon to be used for the current step on the current ray [..]. First of all which distance do you mean with the distance from viewpoint (viewpoint to origin (0,0,0))? The second distance is clear, it is from viewpoint to image plane. Secondly - magnification, is it not the same as decreasing the FOV, because I project a smaller area to the projection plane. What I want to say is, is there a difference between magnification and FOV? Thirdly - which kind of current step do you mean?

I think I misunderstood everything in your message - sorry. sad I think I need some pseudocode for that to understand what you are talking about or a good paper about that topic.

Another thing - you have presented me an approach to adjust the epsilon, is there also an approach to adjust the zoom step (parameters) to the Mandelbulb when the mousewheel is moved (for me its fixed to 0.01 for every mousewheel step to in-/decrease the distance to the thing).

TIA!
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #3 on: June 13, 2010, 01:23:33 AM »

I can only explain in terms of my model.

Because the way UF works is essentially to pass my code a view plane for which the magnification is defned internally in UF rather than in my code I have to deal with the somewhat redundant method of both a "magnification" (UF system parameter) and an image plane distance.
Changing the image plane distance changes the fov.
Changing the magnification changes the fov.
To zoom without changing the fov (perspective) in this system requires changing both the magnification and the image plane distance *if* the image plane is also used as the front clipping plane.

I guess what I'm really saying is that changing the fov IMHO is *not* zooming, it's simply changing the perspective. In a true zoom the fov should actually remain unchanged.
My method is really a hangover from when I clipped anything closer to the camera than the view plane - I now use a front clipping plane that's almost at the viewpoint.

By dynamically calculating based on the distance from the viewpoint I mean the distance from the viewpoint at each step along the ray being traced i.e. all my test values (epsilon, binary search minimum and delta step) are recalculated at each step along each ray though of course I should optimise this so that they're only actually calculated when needed, at the moment they're always calculated on each step.

As to adjusting the zoom control - in order to do that you need to know say the current distance from the viewpoint to "solid" say for the central ray or use the shortest distance from the viewpoint to any "solid" and base your zoom scaling on that - typically use a logarithmic/exponential scaling here.
I can't do that in UF as there is not really a mechanism for feeding back calculated values to control future changes in the view i.e, none of the renders know how far it is to the surface.

Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2250


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #4 on: June 13, 2010, 07:42:13 AM »

    Hi,  I am new to the world of 2D/3D Fractals and want to learn how they work.
    At the moment I am implementing a real-time OpenCL raytracing version of a
    Mandelbulb with a friend of mine which can be rotated and zoomed.... 

Greetings, and Welcome to this particular Forum !!!    smiley

Well, being new to fractals, whether 2-D or 3-D, means you have a lot to learn if you want to truly get involved with everything in those areas.  As you can see by some of the topics in this Forum, there are new formulas and rendering approaches being discovered fairly often.  Not to mention all the different variations of what may be termed as "fractal".     wink

When it comes to fractals rendered as 3-D computer graphics, then you should consider how to handle the 3-D model, which is typically contained within the graphical data file.  Some people get a bit confused when the term 3-D computer graphics comes into play, since 2-D applications (like UF) may use 3-D techniques to achieve effects such as lighting, shadows, etc....
 
Logged

paradox
Guest
« Reply #5 on: June 19, 2010, 06:22:22 PM »

Hey, thanks for your replies! I appreciate that. smiley

I have just used the formula from the paper Ray Tracing Deterministic 3-D Fractals by D.J. Sandin [Section 4.2 Clarity], which is a really good paper. The formula works perfectly and I think it is very similar to yours, David.

For the zoom steps I only thought about a formula which should work with the current distance from the eye point to the surface (can be max distance, min distance, center ray distance or any other distance to surface) and a constant factor.

Formula:

Code:
d_0 = s_0; // s_0 is the distance from the beginning (eye point to surface)

for zooming in: d_(n+1) = d_(n) - d_(n)/c = d_(n)*c/c - d_(n)/c = (d_(n)*c-d_(n))/c = (d_(n)*(c - 1))/c
for zooming out: d_(n) = (d_(n+1)*c)/(c-1)

Example:
Code:
zooming in 1 step with d_0 = 10 and c = 10 it is: d_1 = (10 * (10 - 1)) / 10 = 9, next steps: d_2 = 8.1, d_3 = 7.29, d_4 = 6.561, ...
zooming out 1 step with d_1 = 9 and c = 10 it is: d_0 = 10

I have not tested this yet but I think it should work. However there should be a threshold for the most minimal distance to the surface because of floating-point single precision otherwise zooming out will not work anymore after some zoom steps.

What do you think? Is there a better one? tongue stuck out
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
"Buddhabrot on gpu" some zoom and result. Images Showcase (Rate My Fractal) « 1 2 » ker2x 18 3478 Last post December 14, 2012, 04:19:24 PM
by Dinkydau
BEYOND THE INFINITE - Opening - "Live report" Fractal News across the World « 1 2 3 » KRAFTWERK 37 6307 Last post May 20, 2013, 10:00:38 AM
by bib
Surface II - Infinite Shades of Gray. Another "Amazing Surface" animation. Movies Showcase (Rate My Movie) trumanbrown 0 1031 Last post October 31, 2012, 05:07:46 PM
by trumanbrown
"High" zoom Buddhabrot Images Showcase (Rate My Fractal) ker2x 8 1318 Last post April 12, 2015, 06:17:59 AM
by tit_toinou
"Needle Work" Mandelbulb3D Gallery GarryB 0 360 Last post January 25, 2016, 01:05:25 PM
by GarryB

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.21 seconds with 26 queries. (Pretty URLs adds 0.011s, 2q)