Logo by MarkJayBee - 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 27, 2024, 03:06:11 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 ... 5 6 [7] 8 9   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: Triplex algebra  (Read 59018 times)
0 Members and 1 Guest are viewing this topic.
vancefab
Guest
« Reply #90 on: December 27, 2009, 10:14:08 PM »

Yes, I meant that the quaternions could be used to express the rotations.  I thought that there were comments that implied quaternions could not be used.  It seems to me that not only can they be used but they simplify the notation and the computations significantly.  I think they eliminate all the complicated trignometric formulas in the code and leave only multiplication, addition and square roots.
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #91 on: December 28, 2009, 12:11:21 AM »

Hi everyone,

In my Ultrafractal 5 library I have a fairly complete set of quaternion and hypercomplex functions. I am starting a project to build functions for triplex algebra. Simple power, multiplication and division functions are already in the library, as these are the ones I use to generate my UF 5 raytraced images. I am adding BradC's expoential and log functions, along with a triplex power function. There will actually be two triplex power functions since multiplication doesn't commute. Does anyone have thoughts of transcendental functions that use triplex variables?

Hi Ron, but for the triplex functions multiplication does commute since to multiply you just multiply the magnitudes and sum the angles.

Edit: Just to add that although it is commutative triplex multiplication is neither associative nor distributive and the triplex also suffers in that multiplication and division are generally not inverses of each other and apparently neither are log and exp.
« Last Edit: December 28, 2009, 01:38:40 AM by David Makin » Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #92 on: December 28, 2009, 07:16:48 PM »

Hi Ron, but for the triplex functions multiplication does commute since to multiply you just multiply the magnitudes and sum the angles.

Edit: Just to add that although it is commutative triplex multiplication is neither associative nor distributive and the triplex also suffers in that multiplication and division are generally not inverses of each other and apparently neither are log and exp.


Right - my bad - brain cramp cheesy
Logged

fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #93 on: December 29, 2009, 09:45:12 PM »

I have tried implementing the exp and ln triplex functions in order to raise a mandelbulb to a triplex power. Its possible I have a typo somethwere  cry but I am not getting images that are of much value.
Logged

fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #94 on: December 29, 2009, 10:04:52 PM »

I have tried implementing the exp and ln triplex functions in order to raise a mandelbulb to a triplex power. Its possible I have a typo somethwere  cry but I am not getting images that are of much value.

Either its a typo or a result of the fact that the triplex exp and ln functions are not inverses of each other :smiley
Logged

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


« Reply #95 on: December 30, 2009, 11:36:31 PM »

BradC:
Which sum did you use for ln?

I'm not sure but Wolfram Alpha gives me several sums where only one seems to be fully defined and that one is pretty complex.... - a triplex one might actually require an even further extension of the definition and thus a whole new sum...

Also, what exactly does mathematica return if you throw exp(ln(a,b,c)) on it and simplify the results?
Or the other way round, ln(exp(a,b,c))?
Logged
BradC
Safarist
******
Posts: 85



« Reply #96 on: January 01, 2010, 09:45:46 PM »

BradC:
Which sum did you use for ln?

I used the series expansion at z=1 since it seems like a pretty simple one. See the second paragraph in http://www.fractalforums.com/theory/triplex-algebra/msg9962/#msg9962 for details.

Also, what exactly does mathematica return if you throw exp(ln(a,b,c)) on it and simplify the results?
Or the other way round, ln(exp(a,b,c))?

For both exp(ln(z)) and ln(exp(z)), it simplifies to something that's still really complicated - a few pages long when written out.
Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #97 on: January 04, 2010, 03:29:55 AM »

outch... lol

