Logo by bib - 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 us on facebook
 
*
Welcome, Guest. Please login or register. April 20, 2024, 02:52:16 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 [2]   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: can someone confirm correctness of uf5 mandelbulb formula?  (Read 7850 times)
0 Members and 1 Guest are viewing this topic.
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #15 on: April 09, 2012, 06:16:42 PM »

And of course it's completely different from the standard grin


* slixe.JPG (62.19 KB, 728x555 - viewed 325 times.)
Logged

No sweat, guardian of wisdom!
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #16 on: April 10, 2012, 04:47:00 AM »

"Makin" is back - but a little tired....will check tomorrow evening - oops *this* evening....though after just going for a family wedding in Moray (Scotland) even closer family arrive here from Surrey today at around 4pm......

Of course you could just use the code from my mmf wip formula - in fact I think you could just use the formula as I think it allows cutting planes (though don't rely on that as I'm falling asleep).

http://www.fractalforums.com/mandelbulb-implementation/update-to-the-mmf-wip-formula-for-ultra-fractal/

Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #17 on: April 10, 2012, 09:45:16 AM »

the reason for this tutorial is to develop the mandelbulb formula from scratch, any hints
on compacting the code are welcome, but it shall serve as :
*how-to write formulas for ultrafractal,
*what is polar exponentiation
*what is spherical exponentiation
*and it shall be developed from scratch from the standard mandelbrot formula
* should serve as well as general introduction into fractal stuff and what we do here on the forums
* invite people to experiment with the formula editors
* general fractal math tutorial

it will be georgeous, and is planned as one of the first tvshow entries, it will consist of nearly 10 parts, and i talk something, and then switching to the ultrafractal screen... stay tuned...

any hints and comments are welcome,as well as hinting me where to make changes for the cosine/sine mandelbulb variant ... smiley


and in fact, i still have a question:

WHY IS THE ANGLE CALCULATION FOR THE SECOND ANGLE NOT USING ATAN2 FUNCTION ? !?
in my eyes it would be much simpler to adopt the atan2 function to just use another pair of coordinates, but why the heck it is calculated by "asin(z/r)" ?!?!?!
« Last Edit: April 10, 2012, 09:48:56 AM by cKleinhuis » Logged

---

divide and conquer - iterate and rule - chaos is No random!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #18 on: April 10, 2012, 11:40:57 AM »

WHY IS THE ANGLE CALCULATION FOR THE SECOND ANGLE NOT USING ATAN2 FUNCTION ? !?
in my eyes it would be much simpler to adopt the atan2 function to just use another pair of coordinates, but why the heck it is calculated by "asin(z/r)" ?!?!?!


You can convert asin() to atan2(); I did that in my implementation, as arcsin() simply does not exist in f.p. assembly! wink

See General formula help. nerd

arcsin(z/r) = atan2(z, hypot(x,y))  cheesy

hypot(x,y) = sqrt(x*x + y*y)

asin(z/r) = azimuth angle
« Last Edit: April 10, 2012, 11:43:35 AM by DarkBeam » Logged

No sweat, guardian of wisdom!
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #19 on: April 10, 2012, 11:47:36 AM »

btw Mandelbulb3d has a 2d mode, that you can explore using the rotation buttons, spin it all around! crazy eyes


* spinning.JPG (24.3 KB, 610x343 - viewed 337 times.)
Logged

No sweat, guardian of wisdom!
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #20 on: April 11, 2012, 09:48:32 PM »


WHY IS THE ANGLE CALCULATION FOR THE SECOND ANGLE NOT USING ATAN2 FUNCTION ? !?
in my eyes it would be much simpler to adopt the atan2 function to just use another pair of coordinates, but why the heck it is calculated by "asin(z/r)" ?!?!?!


Because you need r anyway (usually) and asin (on fpu) is considerably faster than atan2 wink

