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
|
|
« 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
|
|
|
|
fractalrebel
|
|
« 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
|
|
|
Logged
|
|
|
|
fractalrebel
|
|
« 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 but I am not getting images that are of much value.
|
|
|
Logged
|
|
|
|
fractalrebel
|
|
« 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 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 :
|
|
|
Logged
|
|
|
|
kram1032
|
|
« 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
|
|
« 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
|
|
« 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.... 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
|
|
|
Logged
|
|
|
|
BradC
|
|
« Reply #98 on: January 05, 2010, 11:22:07 PM » |
|
where where I derived these formulas using Mathematica, and tested them with 1000 random points 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: and .
|
|
|
Logged
|
|
|
|
kram1032
|
|
« 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
|
|
|
Logged
|
|
|
|
Timeroot
|
|
« 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, and , so maybe we could say . 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
|
|
« 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
|
|
« 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
|
|
|
|
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
|
|
« 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
|
|
|
|
|