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. November 29, 2025, 10:02:59 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 3 [4]   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: Ideal 3D mandelbrot?  (Read 11114 times)
Description: An extension of the Mandelbulb formula, which exhibits infinite detail
0 Members and 1 Guest are viewing this topic.
Schlega
Navigator
*****
Posts: 63


« Reply #45 on: February 23, 2010, 07:16:20 AM »

Sorry about the a,b,c notation. When I was thinking about it I was typing in notepad, so I didn't have access to subscripts. Let me try again:

Let wi = (xi,yi,zi),
ri = (xi2 + yi2 + zi2)1/2, and
rhoi = (xi2 + yi2)1/2.

then if w3 = w1 / w2, then

x3 = (r2)-2(x1x2 + y1y2)(z2/rho2 - z1/rho1)
y3 = (r2)-2(y1x2 - x1y2)(z2/rho2 - z1/rho1)
z3 = (r2)-2(z1z2 + rho1rho2)
Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #46 on: February 23, 2010, 02:32:54 PM »

hmmm... It would be easy to define tan by just doing sin(x)/cos(x) (and cot respectively), I guess...

Will that result in a different shape than the tan(x) series?
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #47 on: February 24, 2010, 12:58:38 AM »

Sorry about the a,b,c notation. When I was thinking about it I was typing in notepad, so I didn't have access to subscripts. Let me try again:

Let wi = (xi,yi,zi),
ri = (xi2 + yi2 + zi2)1/2, and
rhoi = (xi2 + yi2)1/2.

then if w3 = w1 / w2, then

x3 = (r2)-2(x1x2 + y1y2)(z2/rho2 - z1/rho1)
y3 = (r2)-2(y1x2 - x1y2)(z2/rho2 - z1/rho1)
z3 = (r2)-2(z1z2 + rho1rho2)
Irk, I'm sorry, that's all way over my head. Now I don't get the part about the subscripts... :-(

What about defining the tangent just with it's continued fraction rep, and then the sin and cos based on that (sqrt and sqr and w/e)?
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
Schlega
Navigator
*****
Posts: 63


« Reply #48 on: March 14, 2010, 02:59:34 AM »

Sorry it took so long to get back to this, Timeroot. The multiplication and division I had in mind was based on squaring the radius and doubling the angle in standard spherical coordinates, then converting to cartesian. Once I realized how problematic this definition could be, I stopped working on it for a while. Eventually, I decided to finish it even though it wouldn't be similar to triplex algebra.

   It looks like the continued fraction definition just results in a sphere, unless I did something stupid. I'll put the code here just in case there are glaring errors somewhere. I used ChaosPro:

Code:
Ztanzbulb(QUATERNION) {
parameter real bailout;
parameter int steps;
real pixelr,pixeli,pixelj;
real x1,x2,y1,y2,z1,z2,rho1,rho2,A,B,C;
quaternion res, res1,c;
int m;

quaternion inv(quaternion q)
{
q = q-quaternion(0,2*part_i(q),0,0);
q = q/|q|;
return(q);
}

quaternion mult(quaternion q, quaternion p)
{
x1 = part_r(q);
y1 = part_i(q);
z1 = part_j(q);
rho1 = sqrt(x1*x1+y1*y1);

x2 = part_r(p);
y2 = part_i(p);
z2 = part_j(p);
rho2 = sqrt(x2*x2+y2*y2);

if (rho1 == 0){
p =(z1*p);
} else if (rho2 == 0){
p = z2*p;
} else{
A = (x1*x2-y1*y2)*(z1/rho1+z2/rho2);
B = (x1*y2+x2*y1)*(z1/rho1+z2/rho2);
C = (rho1*rho2-z1*z2);
p = (quaternion(A,B,C,0));
}
return(p);
}
quaternion div(quaternion q, quaternion p)
{
x1 = part_r(q);
y1 = part_i(q);
z1 = part_j(q);
rho1 = sqrt(x1*x1+y1*y1);

x2 = part_r(p);
y2 = part_i(p);
z2 = part_j(p);
rho2 = sqrt(x2*x2+y2*y2);

if (rho1 == 0){
p =inv(p)*z1;
} else if (rho2 == 0){
p = p/z2;
} else{
A = (x1*x2+y1*y2)*(z1/rho1-z2/rho2)/|p|;
B = (x1*y2-x2*y1)*(z1/rho1-z2/rho2)/|p|;
C = (rho1*rho2+z1*z2)/|p|;
p = (quaternion(A,B,C,0));
}
return(p);
}

quaternion tangent(quaternion q)
{
res = 0.0;
for (m = steps+1; m>1; m=m-1){
res1 = mult(z,z)*(-1.0/(2*m-3)/(2*m-1));
res = div(res1,res+quaternion(0,0,1,0));
}
return(div(z,res+quaternion(0,0,1,0)));
}

void init(void)
{
pixelr=part_r(pixel);
pixeli=part_i(pixel);
pixelj=part_j(pixel);
c=quaternion(pixelr,pixeli,pixelj,0);
z=c;
}
void loop(void)
{
z=mult(z,tangent(z))+c;
}
bool bailout(void)
{
return(|z|<bailout);
}

void description(void)
{
this.title = "ztanzbulb";

bailout.caption = "Bailout Value";
bailout.default = 4.0;
bailout.min = 1.0;
bailout.hint = "Defines the bailout radius: As soon as a pixel falls outside a circle with this radius, the iteration stops.";

steps.caption = "Steps";
steps.default = 2;
steps.min = 1;
steps.hint = "Controls how deep into the continued fraction the tangent function goes.";

}
}
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #49 on: March 14, 2010, 10:38:00 AM »

 wink I found the error, it was pretty simple: in your "inv" definition, you say q=q/|q|. This should be q/(|q|^2). In ChaosPro, the || operator is the actual absolute value, not the the absolute value squared. The fact that all your variables reduced to unity within one reciprocation explains the sphere, I think. smiley The same mistake is made, by the way, in the div function.
« Last Edit: March 14, 2010, 10:48:21 AM by Timeroot » Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
Schlega
Navigator
*****
Posts: 63


« Reply #50 on: March 15, 2010, 11:35:11 AM »

 embarrass  Thanks, Timeroot. At the moment, ChaosPro is busy animating a zoom into z^log(z)+c, but I'll change that as soon as it finishes.
Logged
Pages: 1 2 3 [4]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
3D Mandelbrot Movies Showcase (Rate My Movie) David Makin 0 7464 Last post December 09, 2006, 11:38:14 PM
by David Makin
Mandelbrot 3d Mutatorkammer Gallery cKleinhuis 2 8579 Last post March 19, 2008, 05:45:40 PM
by GFWorld
3d mandelbrot Selfmade lycium 0 9175 Last post April 27, 2008, 09:16:43 PM
by lycium
I just ate a Mandelbrot. Fractal Humor seconteen 8 4736 Last post June 13, 2012, 01:19:47 AM
by klixon
The Ideal System for Animation General Discussion The Rev 2 2008 Last post June 22, 2011, 12:45:12 AM
by HPDZ

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.461 seconds with 28 queries. (Pretty URLs adds 0.009s, 2q)