Paolo Bonzini
Guest
|
|
« Reply #30 on: December 07, 2009, 01:54:05 AM » |
|
Perhaps someone reading this thread can clear up an issue related to the non-trig calculations. You'll note that when zri is (0,0) and when zjk is (0,0) then I assume the sine/cosine calculation done by raising the normalised complex value to a power should return (0,0) i.e. it leaves the values unchanged. It would be equally valid to return (1,0) - would that be a better option mathematically speaking ?
I think I deduce from that, that the answer is yes I should use (1,0) instead of (0,0) when normalising (0,0) - I guess the answer was in the question anyway since if it's normalised then the magnitude *has* to be 1 I'm not sure. You should probably use an if-then-else and use totally different formulas when zri and/or zjk are zero, I don't think normalising would work.
|
|
|
Logged
|
|
|
|
zee
Guest
|
|
« Reply #31 on: December 07, 2009, 02:01:00 AM » |
|
There is an error in my PDF because that equations: http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8680/#msg8680there r is only the length of the (x,y) vector but in Wikipedia and in this thread bugman wrote it's the length of the (x,y,z) vector. I wanted so compare the results by myself but I crashed my program But please tell me what equation is correct? I think I did it without the z^2 and got the same result like with the trigonometric equations...
|
|
« Last Edit: December 07, 2009, 02:19:00 AM by zee »
|
Logged
|
|
|
|
David Makin
|
|
« Reply #32 on: December 07, 2009, 02:04:03 AM » |
|
Perhaps someone reading this thread can clear up an issue related to the non-trig calculations. You'll note that when zri is (0,0) and when zjk is (0,0) then I assume the sine/cosine calculation done by raising the normalised complex value to a power should return (0,0) i.e. it leaves the values unchanged. It would be equally valid to return (1,0) - would that be a better option mathematically speaking ?
I think I deduce from that, that the answer is yes I should use (1,0) instead of (0,0) when normalising (0,0) - I guess the answer was in the question anyway since if it's normalised then the magnitude *has* to be 1 I'm not sure. You should probably use an if-then-else and use totally different formulas when zri and/or zjk are zero, I don't think normalising would work. Actually I just noticed that according to your version above it looks like I should have zri/mag(zri) as (-1,0) when zri is (0,0)
|
|
« Last Edit: December 07, 2009, 02:06:17 AM by David Makin »
|
Logged
|
|
|
|
David Makin
|
|
« Reply #33 on: December 07, 2009, 02:10:33 AM » |
|
There is an error in my PDF because that equations: http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8680/#msg8680there r is only the length of the (x,y) vector but in Wikipedia and in this thread bugman wrote it's the length of the (x,y,z) vector. I wanted so compare the results by myself but I crashed my program But please tell me what equation is correct? I think I did it without the z^2 and got the same result like with the trigonometric equations BUT if there is no z^2 you'll get a sigularity at (0,0,1) and I think your simulations say something others... There are 2 "r's" in the link you quoted, one is in the trig version and is sqrt(x^2+y^2+z^2) (that's plain R) and the other is used in the non-trig versions of the formula and that's sqrt(x^2 + y^2) (that's Rxy).
|
|
|
Logged
|
|
|
|
zee
Guest
|
|
« Reply #34 on: December 07, 2009, 02:13:36 AM » |
|
|
|
« Last Edit: December 07, 2009, 02:28:29 AM by zee »
|
Logged
|
|
|
|
David Makin
|
|
« Reply #35 on: December 07, 2009, 02:19:55 AM » |
|
Hmmm I should be able to work it out but I'm too lazy - you are correct that it is unclear as to what r1 and r2 should be but all the Rk's are sqrt(x^2+y^2+z^2).
|
|
|
Logged
|
|
|
|
Paolo Bonzini
Guest
|
|
« Reply #36 on: December 07, 2009, 02:24:28 AM » |
|
Yeah, I removed the Cartesian definition from wikipedia. I was sure it wasn't there but I was wrong. :-) The cartesian definition indeed uses only sqrt(x^2+y^2), while the trig definition uses sqrt(x^2+y^2+z^2). In the non-trigometric equations ((0,0,1)2 = (0,0,0)!
Not (0,0,0), but rather (undefined,undefined,0). But I fell into that trap too, so I understand your (and David's) surprise. Actually I just noticed that according to your version above it looks like I should have zri/mag(zri) as (-1,0) when zri is (0,0) Hmm, no you should have (-1,0) as the magnitude of the complex part of the product when both zri and zjk are (0,0). Here is my Maxima code: r(a):=sqrt(a[1]^2+a[2]^2); mul(a,b):=if r(a) = 0 and r(b) = 0 then [-a[3]*b[3],0,0] else if r(a) = 0 then [-a[3]*b[3]*b[1]/r(b),-a[3]*b[3]*b[2]/r(b), a[3]*r(b)] else if r(b) = 0 then [-b[3]*a[3]*a[1]/r(a),-b[3]*a[3]*a[2]/r(a), b[3]*r(a)] else [(a[1]*b[1]-a[2]*b[2]) * (1 - a[3]*b[3]/(r(a)*r(b))), (a[2]*b[1]+a[1]*b[2]) * (1 - a[3]*b[3]/(r(a)*r(b))), b[3]*r(a)+a[3]*r(b)]; Of course you should use comparison with a very small value rather than 0 (I need 0 because I'm doing symbolic calculations). Going to bed now. :-)
|
|
« Last Edit: December 07, 2009, 02:27:07 AM by Paolo Bonzini »
|
Logged
|
|
|
|
zee
Guest
|
|
« Reply #37 on: December 07, 2009, 02:29:50 AM » |
|
I forgot to say:
With falling from heaven I meant that I bugman wrote to me he got that equation with mathematica by the trigometric but there is no evidence why it should be that. They didn't fall from heaven for sure because they work!
In the non-trigometric equations ((0,0,1)^2 = (0,0,0)! But that j^2 must be -1 is not a result of this if we assume that j is something like a second complex number/dimension/basis.
But it's amazing that j^2 seems to be zero.
|
|
« Last Edit: December 07, 2009, 02:41:31 AM by zee »
|
Logged
|
|
|
|
David Makin
|
|
« Reply #38 on: December 07, 2009, 02:35:56 AM » |
|
Actually I just noticed that according to your version above it looks like I should have zri/mag(zri) as (-1,0) when zri is (0,0) Hmm, no you should have (-1,0) as the magnitude of the complex part of the product when both zri and zjk are (0,0). Here is my Maxima code: r(a):=sqrt(a[1]^2+a[2]^2); mul(a,b):=if r(a) = 0 and r(b) = 0 then [-a[3]*b[3],0,0] else if r(a) = 0 then [-a[3]*b[3]*b[1]/r(b),-a[3]*b[3]*b[2]/r(b), a[3]*r(b)] else if r(b) = 0 then [-b[3]*a[3]*a[1]/r(a),-b[3]*a[3]*a[2]/r(a), b[3]*r(a)] else [(a[1]*b[1]-a[2]*b[2]) * (1 - a[3]*b[3]/(r(a)*r(b))), (a[2]*b[1]+a[1]*b[2]) * (1 - a[3]*b[3]/(r(a)*r(b))), b[3]*r(a)+a[3]*r(b)]; Of course you should use comparison with a very small value rather than 0 (I need 0 because I'm doing symbolic calculations). Going to bed now. :-) Looking back at the trig, I'm still not sure.... will think about it more When my zri is (0,0) if I use the normalised value as (1,0) then for the full triplex: (0,0,z)^2 = (-z^2,0,0) (0,0,z)^3 = (0,0,-z^3) (0,0,z)^4 = (z^4,0,0) (0,0,z)^5 = (0,0,z^5) etc. Is that correct ? I think the only real alternative is having the normalised value of zri as (0,0) if zri is (0,0) but that gives (0,0,z)^p = (0,0,0).
|
|
« Last Edit: December 07, 2009, 04:01:49 AM by David Makin »
|
Logged
|
|
|
|
zee
Guest
|
|
« Reply #39 on: December 07, 2009, 03:12:50 AM » |
|
I think I got the solution for j^2 by my definition without changing it:
For x = 0 and y = 0: follows j = 0! So j^2 is also zero. What means that x = y = 0 is something like a limiting case of the "Spherical Complex Numbers" to Hypercomplex Numbers.
And I think you already know
For z = 0: Its the limiting case to Complex Numbers
(0,0,1)^2 = (0,0,0) is no problem of my definition because j depents on x and y!
(and I think (0,0,1)^2 = (0,0,0) must be correct because 0*infinity = 0)
|
|
« Last Edit: December 07, 2009, 03:25:18 AM by zee »
|
Logged
|
|
|
|
David Makin
|
|
« Reply #40 on: December 07, 2009, 04:47:19 AM » |
|
I just had a look around for definitions of atan2(0,0) and the choices seem to be 0 or undefined or +0, pi, -0, -pi (if using signed zero). Basically I think assuming atan2(0,0) is zero is the best option which gives us (1,0) for my normalised zri i.e. when both x and y are zero then we have 1 for the cos(n*theta) and 0 for sin(n*thete). Also using (0,0) for my normalised zri would make all (0,0,z)^p zero which in fractal terms would give us an infinite line (the z axis) as part of the attractor in some Julia sets, something I think should be avoided
|
|
« Last Edit: December 07, 2009, 04:54:12 AM by David Makin »
|
Logged
|
|
|
|
Paolo Bonzini
Guest
|
|
« Reply #41 on: December 07, 2009, 10:21:06 AM » |
|
(and I think (0,0,1)^2 = (0,0,0) must be correct because 0*infinity = 0)
No, 0*infinity is not zero. It's undefined and depends on the particular cases. That's calculus 101. Please try to understand that before going on. I went through the same, please accept my advice... Another example why (0,0,1)^2 = 0 is not good, is that in that case solving z^N=1 with Newton's method gives a division by zero (see my post in Mandelbrot Renderings, before I "saw the light" ). If you set (0,0,1)^2=-1, it works fine. Also using (0,0) for my normalised zri would make all (0,0,z)^p zero which in fractal terms would give us an infinite line (the z axis) as part of the attractor in some Julia sets, something I think should be avoided Agreed. But, have you tried my implementation? It should be easy to turn it into the complex+real form that you have. I think a Newton fractal would be a good test for the formulas. If it gives you lines or something like that, as you said, the formulas are wrong...
|
|
« Last Edit: December 07, 2009, 10:25:34 AM by Paolo Bonzini »
|
Logged
|
|
|
|
David Makin
|
|
« Reply #42 on: December 07, 2009, 12:49:05 PM » |
|
Also using (0,0) for my normalised zri would make all (0,0,z)^p zero which in fractal terms would give us an infinite line (the z axis) as part of the attractor in some Julia sets, something I think should be avoided Agreed. But, have you tried my implementation? It should be easy to turn it into the complex+real form that you have. I think a Newton fractal would be a good test for the formulas. If it gives you lines or something like that, as you said, the formulas are wrong... The problem with your non-trig version is that it's based on a*a*a... rather than a^p - this is fine for integer powers but for non-integer powers we need the a^p version. Also I think the a^p version matches the trig version and the a*a*a.... doesn't. If you can come up with a method for a^p that matches the equivalent a*a*a..... (or vice-versa) then I think you'll have made a major breakthrough Also which actually matches your investigation into the exponent formula - the a^p or the a*a*a.... ? (I'm thinking that it's the a^p version
|
|
« Last Edit: December 07, 2009, 12:51:07 PM by David Makin »
|
Logged
|
|
|
|
Paolo Bonzini
Guest
|
|
« Reply #43 on: December 07, 2009, 01:38:12 PM » |
|
Also which actually matches your investigation into the exponent formula - the a^p or the a*a*a.... ? (I'm thinking that it's the a^p version If you compute a^n, it matches the spherical coordinates exponentiation formula. If you compute a*a*a, sometimes the first two components come out with the wrong signs (both of them). a^n is easy for zri=0: it is the same as raising a pure imaginary to a power: (0,0,a)^1 = (0,0,a) (0,0,a)^2 = (-a^2,0,0) (0,0,a)^3 = (0,0,-a^3) (0,0,a)^4 = (a^4,0,0) (0,0,a)^5 = (0,0,a^5) and so on. For zri not zero you can use Paul's formulas at the head of this topic.
|
|
|
Logged
|
|
|
|
|
|