Pages: [1] 2 3 ... 9   Go Down
 Author Topic: Triplex algebra  (Read 45353 times) Description: 0 Members and 1 Guest are viewing this topic.
bugman
Conqueror

Posts: 122

 « on: November 09, 2009, 09:41:16 AM »

.
 White Formulas.gif (15.43 KB, 898x866 - viewed 2468 times.) « Last Edit: February 26, 2017, 11:23:40 AM by DarkBeam » Logged
bugman
Conqueror

Posts: 122

 « Reply #1 on: November 17, 2009, 05:53:18 PM »

.
 WhiteZ Formulas.gif (15.58 KB, 946x527 - viewed 2508 times.) « Last Edit: February 26, 2017, 05:19:20 PM by DarkBeam » Logged
bugman
Conqueror

Posts: 122

 « Reply #2 on: November 23, 2009, 09:40:55 AM »

You can see see the non-trigonometric expansions for the "sine" formula here:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8680/#msg8680 (no longer, post was moved here. Note by DarkBeam)

I still think the "sine" formula makes the most sense because it gives {x, y, z}^0 = {1, 0, 0}.

However, if I understand correctly, Daniel White and Garth Thornton have been experimenting with a "cosine" formula. The non-trigonometric expansions for the "cosine" formula are as follows:
 CosineFormulas.gif (14.73 KB, 955x523 - viewed 1093 times.) « Last Edit: February 26, 2017, 05:20:43 PM by DarkBeam » Logged
xenodreambuie
Conqueror

Posts: 117

 « Reply #3 on: November 23, 2009, 11:27:03 AM »

Thanks, Paul. One correction for the cosine formula: phi=n.arccos(z/r). It doesn't affect the rest.

I like the sine formula for the most part because it has the 2D Julia or Mandelbrot set in the Z=0 plane, and this works especially well for power -2. I stumbled on the cosine option initially because it didn't require any parity tricks to work in inverse iteration with the trig formulas, and I like the power 2 Julias it creates. It's worth reiterating that there are two variants of the cosine; one with correct roots and one with some flipped roots, depending on whether one uses forward or inverse iteration, and whether parity is checked. The one I prefer aesthetically has some flipped roots. For higher powers the sine and cosine Julias look increasingly similar, except for the symmetry of the bulbs. For even powers the cosine has rows of bulbs aligned with longitudinal lines, while the sine formula has them alternating.
 Logged

Regards, Garth
http://xenodream.com
bugman
Conqueror

Posts: 122

 « Reply #4 on: November 23, 2009, 08:52:19 PM »

Thank you for drawing that to my attention Garth. I have updated my previous post accordingly. The formula makes more sense now.
 Logged
bugman
Conqueror

Posts: 122

 « Reply #5 on: December 04, 2009, 11:22:16 PM »

Some people have requested for a more complete definition of the triplex. Unfortunately, it doesn't exactly form a complete algebra, but I will try to summarize the most consistent formulas here. I will only focus on the positive z-component formula here, because that is the most consistent formula.
 TriplexArithmetic.gif (12.39 KB, 675x651 - viewed 2013 times.) « Last Edit: December 16, 2009, 07:06:55 AM by bugman » Logged
bugman
Conqueror

Posts: 122

 « Reply #6 on: December 04, 2009, 11:24:18 PM »

The nth root of the power formula has n² unique valid roots (branches) if n is an integer. If n is not an integer, then depending on the values of {x, y, z}, some of the roots will not be valid.

Here is some C++ code in case you have difficulty following the math formulas below:

//Arbitrary integer roots, allows for n² branches
//this code is written for ease of understanding and is not intended to be efficient
//all unique valid roots can be found using all possible combinations of:
// ktheta=0,1,...abs(n)-1
// kphi=0,1,...abs(n)-1
triplex TriplexRoot(triplex p, int n, int ktheta, int kphi) {
int k1=(abs(n)-(p.z<0?0:1))/4, k2=(3*abs(n)+(p.z<0?4:2))/4, dk=0;
if(abs(n)%2==0 && kphi>k1 && kphi<k2) dk=sign(p.z)*(abs(n)%4==0?-1:1);
double r=sqrt(sqr(p.x)+sqr(p.y)+sqr(p.z));
double theta=(atan2(p.y,p.x)+(2*ktheta+dk)*pi)/n;
double phi=(asin(p.z/r)+(2*kphi-dk)*pi)/n;
return pow(r,1.0/n)*triplex(cos(theta)*cos(phi),sin(theta)*cos(phi),sin(phi));
}

Also, here is some Mathematica code in case that is easier for you to understand:
TriplexRoot[ {x_, y_, z_}, n_, ktheta_, kphi_] := Module[ {dk = If[ Mod[ n, 2] == 0 && Abs[ n] < 4kphi + If[ z < 0, 0, 1] <= 3Abs[ n], Sign[ z]If[ Mod[ n, 4] == 0, -1, 1], 0], r = Sqrt[ x^2 + y^2 + z^2],theta, phi}, theta = (ArcTan[ x, y] + (2ktheta + dk)Pi)/n; phi = (ArcSin[ z/r] + (2kphi - dk)Pi)/n; r^(1/n){Cos[ theta] Cos[ phi], Sin[ theta]Cos[ phi], Sin[ phi]}];
 Roots.gif (8.67 KB, 644x439 - viewed 1555 times.) « Last Edit: December 17, 2009, 12:27:59 AM by bugman » Logged
David Makin
Global Moderator
Fractal Senior

Posts: 2283

 « Reply #7 on: December 04, 2009, 11:53:59 PM »

Thanks Paul !
 Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Safarist

