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: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. October 03, 2018, 08:28:17 PM


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: (Beginner) Escape conditions for mandelbox  (Read 3091 times)
0 Members and 1 Guest are viewing this topic.
barkeg
Alien
***
Posts: 29



« on: July 25, 2011, 11:31:52 PM »

Hello,
I'm new here. I'm just playing arround with the renderer I've written. So 2D fractals and mandelbulb went fine. But when it comes to the mandelbox I don't know at which number I have breake the loop of iterating. Is there something like in the mandelbulbs if magnitude(v)>2 it diverges?

I've read something like that if it's a scale 2 fractal it diverges if magnitude(v)>6 and magnitude(v)>2 for fractals with negative scale. But that doesn't work for me. It only rendered a cloud of points. I had to put the limit to 11 (at scale 2) and it worked fine.

Is there any relation between the scale and the escape value? (some formula?)

Well, here go some pics:






A mandelbulb (cosine version)



And a test with environmentmapping



By the way, very nice forum! It helps me a lot!
(and sorry for my english, I hope you understand what I mean)
« Last Edit: July 25, 2011, 11:34:33 PM by barkeg » Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: July 26, 2011, 12:09:44 AM »

according to the site:
http://sites.google.com/site/mandelbox/what-is-a-mandelbox

the escape condition is the same as for the mandelbrot, dont let you confuse by the "foldings"
it is the same logik as for the mandelbrot, when a certain limit is reached it can never get back ...
and your 2 first images look nice as a mandelbox should look:
http://www.cinn-almonds.com/roasters/original.htm cheesy
Logged

---

divide and conquer - iterate and rule - chaos is No random!
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #2 on: July 26, 2011, 12:14:50 AM »

but you have to keep in mind that the mandelbox uses a bit greate value for deciding if the formula escapes,
the mandelbox is "bigger" than the mandelbrot, i think it covers -6 to 6, so checking for abs(z)>6 should do the trick wink

as a side note:

the bailout condition is always just an "optimisation" or "heuristic" it can be as big as you like,
the "inside" points will stay inside, regardless which bailout condition you take, and the others just
bailout a little later when using a bigger bailout value, so shifting of colors could occur, so, as a
general rule: "it doesnt matter how big your bailout value is, your inside/outside test will yield correct results, but keeping this
value as low as possible can dramatically decrease your rendering time!"



some coloring algorithms need BIG bailout conditions to look good
Logged

---

divide and conquer - iterate and rule - chaos is No random!
barkeg
Alien
***
Posts: 29



« Reply #3 on: July 26, 2011, 01:22:22 AM »

First: Thank you for replying!

Second:
That's right!
Inside points will keep inside but on the other hand points that aren't inside will keep inside with to lower values.
I think it depends on the number of iterations too.

Some images to show you what happens:

All were done with 10 iterations (please ignore the white pixels, its a bug on the shading function)
this one is a scale=2 and has a escapa value of abs(z)>6:



scale=2 and abs(z)>11 (I think this is what a scale 2 should look like)


scale=2 abs(z)>30


They are very small but I hope you get an idea.

Well, it's true that it has a range of -6 to 6 but I thought to get the corners in it, it would be sqrt(6^2+6^2+6^2)=10.392 which is pretty close to the 11 I used. It's just an idea wink

« Last Edit: July 29, 2011, 01:02:59 PM by barkeg » Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #4 on: July 26, 2011, 11:11:58 AM »

ah yes, its 3d wink
but all in all you are correct, you can experiment with it wink
Logged

---

divide and conquer - iterate and rule - chaos is No random!
barkeg
Alien
***
Posts: 29



« Reply #5 on: July 26, 2011, 12:03:01 PM »

Ok, thanks! I'll upload some images when I get it colored.
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #6 on: July 26, 2011, 02:27:18 PM »

Try with 60 iters and bail 1024, it should look perfect cheesy
Logged

No sweat, guardian of wisdom!
barkeg
Alien
***
Posts: 29



« Reply #7 on: July 26, 2011, 04:03:15 PM »

iter=60 , bailout=1024



I think it's because it has to much detail so it couldn't show it per pixel.
Anyway, I've read somewhere in this forums that 20 is the maximum of iterations to do to look good.
But when you zoom in it could be more, so I'm thinking of increasing the iterations when doing more zoom.
Logged
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #8 on: July 26, 2011, 05:20:03 PM »

I am not so expert of these details, ask Buddhi or Jesse ... Or look at Buddhi's source code it should be very handy smiley
Logged

No sweat, guardian of wisdom!
barkeg
Alien
***
Posts: 29



« Reply #9 on: July 26, 2011, 10:52:35 PM »

