Logo by Trifox - 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. April 25, 2024, 06:49:15 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: More serendipity  (Read 1405 times)
0 Members and 1 Guest are viewing this topic.
Paolo Bonzini
Guest
« on: December 17, 2009, 12:05:59 AM »

So I made a mistake in converting some formulas from triplex to quaternions and came up with the following:

qx = real(zri);
qy = imag(zri);
qz = zj;
f2 = cabs(zri)
if f2==0.0
  f2 =0.0001
endif
if @mpwr==2
f2 = qz/f2;
q1w = qx;
q1x = qy*f2;
q1y = -qx*f2;
q1z = qy;
qx = q1w*q1w + q1x*q1x - q1y*q1y - q1z*q1z;
qy = 2*(q1x*q1y + q1w*q1z);
qz = 2*(q1x*q1z - q1w*q1y);
else
xz2 = 2*qx*qz;
f2 = xz2/f2;
q2w = qx*qx-qy*qy-qz*qz;
q2x = qy*f2;
q2y = -qx*f2;
q2z = 2*qx*qy;
if @mpwr==4
qx = q2w*q2w + q2x*q2x - q2y*q2y - q2z*q2z;
qy = 2*(q2x*q2y + q2w*q2z);
qz = 2*(q2x*q2z - q2w*q2y);
else
q4w = q2w*q2w - xz2*xz2 - q2z*q2z;
q2w2 = 2*q2w;
q4x = q2w2*q2x;
q4y = q2w2*q2y;
q4z = q2w2*q2z;
qx = q4w*q4w + q4x*q4x - q4y*q4y - q4z*q4z;
qy = 2*(q4x*q4y + q4w*q4z);
qz = 2*(q4x*q4z - q4w*q4y);
endif
endif
zri = qx + flip(qy) + cri
zj = qz + cj
magn = |zri| + sqr(zj)

This is ready to be plugged in David's MMFWIP3 file for ultrafractal (which btw works great under Wine). It works for powers of 2,4,8. It has no support for distance estimation, but maybe the formula for normal Mandelbulb works (if I understood the formula correctly).

From zooming it looks like a new kind of taffy, however it has some nice 3D spikes; z^2 is more impressive than z^8 for this fractal.  I'm not sure as I didn't really understand how to move the camera in David's formulas.


* my-first-3d-fractal.jpg (451.84 KB, 1600x1200 - viewed 325 times.)
Logged
Paolo Bonzini
Guest
« Reply #1 on: December 17, 2009, 12:14:33 AM »

And here is the z^8 version (from the side). The horns are interesting, but it is definitely "whipped"...


* my-first-3d-fractal-z8.jpg (302.08 KB, 1600x1200 - viewed 322 times.)
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #2 on: December 17, 2009, 01:18:04 AM »


From zooming it looks like a new kind of taffy, however it has some nice 3D spikes; z^2 is more impressive than z^8 for this fractal.  I'm not sure as I didn't really understand how to move the camera in David's formulas.

Hi Paolo, the view is controlled by specifying a target (x,y,z) then the direction and distance of the viewing plane from the target - using the two "Camera Rot" angles and the "Camera distance" parameter. The perspective is controlled by the "Image plane distance" which specifies how much further from the target the viewpioint is than the image plane - use smaller values here for wider angle/larger FOV.
With the camera at a given position based on the above you can then also specify an alteration of the camera's viewing direction using the "Camera Dir." angle parameters (changing these from zero rotates the viewplane and viewpoint around the centre of the viewplane).
Note that the angle parameters are specified in degrees.
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Paolo Bonzini
Guest
« Reply #3 on: December 17, 2009, 01:21:49 AM »

Hi Paolo, the view is controlled by specifying a target (x,y,z) then the direction and distance of the viewing plane from the target - using the two "Camera Rot" angles and the "Camera distance" parameter. The perspective is controlled by the "Image plane distance" which specifies how much further from the target the viewpioint is than the image plane - use smaller values here for wider angle/larger FOV.
With the camera at a given position based on the above you can then also specify an alteration of the camera's viewing direction using the "Camera Dir." angle parameters (changing these from zero rotates the viewplane and viewpoint around the centre of the viewplane).
Note that the angle parameters are specified in degrees.
Heh, that I understood; the problem is getting the camera to move where I want. ;-)
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #4 on: December 17, 2009, 01:27:52 AM »

Heh, that I understood; the problem is getting the camera to move where I want. ;-)

A small trick: Set the "Camera distance" to say 1e-8 and then for most purposes the "target" coords are essentially the camera coords.
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Serendipity Movies Showcase (Rate My Movie) Don Whitaker 3 707 Last post August 03, 2010, 11:10:31 PM
by Lee Oliver

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.493 seconds with 29 queries. (Pretty URLs adds 0.008s, 2q)