Posts: 85

 « Reply #8 on: December 05, 2009, 04:37:47 AM »

Have you tried defining transcendental functions by their Taylor series, such as $e^z=(1,0,0)+z+\frac{z^2}{2!}+\frac{z^3}{3!}+\cdots$ where $z$ is a triplex, to see if that makes any kind of sense?
 Logged
bugman
Conqueror

Posts: 122

 « Reply #9 on: December 05, 2009, 06:42:38 AM »

Have you tried defining transcendental functions by their Taylor series, such as <Quoted Image Removed> where <Quoted Image Removed> is a triplex, to see if that makes any kind of sense?

That's an interesting idea, but it looks difficult. The triplex power function is rather complicated. I'll think about it and see if I come up with any ideas.
 Logged
Paolo Bonzini
Guest
 « Reply #10 on: December 05, 2009, 08:43:25 PM »

FWIW, the triplex numbers do not even form an alternative algebra, and there is no distributivity either.  They only have power associativity (which is no big news) .
 « Last Edit: December 05, 2009, 11:29:18 PM by Paolo Bonzini » Logged
Paolo Bonzini
Guest
 « Reply #11 on: December 05, 2009, 11:39:07 PM »

Another little thing, it is enough that one of the three factors be complex (z=0) to have associativity (it is obvious that one is enough, since there is commutativity).

Also, it is enough that a is complex to have a(b+c) = ab+ac.

This may make it a bit easier to manipulate power series...
 Logged
zee
Guest
 « Reply #12 on: December 06, 2009, 01:47:50 AM »

Thank you for this definition! I think you added this to wikipedia?! (http://en.wikipedia.org/wiki/Hypercomplex_number#Three-dimensional_complex_numbers_based_on_spherical_coordinates)

But I can't see why the third dimension can be called hypercomplex.
In the normal Mandelbrot you have the simple multiplication z² in complex and only because of i² = -1 you get the mandelbrot iteration very simple; its the property that complex numbers can do a rotation and rescaling.

So I think the 3rd dimension can't be a second complex dimension, and the multiplication and result shows that a second complex number like j will not be used (and makes no sense) because the result is more than multiplying 2 hypercomplex numbers (which are sums)! In 2D it works, but try to multiply quarternions - you can't get terms with x y and z in one component. This is impossible by squaring.

I see that the 2D mandelbrot equations are still in there... But it looks like that the "triplex" is something that can't be understand in calling it hypercomplex... there must be somthing more/other...
 « Last Edit: December 06, 2009, 07:43:49 AM by zee » Logged
David Makin
Global Moderator
Fractal Senior

Posts: 2283

 « Reply #13 on: December 06, 2009, 02:29:04 AM »

@bugman: There's a mistake on the Wikipedia page - you have the 3rd value for the multiply as sin(theta2+theta2).
 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 #14 on: December 06, 2009, 03:43:57 AM »

I fixed the mistake in Wikipedia.  BTW, I think it can be called a hypercomplex number if the third axis is taken to have j^2=0 (or maybe not because unlike dual numbers, here you have to count z^2 when you compute the norm; these numbers are strange...).  You can also say that (x,-y,-z) is the conjugate.

Also, here is a closed form expression for powers of the triplex numbers based on Chebyshev polynomials Tn(x) and Un-1(x).  These give $T_n(x) = \cos(n\ \arccos\ x)$, and $\sin\ \arccos\ x\ \cdot\ U_{n-1}(x) = \sin(n\ \arccos\ x)$ without explicitly computing the trigonometric functions, so they are very handy for this kind of transformation.

I initially assume that x^2+y^2+z^2 = 1. I express the angles in terms of arccos and use the Chebyshev polynomials:

$\rho_{xy} = \sqrt{x^2+y^2}$
$\theta = \arccos\ \frac{x}{\rho_{xy}},\ \phi = \arccos\ \rho_{xy}$

$
(x,y,z)^n = (\cos\ n\theta\ \cos\ n\phi,\ \sin\ n\theta\ \cos\ n\phi,\ \sin n\phi) \\
\, = (T_n(\frac{x}{\rho_{xy}}) T_n(\rho_{xy}),\ \frac y{\rho_{xy}} U_{n-1}(\frac{x}{\rho_{xy}}) T_n(\rho_{xy}),\ z U_{n-1}(\rho_{xy})) \\
\, = (T_n(\frac{x}{\rho_{xy}}) T_n(\sqrt{1-z^2}),\ \frac y{\rho_{xy}} U_{n-1}(\frac{x}{\rho_{xy}}) T_n(\sqrt{1-z^2}),\ z U_{n-1}(\sqrt{1-z^2))
$

From this formula, the various pieces in http://www.fractalforums.com/index.php?action=dlattach;topic=742.0;attach=436;image should be more or less identifiable.

Since (x,y,z) does not usually have unary modulus, you should divide the arguments by $\rho$ and multiply the results by $\rho^n$.  Most of the divisions cancel, and what you get is:

$
(x,y,z)^n = (\rho^n T_n(\frac{x}{\rho_{xy}}) T_n(\sqrt{1-\frac{z^2}{\rho^2}}),\ \rho^n \frac y{\rho_{xy}} U_{n-1}(\frac{x}{\rho_{xy}}) T_n(\sqrt{1-\frac{z^2}{\rho^2}}),\ \rho^{n-1} z U_{n-1}(\sqrt{1-\frac{z^2}{\rho^2}}))$

 « Last Edit: December 06, 2009, 03:48:58 AM by Paolo Bonzini » Logged
 Pages: [1] 2 3 ... 9   Go Down