Sorry still haven't had time to check the code - things are still hectic here as although I'm back home from Scotland my brother and family are here at the moment (Steve, Christine, Max, Zoe, Yasmine and George) plus I'm trying to process all the pics I took while in Scotland among other things....
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #21 on: April 11, 2012, 10:25:54 PM »

@darkbeam, me: "ah, great that makes sense thank you for clarification ... although i cant explain it with my own words yet i am happy", right the mandelbulb3d has a 2d mode, but i never understood how to correctly use it, and what 3d picture results from it wink but just because i didnt spent too much time to find it out ...
but i will do it in ultrafractal, because i want to just show properties of fractal formulas in general, and ultrafractal in special... and at the end we will shortly watch mandelbulb3d and mandelbulber do their beautiful work ...

@dave take your time, i am interested what you say about how correct it is, in general but your uf5 expertise is also wanted,
 e.g. returning z value only in the iteration loop could lead to not so nice coloring problems,  or how to make "power" variable defined in base class a float, or at least hide it from display 
Logged

---

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


formerly known as 'Trifox'


WWW
« Reply #22 on: April 11, 2012, 10:30:55 PM »

My holy Saint Spaghetti Codes!!! I tried your formula, I must say I would be very curious to see how it's rendered in 3D...
I was able to run it only after creating an ulb. Another complication! wink
But I can not understand a row of your damnedly complicated code! undecided shocked The "real" formula is far less complicated than that... 5/6 rows of code and no need of all that commentary.  wink Please think simpler! Thanks! wink

lol, are you real ?
it shall serve as a tutorial, and every line that stands there has to fulfil a certain purpose or has to get lost ... cheesy ....
and i used some nasty copy&paste code, that will be discussed in the tutorial as well, and that it is clearly not a speed
optimized code is known to me as well ( nasty function calls ) but this structure allows easy understanding for not so
fractal-assembler-affine people ...

problem is that many many parts of the code just deal with some shortcomings that ultrafractal parser has ... e.g. i dont know how to create a complex number on the fly i needed some time to find out that x+flip(y) has to be used to make a complex number out of x/y

and some parts are declaring and using local variables for storing the iteration inbetween results hence uf5 just deals with complex numbers in the iter loop, and i wanted to store all parts of the number, and not only the z ... just to make things even clearer what is happening ...

and for sure i am going to switch start values at the start of the tutorial to show how to create julia sets cheesy cheesy cheesy cheesy
Logged

---

divide and conquer - iterate and rule - chaos is No random!
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #23 on: April 12, 2012, 11:26:29 PM »

or how to make "power" variable defined in base class a float, or at least hide it from display  

In the derived class have a parameter of the same name and type as the one in the parent class but with "visible=false".
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #24 on: April 13, 2012, 12:57:41 PM »

ah, thanks, what about casting/creating complex numbers on the fly ?
i would like to return it this way:
return (real,imag)
i am working on the steps of the formula, commenting every line, and parameter cheesy
will let you review it ....
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Pages: 1 [2]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Where does THE formula come from ? Mandelbrot & Julia Set bib 5 5230 Last post January 26, 2009, 07:12:10 PM
by cKleinhuis
THE formula for Mandelbulb? Theory ZsquaredplusC 6 10525 Last post November 22, 2009, 11:33:21 PM
by s31415
Mandelbulb complete formula 3D Fractal Generation GliderKite 11 6857 Last post November 14, 2010, 01:09:36 AM
by twinbee
Duplicate Subblue 3D Mandelbulb Ray Tracer Object in Mandelbulb 3d? Mandelbulb 3d Holtenwood 9 5962 Last post March 22, 2012, 09:07:26 AM
by DarkBeam
Extract mathematical formula from Mandelbulb feature request « 1 2 » grasshopper 19 11687 Last post February 28, 2013, 01:53:39 PM
by cKleinhuis

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 24 queries. (Pretty URLs adds 0.013s, 2q)