The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!

 Pages: 1 [2] 3 4 5   Go Down
 Author Topic: Glynn Julia set  (Read 28779 times) Description: 0 Members and 1 Guest are viewing this topic.
xenodreambuie
Conqueror

Posts: 124

 « Reply #15 on: October 29, 2009, 01:28:19 AM »

You might also want to check out Michael Becker's inverse Julia sets:
http://www.ijon.de/mathe/julia/some_julia_sets_1_en.html
http://www.ijon.de/mathe/julia/some_julia_sets_2_en.html
http://www.ijon.de/mathe/julia/some_julia_sets_3_en.html
http://www.ijon.de/mathe/julia/some_julia_sets_4_en.html

He is using an interesting hybrid method. I still am not sure exactly how it works, but I'll try to share it here if he grants permission.

Thanks Paul, there are some fascinating images there. Is it really an inverse method? Are all those formulas invertible? My guess from the explanation is that it is a forward iteration, calculating the divergence at each pixel by iterating several points with small delta. I'd love to be wrong, and hope we can get at least some clarification.

On the subject of MIIM, I've made quite a few changes for my purposes, so I could call it MMIIM. One is that I want it progressive instead of having a fixed cutoff, so I start with a small cutoff and increase it after every complete pass. This gives a better preview and arbitrary termination, more like the random inverse method in behaviour but with the improved completeness of MIIM.
 Logged

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

Posts: 122

 « Reply #16 on: October 29, 2009, 03:01:12 AM »