I'll take a look at the source code maybe but I think I'll let it as a number you can input and to change the shape.
Thanks,anyway wink
Logged
marius
Fractal Lover
**
Posts: 206


« Reply #10 on: July 26, 2011, 11:55:58 PM »

I'll take a look at the source code maybe but I think I'll let it as a number you can input and to change the shape.
Thanks,anyway wink

You need to implement some dynamic level of detail, depending on distance and projected on screen error.

That's what the raymarchers all do and how you get decent pictures from near to far without getting the pixie dust appearance for high iteration counts like you show earlier in this thread. Yet you want the high iteration count for detail nearby.

See for instance http://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/menger.cfg.data/fragment.glsl#215
and how m_zoom gets used further down that main() to control the raymarching end condition.

In general, the simple .glsl fragments that implement some of the formulae are pretty instructive and self-contained. See source for boxplorer, boxplorer2, fragmentarium, http://fractal.io and various posts all over this forum.

Have fun!
Logged
barkeg
Alien
***
Posts: 29



« Reply #11 on: July 27, 2011, 02:40:49 PM »

That was what I had in mind wink

I think I understand the zoom algorithm:
-it stops "if (D < m_dist) break;" where m_dist = max(min_dist, m_zoom * totalD)

And I think I don't need a bailout when using the distance estimator because a ray actually never "hits" the fractal (tell me when I'm wrong)
I'll try to implement it. I was using a simple voxel system looking if each voxel diverges or not (it's so slow!!)
Thanks!
Logged
marius
Fractal Lover
**
Posts: 206


« Reply #12 on: July 27, 2011, 06:40:44 PM »

That was what I had in mind wink

I think I understand the zoom algorithm:
-it stops "if (D < m_dist) break;" where m_dist = max(min_dist, m_zoom * totalD)

And I think I don't need a bailout when using the distance estimator because a ray actually never "hits" the fractal (tell me when I'm wrong)
Right, a proper distance estimation will give smaller and smaller estimates until you run out of numerical precision.

Quote
I'll try to implement it. I was using a simple voxel system looking if each voxel diverges or not (it's so slow!!)

With the raymarching approaches you get occlusion culling for free and easy access to lots of raytracing techniques like reflection, refraction, shadowing etc. But you have to compute for every new view.

Keeping a voxel cloud of interesting detail in memory is going to be challenging real quick.

The distance estimation functions for the various fractals are hard to come up with and kind of magic at first.
Logged
barkeg
Alien
***
Posts: 29



« Reply #13 on: July 27, 2011, 07:02:06 PM »

Oh, i think you were writting when I did another post wink

I did only compute the voxel wich are visible (for every frame). Well, it's not really a voxel (I began with voxel). I did the same as the distance estimator but with fixed step and when I found something "solid" I did half of the old step backwards and so on.

But the fixed step still had to be small to not loose too much detail.
Logged
knighty
Fractal Iambus
***
Posts: 819


« Reply #14 on: August 26, 2011, 01:50:09 AM »

First: Thank you for replying!

Second:
That's right!
Inside points will keep inside but on the other hand points that aren't inside will keep inside with to lower values.
I think it depends on the number of iterations too.

Some images to show you what happens:

All were done with 10 iterations (please ignore the white pixels, its a bug on the shading function)
this one is a scale=2 and has a escapa value of abs(z)>6:

<Quoted Image Removed>

scale=2 and abs(z)>11 (I think this is what a scale 2 should look like)
<Quoted Image Removed>

scale=2 abs(z)>30
<Quoted Image Removed>

They are very small but I hope you get an idea.

Well, it's true that it has a range of -6 to 6 but I thought to get the corners in it, it would be sqrt(6^2+6^2+6^2)=10.392 which is pretty close to the 11 I used. It's just an idea wink

If you are still interrested, here is the post where I have given the formula of the size of the mandelbox.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
help a beginner! Programming farzane 1 737 Last post December 29, 2010, 06:20:25 AM
by ker2x
Beginner's problems with the Mandelbox formula Programming smooo 5 2324 Last post February 08, 2011, 04:43:13 PM
by smooo
Mandelbox with "smooth" conditions 3D Fractal Generation Buddhi 5 2082 Last post May 22, 2011, 03:02:08 PM
by knighty
Different Bailout Conditions FractInt simon.snake 0 1044 Last post October 04, 2013, 11:15:25 PM
by simon.snake
Escape From The Mandelbox Programming sbowline 0 558 Last post January 05, 2014, 04:37:47 AM
by sbowline

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.173 seconds with 26 queries. (Pretty URLs adds 0.014s, 2q)