I'm not sure for mathematica as I don't have it but in case of wolfram alpha I noticed that for very complex results, I can simplify them quite some bits by hand (if you're willing to go through pages of maths-code and search for such spots lol) and then, if I put that hand-simplified code back into wolfram alpha, it magically simplifies that even furhter although it didn't find a simpler solution before....

log definitely is quite complex if you go out of the bounds of R+ so you might need to take care to use the correct sum (if you're unlucky, even find a totally new one) to correctly define the log.... smiley

look here (scroll down, click more)
http://www.wolframalpha.com/input/?i=series+ln%28x%2By*i%29
you'll see that only two series expansions of log are defined for the whole complex plane directly. - and both need the log function themselves...
maybe there are others, wolfram alpha isn't aware of... or the definitions aren't as strict as it claims them to be...
but I'm afraid not  cry
Logged
BradC
Safarist
******
Posts: 85



« Reply #98 on: January 05, 2010, 11:22:07 PM »

\cos (x,y,z)=\left(\sin (x) \sinh (y) \sinh (t x) \sin (t y)+\cos (x) \cosh (y) \cosh (t x) \cos (t y),\cos (x) \cosh (y) \sinh (t x) \sin (t y)-\sin (x) \sinh (y) \cosh (t x) \cos (t y),-\sinh (z) \sin \left(\sqrt{x^2+y^2}\right)\right) where t=\frac{z}{\sqrt{x^2+y^2}}
\sin (x,y,z)=\left(\sin (x) \cosh (y) \cosh (t x) \cos (t y)-\cos (x) \sinh (y) \sinh (t x) \sin (t y),\cos (x) \sinh (y) \cosh (t x) \cos (t y)+\sin (x) \cosh (y) \sinh (t x) \sin (t y),\sinh (z) \cos \left(\sqrt{x^2+y^2}\right)\right) where t=\frac{z}{\sqrt{x^2+y^2}}

I derived these formulas using Mathematica, and tested them with 1000 random points (-4<x<4,-4<y<4,-4<z<4) by comparing them with the series truncated after 32 terms. Agreement was always at least ~12 digits.

When z=0, these formulas match those for complex sin and cos: \cos (x,y,0)=(\cos (x) \cosh (y),-\sin (x) \sinh (y),0) and \sin (x,y,0)=(\sin (x) \cosh (y),\cos (x) \sinh (y),0).
Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #99 on: January 05, 2010, 11:43:50 PM »

nice, so now we can see a kind of triplex sine and/or cosine bulb cheesy
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #100 on: January 19, 2010, 04:32:13 AM »

How about when you square them and add? Do they equal 1? That would seem like an important property to me.

I was thinking that maybe the Triplex sine and cosine could be defined using some patterns in other functions. First off,
Cosh(x)=\frac{e^x + e^{-x}}{2} and Cos(z)=\frac{e^{i z} + e^{-i z}}{2}, so maybe we could say Cost(q)=\frac{e^{q*(0,0,1)} + e^{q*(0,0,-1)}}{2}. This wouldn't exactly give us a cosine for triplex numbers, but it might give us new function for any real (complex? triplex?) number. It may act identically to the regular cosine, but if so, it would give us clues to how the exponential function works. Once we know that, we could
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.
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #101 on: January 20, 2010, 03:09:23 AM »

Okay, I was thinking some more, and I was just wondering what the agreed upon defintion(s) or exponentiation. This thread is tooo looong and messed up. As far as I can tell, if A and B are two three-dimensional numbers, then A^B=Result, where Result.Radius=A.Radius^B.X, Result.Theta=A.Theta*B.X + B.Theta, and Result.Phi=A.Theta*B.X + B.Theta. From what I hear, multiplication is commutative and associative, and is done by multiplying radii and adding angles. Addition is commutative and associative, and you add x, y, and z. In that case, cos should be defined just fine by using the regular imaginary-exponent formula above.

I'm wondering how feasible it is do define a derivative on the triplex volume. If one can, then that could give an alternative (or possibly confirmative) definition of the exponential function / trigonometric functions. It could even be used to define something like the Airy/Bessel functions... not that they'd be used very often in fractal formulas.
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.
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #102 on: January 20, 2010, 02:16:10 PM »

Okay, I was thinking some more, and I was just wondering what the agreed upon defintion(s) or exponentiation. This thread is tooo looong and messed up. As far as I can tell, if A and B are two three-dimensional numbers, then A^B=Result, where Result.Radius=A.Radius^B.X, Result.Theta=A.Theta*B.X + B.Theta, and Result.Phi=A.Theta*B.X + B.Theta. From what I hear, multiplication is commutative and associative, and is done by multiplying radii and adding angles. Addition is commutative and associative, and you add x, y, and z. In that case, cos should be defined just fine by using the regular imaginary-exponent formula above.

I'm wondering how feasible it is do define a derivative on the triplex volume. If one can, then that could give an alternative (or possibly confirmative) definition of the exponential function / trigonometric functions. It could even be used to define something like the Airy/Bessel functions... not that they'd be used very often in fractal formulas.

Ermm - I think you'll find that multiplication is commutative but neither associative nor distributive.
Also the multiply and divide are not inverses of each other and apparently neither are log() and exp().
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 #103 on: January 20, 2010, 03:44:40 PM »

Sorry for pointing to my paper again, but Timeroot is somewhat correct about the multiplication.

Addition on cartesian coordinates works great, indeed you can only express it on cartesian coordinates (maybe there is a closed form on quaternions, but I haven't looked for it yet).

Multiplication on cartesian coordinates is not associative or distributive *because first and foremost it makes no sense*.  Multiplication on spherical coordinates (i.e. multiply radius, sum angles) or triplex-expressed-as-quaternion is commutative and associative, not sure about distributive.

Exponentiation on cartesian coordinates gives the correct values only when you compute the formula in advance, because in that case you are doing a "hidden" conversion (to quaternions or spherical coordinates) and back.

So, for Mandelbulbs you can take the shortcut, but otherwise you need to be explicit about your domain being a point (elevation in -pi/2...pi/2) or a rotation (elevation in -pi...pi).
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #104 on: January 20, 2010, 04:13:38 PM »

Multiplication on cartesian coordinates is not associative or distributive *because first and foremost it makes no sense*.  Multiplication on spherical coordinates (i.e. multiply radius, sum angles) or triplex-expressed-as-quaternion is commutative and associative, not sure about distributive.

I'm afraid you've lost me there.

For the triplex maths as applied in the Mandelbulb, the following are *not* true for all values:

a*(b*c) = a*b*c = (a*b)*c

a*(b+c) = a*b + a*c

a*(b/a) = b

exp(ln(a)) = a

If for your quaternion form any of these *do* hold true then it's not the same mathematical form as that used for the original Mandelbulb - I'm not saying it can't produce similar fractals though.

Note that I think however that the above equalities obviously do hold true if in a, b and c the "j" component is zero i.e. we're reduced to complex numbers.
« Last Edit: January 20, 2010, 04:28:11 PM by David Makin » 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 ... 5 6 [7] 8 9   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 5321 Last post January 26, 2009, 07:12:10 PM
by cKleinhuis
Secant method for cosine function Images Showcase (Rate My Fractal) HPDZ 1 2810 Last post February 03, 2009, 09:51:16 PM
by cKleinhuis
Secant Cosine 2D Art HPDZ 0 2180 Last post May 01, 2009, 01:32:06 AM
by HPDZ
Formula? Theory « 1 2 » lkmitch 20 9948 Last post March 23, 2010, 06:01:56 AM
by jehovajah
@jesse - save formula as new formula ?! feature request cKleinhuis 0 5089 Last post October 10, 2012, 05:43:14 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.196 seconds with 26 queries. (Pretty URLs adds 0.013s, 2q)