I restored the image in my previous post (my internet connection died while I was uploading the the post so the image didn't get loaded.)
 Logged
bugman
Conqueror

Posts: 122

 « Reply #17 on: October 29, 2009, 05:44:12 AM »

You might also want to check out Michael Becker's inverse Julia sets:
http://www.ijon.de/mathe/julia/some_julia_sets_1_en.html
http://www.ijon.de/mathe/julia/some_julia_sets_2_en.html
http://www.ijon.de/mathe/julia/some_julia_sets_3_en.html
http://www.ijon.de/mathe/julia/some_julia_sets_4_en.html

He is using an interesting hybrid method. I still am not sure exactly how it works, but I'll try to share it here if he grants permission.

Thanks Paul, there are some fascinating images there. Is it really an inverse method? Are all those formulas invertible? My guess from the explanation is that it is a forward iteration, calculating the divergence at each pixel by iterating several points with small delta. I'd love to be wrong, and hope we can get at least some clarification.

On the subject of MIIM, I've made quite a few changes for my purposes, so I could call it MMIIM. One is that I want it progressive instead of having a fixed cutoff, so I start with a small cutoff and increase it after every complete pass. This gives a better preview and arbitrary termination, more like the random inverse method in behaviour but with the improved completeness of MIIM.

Yes, they certainly are inverse; I was able to reproduce some of the images using the MIIM code.
 Logged
xenodreambuie
Conqueror

Posts: 124

 « Reply #18 on: October 30, 2009, 05:46:35 AM »

Yes, they certainly are inverse; I was able to reproduce some of the images using the MIIM code.

I guess with Mathematica you can find inverses to more of them than I previously thought.

From his description, I still think he's using a forward iteration method. It's a variation of Cauchy convergence, comparing iteration of z and z+epsilon. The trick is to map C to the Riemann sphere for the distance metric, so that points both inside and outside the set converge, while points sufficiently close to the set don't. Here's someone doing a similar thing but with more color:
http://de.wikipedia.org/wiki/Benutzer:Georg-Johann/Mathematik

Did you get the Glynn set working?
 Logged

Regards, Garth
http://xenodream.com
lycium
Fractal Supremo

Posts: 1158

 « Reply #19 on: October 30, 2009, 08:48:36 AM »

that is without doubt the most interesting fractal maths i've seen this year, thanks so much for linking garth!
 Logged

lycium
Fractal Supremo

Posts: 1158

 « Reply #20 on: October 30, 2009, 09:02:45 AM »

hmm, perhaps with a generalisation to 3d orbits (via quaternions?) we can finally get a distance estimator for arbitrary functions... looks like this would be the space in which the magic would happen: http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation#Quaternion_rotation_operations

if the cauchy series diverges, then one can use $\Sigma_n(p)$ as a measure of divergence, which could be used to bound the distance to the surface from $p$.
 « Last Edit: October 30, 2009, 09:06:32 AM by lycium » Logged

bugman
Conqueror

Posts: 122

 « Reply #21 on: November 03, 2009, 07:12:29 PM »

I was able to successfully reproduce 38 out of 43 of Michael Becker's Julia sets using the MIIM code. But I'm still getting some weird results for the Glynn set (see images below).

I don't yet understand this Cauchy method, but if it is a forward method, then can you also calculate the limit set of the 2D Mandelbrot set using this method?
 Glynn-automatic.jpg (33.82 KB, 276x276 - viewed 1933 times.)  Glynn-automatic-zoom.jpg (50.83 KB, 275x275 - viewed 1805 times.) Logged
xenodreambuie
Conqueror

Posts: 124

 « Reply #22 on: November 03, 2009, 11:48:42 PM »

I was able to successfully reproduce 38 out of 43 of Michael Becker's Julia sets using the MIIM code. But I'm still getting some weird results for the Glynn set (see images below).

I'm fairly sure it's the root checking. I was also getting variations on such circular patterns before I had Peter Liepa's test for root validity:
theta = theta + TWOPI*(branch - floor((theta+limit)/TWOPI)) ;
if (theta > -limit && theta < limit){
theta = theta/parmC ;
} else {
bNoRoot = TRUE ;
}
With that test I was able to get it working in standard chaos game, before even trying MIIM. I didn't recognize anything in the Mathematica code to handle that. No root just triggers backtracking.

Doing the math by hand I can only handle inverses up to cubics, unless they resolve nicely. I've implemented (z^n+c)/(z^n-c) and will try one or two cubics.

Quote
I don't yet understand this Cauchy method, but if it is a forward method, then can you also calculate the limit set of the 2D Mandelbrot set using this method?

I don't see any reason why not. Before I found that link, I did a quick test of the idea, without transforming to the Riemann sphere, for 2D quadratic Julia. It produced a good filled set, although it needs oversampling for antialiasing. The transformation is needed to separate both inside and outside from the set.
 Logged

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

Posts: 124

 « Reply #23 on: November 04, 2009, 01:34:55 AM »

hmm, perhaps with a generalisation to 3d orbits (via quaternions?) we can finally get a distance estimator for arbitrary functions...

It certainly would generalize to 3d, with a transformation to the 4d Riemann hypersphere (ie unit quaternions). It's such a cheap transformation too, apart from one arctan for the distance metric. I suppose the questions are whether the measure maps to a useful step for ray marching, and whether there's any issue with normalization to the particular function. While it gets rid of the need for a derivative of the function, it supposedly requires "equicontinuous" functions. I guess that means it has problems with something like an IFS, which has limitations with a traditional escape time method. But perhaps it would be possible to adapt an approach like the bounded tree distance estimation (ie Hart's method) to this.
 Logged

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

Posts: 122

 « Reply #24 on: November 04, 2009, 09:50:15 PM »

Thank you Garth. It works! I didn't think that complex roots could ever be invalid so I ignored that part of the code.

I may be the only Mathematica user here, but here's my corrected Mathematica code for the sake of posterity:

Pow[z_, n_, k_] := Module[{theta = Arg[z]}, theta = n(theta + 2Pi (k - Floor[(theta/Pi +Abs[1/n])/2])); If[Abs[theta] > Pi, Null, Abs[z]^n Exp[I theta]]];
power = 1.5; nroot = 3; zc = -0.2; zlist = {}; dzmax = 25.0; imax =1000; z = Table[-0.61, {imax}]; dz = Table[1, {imax}]; roots = Table[1, {imax}]; i = 2;
While[i > 1, z[[ i]] = Pow[z[[ i - 1]] - zc, 1/power, roots[[ i]] - 1]; If[z[[ i]] === Null, prune = True, dz[[ i]] = Abs[power]Abs[z[[ i]]]^(power - 1)dz[[ i - 1]]; zlist = Append[zlist, z[[ i]]]; prune = (i == imax || dz[[ i]] > dzmax)]; If[prune, While[i > 1 && roots[[ i]] == nroot, roots[[ i]] = 1; i--]; roots[[ i]]++, i++; roots[[ i]] = 1]];
ListPlot[{Re[ #], Im[ #]} & /@ zlist, PlotStyle -> PointSize[0.005], AspectRatio ->Automatic, Axes -> None]
 Glynn.jpg (14.02 KB, 280x280 - viewed 1806 times.)  Glynn-zoom.jpg (43.29 KB, 280x280 - viewed 2949 times.) « Last Edit: November 04, 2009, 11:17:15 PM by bugman » Logged
xenodreambuie
Conqueror

Posts: 124

 « Reply #25 on: November 05, 2009, 10:39:04 AM »

Thank you Garth. It works! I didn't think that complex roots could ever be invalid so I ignored that part of the code.

Cool! For integer powers there are N roots, but for fractional powers there are regions with one (?) fewer, because "you can't get there from here," or something to that effect. It makes sense as the way it transitions between integer powers, but was news to me too.
 Logged

Regards, Garth
http://xenodream.com
lycium
Fractal Supremo

Posts: 1158

 « Reply #26 on: November 05, 2009, 10:49:52 AM »

ahh, that does make sense! and explains the problems i had with my rational-exponent inverse-iteration back in 2006... i hope to revisit inverse iteration for polynomials sometime soon, perhaps this weekend. btw, i think you have excellent taste in choosing the conjugating (z^n + a) / (z^n + b) iteration as a basic transformation (or holon in xenodream parlance)

thanks again guys for all the great info in this thread that cauchy series approach is really cool and i hope to try it out before too long!
 Logged

bugman
Conqueror

Posts: 122

 « Reply #27 on: November 09, 2009, 12:34:32 AM »

Here is my first attempt at some simple Mathematica code for the Cauchy Convergence Algorithm (CCA). It's really slow:

f[ z_] := z^3 + zc; zc = -0.5 - 0.05 I;
d[ z_, w_] := 2ArcTan[ Abs[ (z Conjugate[ w] - Abs[ w]^2)/(z Conjugate[ w] + 1)]/Abs[ w]];
image = Table[ z = x + I y; w = z + 1.0*^-10; d[ z, w] + Sum[ z = f[ z]; w = f[ w]; d[ z, w], {18}], {y, -1.5, 1.5, 3.0/275}, {x, -1.5, 1.5, 3.0/275}];
ListDensityPlot[ Log[ image], Mesh -> False, Frame -> False]
 Julia3-CCA.jpg (43.45 KB, 280x280 - viewed 1823 times.) Logged
bugman
Conqueror

Posts: 122

 « Reply #28 on: November 18, 2009, 06:11:17 PM »

OK, well here are my first attempts to create 3D Glynn fractals using the triplex formulas. The first image is a slice that was ray traced using the escape time method. But it doesn't show any tree branch details so it's pretty boring. The other images are point clouds that were calculated using the MIIM method. Finding all the unique valid roots was a challenge. In general, I found that there are at least 2 roots when x < 0 and at least one root when x > 0. But there is also a strange conic section region containing 3 roots when z² > x² + y². It should also be noted that convergence is very sensitive to the initial seed value. I found the best results when the seed value is inside one of the cones of the conic section. But this only finds one half of the overall fractal. You can find the other half by placing the seed in the other cone, but I preferred to leave this part out, because it gives a nice cross-section so you can see inside the fractal. In these images c={-0.2,0,0}.

Here is some Mathematica code:
(* runtime: 15 seconds *)
power = 1.5; norm[x_] := x.x;
TriplexPow[{x_, y_, z_}, n_] := Module[{r = Sqrt[x^2 + y^2 + z^2], theta = n ArcTan[x, y], phi},phi = n ArcSin[z/r]; r^n{Cos[theta] Cos[phi], Sin[theta]Cos[phi], Sin[phi]}];
NumRootsGlynn[{x_, y_, z_}] := If[z^2 > x^2 + y^2, 3, If[x < 0, 2, 1]];
TriplexRootGlynn[{x_, y_, z_}, k_] := Module[{r = Sqrt[x^2 + y^2 + z^2], ktheta, kphi, theta, phi}, {ktheta, kphi} = If[k == 0, {0, 0}, If[z^2 > x^2 + y^2, If[k == 1, If[x <0 && y < 0, {2, 0}, {0.5, If[z > 0, 0.5, 2.5]}], If[x < 0 && y > 0, {1, 0}, {2.5, If[z > 0, 0.5, 2.5]}]], {If[y < 0,
2, 1], 0}]]; theta = (ArcTan[x, y] + ktheta Pi)/power; phi = (ArcSin[z/r] +kphi Pi)/power; r^(1/power){Cos[theta] Cos[phi], Sin[theta]Cos[phi], Sin[phi]}];
c = {-0.2, 0, 0}; imax = 100; dpmax = 50.0; p = Table[{-0.61, 0.0, -0.42}, {imax}]; dp = Table[1, {imax}]; roots = Table[0, {imax}]; plist = {}; i = 2;
While[i > 1 && Length[plist] < 10000, p[[ i]] = TriplexRootGlynn[p[[ i - 1]] - c, roots[[ i]]]; dp[[ i]] = Abs[power]Sqrt[norm[TriplexPow[p[[ i]], power - 1]]]dp[[ i - 1]];plist = Append[plist, p[[ i]]]; prune = (i == imax || dp[[ i]] > dpmax); If[prune, While[i > 1 && roots[[ i]] == NumRootsGlynn[p[[ i - 1]] - c] - 1, roots[[ i]] = 0; i--]; roots[[ i]]++, i++; roots[[ i]] = 0]];
Show[Graphics3D[{PointSize[0.005], Point /@ plist}]]

For those of you who don't use Mathematica, here is some C++ code:
//Glynn roots: {x,y,z}^(1/1.5) = {x,y,z}^(2/3)
int NumRootsGlynn(triplex p) { // finds number of branches for a given triplex p
bool cone=(sqr(p.z)>sqr(p.x)+sqr(p.y));
return (cone?3:(p.x<0.0?2:1));
}
triplex RootGlynn(triplex p, int k) {double n=1.5;
bool cone=(sqr(p.z)>sqr(p.x)+sqr(p.y)); double ktheta, kphi;
if(k==0) {ktheta=kphi=0.0;} else {
if(!cone) {ktheta=(p.y<0.0?2.0:1.0); kphi=0.0;} else {
if(k==1) {
if(p.x<0.0 && p.y<0.0) {ktheta=2.0; kphi=0.0;} else {ktheta=0.5; kphi=(p.z>0.0?0.5:2.5);}
}
else {
if(p.x<0.0 && p.y>0.0) {ktheta=1.0; kphi=0.0;} else {ktheta=2.5; kphi=(p.z>0.0?0.5:2.5);}
}
}
}
double r=abs(p), theta=(atan2(p.y,p.x)+ktheta*pi)/n, phi=(asin(p.z/r)+kphi*pi)/n;
double cosphi=cos(phi);
return pow(r,1.0/n)*triplex(cos(theta)*cosphi,sin(theta)*cosphi,sin(phi));
}
 Glynn3D.jpg (39.23 KB, 280x280 - viewed 1637 times.)  Glynn-Triplex-large.jpg (534.72 KB, 1024x768 - viewed 2059 times.)  Glynn-Triplex2-large.jpg (882.88 KB, 1024x768 - viewed 1801 times.) « Last Edit: January 01, 2010, 12:59:27 AM by bugman » Logged
gaston3d
Guest
 « Reply #29 on: December 18, 2009, 11:47:53 PM »

just testing formulas.
glynn set as heightmap is very ungrateful fractal to raytrace...
 biomorph-julia-120it-heightmap.jpg (50.75 KB, 400x300 - viewed 2758 times.) Logged
 Pages: 1 [2] 3 4 5   Go Down

 Related Topics Subject Started by Replies Views Last post Just another julia Images Showcase (Rate My Fractal) Unhooked 3 1694 May 19, 2010, 03:11:42 PM by Bent-Winged Angel burn buggy glynn Images Showcase (Rate My Fractal) yv3 0 1168 January 13, 2011, 08:23:40 PM by yv3 Did Julia know how a Julia set looked like? Mandelbrot & Julia Set bib 7 2483 February 11, 2013, 11:38:20 AM by bib Plaster Glynn fractal Images Showcase (Rate My Fractal) MichaelWGioffredi 1 821 August 28, 2015, 12:22:14 AM by Chillheimer Plaster Glynn fractal Mandelbulb3D Gallery MichaelWGioffredi 0 687 August 28, 2015, 08:24:03 PM by MichaelWGioffredi

 Dilber MC Theme by HarzeM
Page created in 0.165 seconds with 28 queries. (Pretty URLs adds 0.01s, 2q)