Logo by Pauldelbrot - 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: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. March 29, 2024, 02:47:13 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 [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: Into the Heart of the Mandelbulb  (Read 9004 times)
0 Members and 1 Guest are viewing this topic.
kram1032
Fractal Senior
******
Posts: 1863


« Reply #15 on: December 13, 2009, 05:34:09 PM »

when the logarithmic zoom was mentioned, something different came into my mind:

what about letting the camera follow 3D lines of magnetic flux, ie let it kinda be a particle with direction that is affected by magnetism...

Afaik, the simplest way to colour the Mandelbrot actually shows how the magnetic field around it would look like...
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #16 on: December 13, 2009, 05:38:12 PM »

when the logarithmic zoom was mentioned, something different came into my mind:

what about letting the camera follow 3D lines of magnetic flux, ie let it kinda be a particle with direction that is affected by magnetism...

Afaik, the simplest way to colour the Mandelbrot actually shows how the magnetic field around it would look like...

Good idea, but getting the field lines analytically is tricky - even on a standard complex 2D fractal smiley

One way to do it would be have the camera simply follow the path of greatest iteration density.
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
iq
Guest
« Reply #17 on: December 16, 2009, 03:53:14 AM »

twinbee, you can probably use this code for spline camera interpolation: http://iquilezles.org/www/articles/minispline/minispline.htm  Well, for camera, light position, shading parameters, anything you want to animate over time. It's pretty easy tu use, much more than Bezier curves, and is probably enough to build simple animations. I copy the code here anyway, as it's very short:

Code:
static signed char coefs[16] = {
    -1, 2,-1, 0,
     3,-5, 0, 2,
    -3, 4, 1, 0,
     1,-1, 0, 0 };

void spline( const float *key, int num, int dim, float t, float *v )
{
    const int size = dim + 1;

    // find key
    int k = 0; while( key[k*size] < t ) k++;

    // interpolant
    const float h = (t-key[(k-1)*size])/(key[k*size]-key[(k-1)*size]);

    // init result
    for( int i=0; i < dim; i++ ) v[i] = 0.0f;

    // add basis functions
    for( int i=0; i<4; i++ )
    {
        int kn = k+i-2; if( kn<0 ) kn=0; else if( kn>(num-1) ) kn=num-1;

        const signed short *co = coefs + 4*i;

        const float b  = 0.5f*(((co[0]*h + co[1])*h + co[2])*h + co[3]);

        for( int j=0; j < dim; j++ ) v[j] += b * key[kn*size+j+1];
    }
}

"key" contains the time-data keyframes. Data can be 1D, 2D, 3D, 4D or any D you want. For cameras you probably want 6D, something like positionX, positionY, positionZ, lookAtPointX, lookAtPointY, lookAtPointZ, or a couple of 3D splines, dunno. Your global illumination algorithms seems pretty robust regarding different scale factors, but if you with to modify any parameter as you move deep into the fractal (like, more light bounces, or more contrast) you can bake that info in a spline too.
Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #18 on: December 16, 2009, 04:21:47 PM »

Thanks for that code iq. It looks as though the Catmull-Rom spline has some useful properties including:

a: local control; only nearest part of curve (within 2 control points either side) is affected.
b: curves pass through points exactly.

Both are great for precise camera control. I suppose one thing it may be lacking is controlling the 'sharpness' of the curve (which I think NURBs allow), but one can always add more control points.

It always confuses me why traditional 2D paint programs such as Photoshop still use only Bezier curves, when there are probably better options available.
Logged
Snakehand
Guest
« Reply #19 on: December 18, 2009, 12:20:22 AM »

twinbee, you can probably use this code for spline camera interpolation.....
 For cameras you probably want 6D, something like positionX, positionY, positionZ, lookAtPointX, lookAtPointY, lookAtPointZ, or a couple of 3D splines, dunno...

For camera interpolation, I would suggest using quaternion, and SLERP interpolation. http://en.wikipedia.org/wiki/Slerp This should give you the necessary control of the camera, and steers clear of numerous common problems. At any rate this is what I will use when I get around to writing camera control. Those splines look neat though, I might try them out on a problem I have encountered at work  cheesy (thanks)

Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #20 on: December 18, 2009, 12:51:56 AM »

afaik, there is some kind of extension of cardinal-splines where you can affect the roundness, bias and tension of the curves. It's kinda based on manipulating the gradient of the spline...

formulae aren't too complex but I don't remember the exact name so I can't find them sad
Logged
Pages: 1 [2]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Heart Shaped Orbit Traps General Discussion Nahee_Enterprises 0 3558 Last post May 18, 2007, 10:30:58 PM
by Nahee_Enterprises
Organic Mandelbulb heart Videos subblue 5 2769 Last post February 03, 2010, 01:41:49 AM
by Timeroot
i heart fractals Meet & Greet junglefortress 2 1431 Last post January 06, 2010, 06:00:25 PM
by Nahee_Enterprises
Heart and angel fractals Images Showcase (Rate My Fractal) Alef 0 1477 Last post January 14, 2012, 04:29:22 PM
by Alef
Eye heart shrooms Mandelbulber Gallery joe 2 805 Last post October 17, 2013, 10:24:47 AM
by Nahee_Enterprises

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