Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Mandelbrot & Julia Set => Topic started by: gamma on September 09, 2009, 06:00:31 PM




Title: Glynn Julia set
Post by: gamma on September 09, 2009, 06:00:31 PM
Hello everybody.   :D
I found a small, tiny piece of information that Glynn set
is a Julia set of (z = z^1.5 + c).

Try this one:
z = z^1.5 + 0.2

Now it looks like it is made of several fractal trees.
I wonder, are they really trees, beyond our first impression?
For example, Julia sets are quasi-self-similar and IFS fractals are exactly self-similar.
Is this tree similar to an IFS set?

http://www.efg2.com/Lab/FractalsAndChaos/GlynnFunction.htm


Title: Re: Glynn Julia set
Post by: gamma on September 09, 2009, 06:07:55 PM
Here's the parameter file so you be the judge...


Title: Re: Glynn Julia set
Post by: bib on September 09, 2009, 09:16:08 PM
Hello
I can't answer your question. Nevertheless I found this formula graphically interesting and I did this animation some months ago to test motion blur.

http://www.youtube.com/watch?v=yXgILclQXgY


Title: Re: Glynn Julia set
Post by: gamma on September 11, 2009, 08:58:02 PM
Great demo  ;)
Aren't there serial keys for old versions for free?

I have 3 interesting leads between the world of IFS fractals and Julia sets:

1. Barnsley tree (Cantor dust, um, no tree)
2. Glynn set (tree)
3. Sierpinski-curve-Julia sets in form of z^p + c/z^q (fat, curvy Sierpinski triangle)

...and lets not forget that for Newton sets we can design the fractal by positioning roots somewhere.


Title: Re: Glynn Julia set
Post by: xenodreambuie on September 13, 2009, 12:39:49 AM
I tried doing this formula with inverse iteration IFS, but I can't find the correct root handling to reproduce the set that forward iteration gives.
Since z = (z-c)2/3 has a rational exponent, the obvious solution has three roots, but it doesn't work. The closest I got was taking the first root and its conjugate, which isn't right either. Does anyone know what it should be?


Title: Re: Glynn Julia set
Post by: gamma on September 13, 2009, 11:50:14 PM
Good question, it seems someone successfully used the inverse iteration IFS method for Glynn and many other types!
http://www.brainjam.ca/fractals.html
He claims that we can draw anything into using the inverse iteration method. I am a little bit suspicious of that statement.
"the pictures are rendered using inverse iteration as opposed to escape time algorithms. As a result, only the limit sets themselves are shown, without the razzle dazzle of a surrounding color field"
In my experience, I saw articles where people had trouble with this belief. For example, random chaos game method never or rarely visits some areas of a fractal set. Then they have to tweak the algorithm to help it out by using set-specific mathematics.


Title: Re: Glynn Julia set
Post by: xenodreambuie on September 15, 2009, 12:02:53 PM
Gamma, that's a good collection of inverse iteration method (IIM) renders. He doesn't actually say you can draw anything with it, just that it's versatile.

The limit set is in principle an invariant that is the same rendered forward or inverse, since either direction always maps any point in the set to another point in the set. But inverse methods only work for functions that have inverses, which is not the general case. (Or for chaotic systems that are defined in the direction of the attractor to begin with.) There are variations on the IIM. I think the standard IIM is a deterministic tree of permutations of the roots to a sufficient depth to plot enough points. The modified IIM (MIIM) varies the depth, pruning branches to get a better coverage. It needs a hit count per pixel. I'm guessing this is what was used at brainjam.ca. Another option would be tuning the choices with Metropolis Hastings; Lycium's the expert on that.

The standard IIM and the standard chaos game both have the problem of not covering Julia sets well, except near c=0. As you mention, it can be tweaked with less random choices, and they do depend on the set and the quadrant of c. I've had some success with this from my own experiments, and found a few improvements this week. Do you have any links to articles about this? I'm probably reinventing the wheel, but if not then I can post what I've found.

Conceptually, a Julia set is just a nonlinear IFS with a transform for each root. If you consider an IFS as a linear part and an optional nonlinear part, then you have a kind of continuous parameter space (apart from changing formulas or other noncontinuous options.)

I think I've figured out the problem with the inverse Glynn set for c=-0.2. In the forward direction (escape time methods), the whole set is repulsive except for the three curls on the left, which form a feedback loop that creates the pattern, roughly between 2pi/3 and -2pi/3. For inverse methods, once a point leaves that region it is attracted to the point near 1.31 on the real line, with no way back. That's no problem for deterministic tree methods, but the chaos methods won't work without a modification to reseed from a repeller point on the left.


Title: Re: Glynn Julia set
Post by: gamma on September 15, 2009, 10:05:53 PM
If I can't answer your question, I can offer some muscle. I will see that brainjam guy and he will confess the algorithm or we will buy him out.  :angel1:
Quote
The standard IIM and the standard chaos game both have the problem of not covering Julia sets well, except near c=0. As you mention, it can be tweaked with less random choices, and they do depend on the set and the quadrant of c. I've had some success with this from my own experiments, and found a few improvements this week. Do you have any links to articles about this? I'm probably reinventing the wheel, but if not then I can post what I've found.

I did not read any GENERAL articles, but I saw specific problems solved by setting uneven probability to visit one of the equations calculated in each loop of an IFS algorithm.

Quote
I think I've figured out the problem with the inverse Glynn set for c=-0.2. In the forward direction (escape time methods), the whole set is repulsive except for the three curls on the left, which form a feedback loop that creates the pattern, roughly between 2pi/3 and -2pi/3. For inverse methods, once a point leaves that region it is attracted to the point near 1.31 on the real line, with no way back. That's no problem for deterministic tree methods, but the chaos methods won't work without a modification to reseed from a repeller point on the left.

How did you see that? By hand or in some program? I have Fractint in a sad state, in virtual machine to see the orbits, and David Makin wrote some orbit viewer for Ultrafractal (http://www.fractalforums.com/ultrafractal/how-to-use-ultrafractal-for-science/msg6589/#msg6589). Also I use Matlab, apparently in good faith of learning something.

Regardless of the approach, the fractal must be the same set as a static image. I haven't been working with inverse IFS much.

But, I noticed that Julia sets made with escape time algorithm possess some degree of self-similarity ranging from very complicated quasi-self similarity to more almost-exact self similarity. Some random formula could serve as an example for ugly quasi-similar Julia set, and simple Newton fractal tends to appear minimalistic and very straightforward repetitive.

The other topic of using IIM looks like a real play for analysis of properties of set.  


Title: Re: Glynn Julia set
Post by: xenodreambuie on September 16, 2009, 10:21:01 AM
Quote
How did you see that? By hand or in some program?

For this case I just thought about it, as it's easy to estimate where each point will iterate if you draw a unit circle over
the picture to help with the contraction/expansion factor.

For following orbits in z=z^2+c with various c, I used XenoDream with the coloring changed to show the root choice. Then I add a small sphere and move it around, and adjust its iteration limit to see the sequence. Or just set the limit to 2 or 3 and drag the sphere around for an interactive map.

For real(c)>0, the most important orbit is choosing the same root, especially the negative one.
For real(c)<0, the most important orbits have alternating roots. But what I recently discovered is that either trajectory stops if it crosses a quadrant boundary, and some improvement can be made by tracking quadrants to decide whether to alternate or choose randomly.


Title: Re: Glynn Julia set
Post by: David Makin on September 16, 2009, 11:00:29 AM
Hi, I contacted Peter Liepa about his method for inverse rendering of Glynn Sets etc. - he said it was OK to post his reply here:

Code:
Ok, here's a first cut.  tabs=4.  Even though there may be some 
rudimentary C++, this is mainly C.  This code is cobbled together from
various files.  Originally compiled for Win16, never ported to Win32.


I had a custom program that would send 'messages' to methods like this.  
FN_RUN is the one you're interested in.  To make inverse iteration work,
and to avoid most of the ISS-like set being sparse, you have to prune
iterations with a cumulative derivative that is too small.  That's what the
jtree stuff is all about.


I'm not sure whether anything of this is useful.  Your best bet would be to
get inverse iteration working to your satisfaction for the classic quadratic
Julia, and then work from there.  A Glynn set is just a Julia set for an
exponent other than 2.  Usually the exponent is fractional and between 1 and 2.


parmA,B,C,.. correspond to the numbers the pictures.


Good luck,


Peter


#define GLOBAL extern


GLOBAL HWND hWndDynamics ;
GLOBAL HWND hWndParticles ;
GLOBAL HWND hWndMain ; //cheat


GLOBAL double parmA ;
GLOBAL double parmB ;
GLOBAL double parmC ;
GLOBAL double parmD ;
GLOBAL double parmE ;
GLOBAL double parmF ;
GLOBAL double parmG ;
GLOBAL double parmH ;
GLOBAL double temperature ;
GLOBAL DWORD lifetime ;
GLOBAL DWORD joltPeriod ;
//GLOBAL double frequency ;
GLOBAL double x ;
GLOBAL double y ;
GLOBAL BOOL bGo ;
GLOBAL BOOL bBounded ;
const int MAX_DEPTH=1000 ;


class CTree {
public:
double x[MAX_DEPTH] ;
double y[MAX_DEPTH] ;
double dp[MAX_DEPTH] ;
int choice[MAX_DEPTH] ;
int index ;
private:
} ;


void glynn (int mode)
{
switch (mode){
case FN_RUN:
{
if (parmC==0.0) return ;
int branches = (int)ceil(fabs(parmC)) ;
// if cumulative derivative is larger than threshold, backtrack
if (jtree.dp[jtree.index] > cutoff || jtree.index > MAX_DEPTH-2){
for ( ; ; ){
jtree.choice[jtree.index] = 0 ;
jtree.index-- ;
if (jtree.index==0){
jtree.choice[0] = (jtree.choice[0]+1)%branches ;
break ;
}
if (jtree.choice[jtree.index] < branches-1){
jtree.choice[jtree.index]++ ;
break ;
}
}
}
double xt = jtree.x[jtree.index] - parmA ;
double yt = jtree.y[jtree.index] - parmB ;
double r = pow (::sqrt (xt*xt+yt*yt), 1.0/parmC) ;
double theta  = atan2 (yt,xt) ;
BOOL bNoRoot = FALSE ;
int branch = jtree.choice[jtree.index] ;
double limit = fabs(parmC)*PI ;
theta = theta + TWOPI*(branch - floor((theta+limit)/TWOPI)) ;
if (theta > -limit && theta < limit){
theta = theta/parmC ;
} else {
bNoRoot = TRUE ;
}


if (bNoRoot){
// don't need to assign x, y - just use existing values
jtree.index++ ;
assert(jtree.index<MAX_DEPTH) ;
jtree.dp[jtree.index] = 2.0*cutoff ;
} else {
x = r*cos(theta) ;
y = r*sin(theta) ;
jtree.index++ ;
assert(jtree.index<MAX_DEPTH) ;
jtree.x[jtree.index] = x ;
jtree.y[jtree.index] = y ;
jtree.dp[jtree.index] =
  fabs(parmC)*pow(::sqrt(x*x+y*y),parmC-1.0)*jtree.dp[jtree.index-1];
}
}
break ;
case FN_RESET:
{
//jtree.x[0] = -1 ; jtree.y[0] = y ; jtree.index = 0 ; jtree.dp[0]=1.0;
jtree.x[0] = -1 ; jtree.y[0] = 0 ; jtree.index = 0 ; jtree.dp[0]=1.0;
for (int i = 0; i<MAX_DEPTH; i++){jtree.choice[i]=0 ; }
}
break ;
case FN_UPDATEPARM:
  cutoff = pow (10.0, max(parmD, 0.0)) ;
dynamics (FN_RESET) ;
break ;
case FN_INIT:
joltPeriod = lifetime = 100 ; temperature = .0 ;
parmA = -0.74543 ; parmB = 0.11301 ; parmC = 2.0 ; parmD=10.0 ;
dynamics (FN_UPDATEPARM) ;
x = y = 0.0 ;
break ;
}
}

In a follow-up reply he added:

----------------------
The sentence

"To make inverse iteration work, and to avoid most of the ISS-like set being sparse, you have to prune iterations with a cumulative derivative that is too small."

was carelessly written.  Better would be:

"To make inverse iteration work, and to avoid most of the IFS-like set being sparse, you have to prune branches of the tree where the cumulative derivative gets below a small threshold - i.e. where the map is highly contractive.  This is just the MIIM method talked about in 'The Science of Fractal Images'"
----------------------


Title: Re: Glynn Julia set
Post by: xenodreambuie on September 18, 2009, 02:10:44 PM
Excellent, Dave! Thanks for that info. With the correct formula for testing root validity, the standard chaos method works, but I was right about it needing reseeding. It also has very poor coverage by default. I was able to get fair results by boosting the runs of same and alternating choices, but less satisfactory than for the quadratic Julia.

Peter's version of MIIM using contractivity is more practical than what I read about using pixel hit counts.


Title: Re: Glynn Julia set
Post by: David Makin on September 19, 2009, 12:44:26 AM
I never really investigated rendering outlines of Julias using this method but the idea of simply pruning a deterministic IFS tree based on #hits sounded interesting (and easy), so I had a go:

http://www.fractalforums.com/gallery/?sa=view;id=920 (http://www.fractalforums.com/gallery/?sa=view;id=920)


Title: Re: Glynn Julia set
Post by: bugman on October 28, 2009, 08:33:04 PM
Excellent, Dave! Thanks for that info. With the correct formula for testing root validity, the standard chaos method works, but I was right about it needing reseeding. It also has very poor coverage by default. I was able to get fair results by boosting the runs of same and alternating choices, but less satisfactory than for the quadratic Julia.

Peter's version of MIIM using contractivity is more practical than what I read about using pixel hit counts.

I used Peter Liepa's source code to write the following short Mathematica program. It seems to be working correctly:
imax = 100; z = Table[0, {imax}]; dz = Table[1, {imax}]; roots = Table[1, {imax}];
power = 2; zc = -0.74543 + 0.11301I; x1 = -1.5; y1 = -1.5; x2 = 1.5; y2 = 1.5; n = 275; image = Table[0, {n}, {n}]; i = 2;
While[i > 1, z[[ i ]] = If[roots[[ i ]] == 1, 1, -1]Sqrt[z[[i - 1]] - zc]; dz[[ i ]] = power Abs[z[[ i ]]]^(power - 1)dz[[i - 1]]; {x, y} = Round[n {(Re[z[[ i ]]] - x1)/(x2 - x1), (Im[z[[ i ]]] - y1)/(y2 - y1)}]; If[1 <= x <= n && 1 <= y <= n, image[[y, x]] = 1]; If[i < imax && dz[[ i ]] < 1000.0, i++; roots[[ i ]] =1, While[i > 1 && roots[[ i ]] == power, roots[[ i ]] =1; i--]; roots[[ i ]]++]];
ListDensityPlot[image, Mesh -> False, Frame -> False]

I tried to modify the code to create a Glynn Julia set but unfortunately I don't think it looks right (see image below):
CPow[z_, n_, k_] := Module[{theta = n(Arg[z] + 2Pi k)}, Abs[z]^n(Cos[theta] + I Sin[theta])];
imax = 1000; z = Table[0, {imax}]; dz = Table[1, {imax}]; roots = Table[1, {imax}];
power = 1.5; zc = -0.2; nroot = 3; n = 275; image = Table[0, {n}, {n}];
{x1, y1} = {-1.5, -1.5}; {x2, y2} = {1.5, 1.5}; i = 2; count = 0;
While[i > 1 && count < 500000, z[[ i ]] = CPow[z[[ i - 1]] - zc, 1/power, roots[[ i ]] - 1]; dz[[ i ]] = Abs[power]Abs[z[[ i ]]]^(power - 1)dz[[ i - 1]]; If[i < imax && dz[[ i ]] < 1.0*^10, i++; roots[[ i ]] = 1, {x, y} = Round[n {(Re[z[[ i ]]] - x1)/(x2 - x1), (Im[z[[ i ]]] - y1)/(y2 - y1)}]; If[1 <= x <= n && 1 <= y <= n, image[[y, x]]++]; While[i > 1 && roots[[ i ]] == nroot, roots[[ i ]] = 1; i--]; roots[[ i ]]++]; count++];
ListDensityPlot[Map[If[ # == 0, -1, Log[ # ]] &, image, {2}], Mesh -> False, Frame -> False, PlotRange -> {-1, 8}]

Do you have any thoughts about what I am doing wrong here?


Title: Re: Glynn Julia set
Post by: bugman on October 28, 2009, 08:34:16 PM
Excellent, Dave! Thanks for that info. With the correct formula for testing root validity, the standard chaos method works, but I was right about it needing reseeding. It also has very poor coverage by default. I was able to get fair results by boosting the runs of same and alternating choices, but less satisfactory than for the quadratic Julia.

Peter's version of MIIM using contractivity is more practical than what I read about using pixel hit counts.


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.


Title: Re: Glynn Julia set
Post by: xenodreambuie on October 28, 2009, 11:48:21 PM
I tried to modify the code to create a Glynn Julia set but unfortunately I don't think it looks right (see image below):

I don't see an image, and I don't use Mathematica, but I can guess. For fractional powers, checking the validity of roots is crucial, and for power less than 2 the seed point is also crucial. The number of branches is ceil(abs(power)), and the validity has to be checked for each point.

A seed of (-1,0) works, but (-0.61,0) is much cleaner. I don't know if there's a way to calculate optimal seeds for abitrary powers (or arbitrary functions in general), so I've found it useful to add the ability to adjust the seed interactively. I had fun searching for stable sets with power -1.2.


Title: Re: Glynn Julia set
Post by: xenodreambuie 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.


Title: Re: Glynn Julia set
Post by: bugman 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.)


Title: Re: Glynn Julia set
Post by: bugman 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.


Title: Re: Glynn Julia set
Post by: xenodreambuie 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 (http://de.wikipedia.org/wiki/Benutzer:Georg-Johann/Mathematik)

Did you get the Glynn set working?


Title: Re: Glynn Julia set
Post by: lycium 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!


Title: Re: Glynn Julia set
Post by: lycium 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.


Title: Re: Glynn Julia set
Post by: bugman 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?


Title: Re: Glynn Julia set
Post by: xenodreambuie 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.


Title: Re: Glynn Julia set
Post by: xenodreambuie 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.


Title: Re: Glynn Julia set
Post by: bugman 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]


Title: Re: Glynn Julia set
Post by: xenodreambuie 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.


Title: Re: Glynn Julia set
Post by: lycium 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)  ;D

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!


Title: Re: Glynn Julia set
Post by: bugman 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]


Title: Re: Glynn Julia set
Post by: bugman 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));
}


Title: Re: Glynn Julia set
Post by: gaston3d on December 18, 2009, 11:47:53 PM

just testing formulas.
glynn set as heightmap is very ungrateful fractal to raytrace...


Title: Re: Glynn Julia set
Post by: David Makin on December 19, 2009, 12:50:34 AM
OK, well here are my first attempts to create 3D Glynn fractals using the triplex formulas.

Nice work !


Title: Re: Glynn Julia set
Post by: David Makin on December 19, 2009, 12:52:45 AM

just testing formulas.
glynn set as heightmap is very ungrateful fractal to raytrace...


Is that raytraced using a distance estimator method ? I don't mean that the heights are 2D distance estimates, I mean were the distances to step along the rays distance estimated ?


Title: Re: Glynn Julia set
Post by: cKleinhuis on December 19, 2009, 12:54:13 AM
ehrm, anyone interested in my glynn julia 3d heightmap interpretation made with mutatorkammer ?

http://www.fractalforums.com/?action=gallery&sa=view;id=2

 O0


Title: Re: Glynn Julia set
Post by: gaston3d on December 27, 2009, 09:59:10 PM

Is that raytraced using a distance estimator method ? I don't mean that the heights are 2D distance estimates, I mean were the distances to step along the rays distance estimated ?

no, it's rendered using standard (fixed step) raytracing.
i've seen in lots of posts DE methods are speeding up rendering, but i do not fully understand them.
could you post some links to article/tutorial where distance estimation method is described for mandelbrot/julia sets in complex numbers?
is it a generic method or specific only for iterated mandelbrot-like fractals?


Title: Re: Glynn Julia set
Post by: David Makin on December 28, 2009, 02:36:51 PM

Is that raytraced using a distance estimator method ? I don't mean that the heights are 2D distance estimates, I mean were the distances to step along the rays distance estimated ?

no, it's rendered using standard (fixed step) raytracing.
i've seen in lots of posts DE methods are speeding up rendering, but i do not fully understand them.
could you post some links to article/tutorial where distance estimation method is described for mandelbrot/julia sets in complex numbers?
is it a generic method or specific only for iterated mandelbrot-like fractals?


See:

http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8505/#msg8505 (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8505/#msg8505)

Note that the only difference between the analytical DE for Julias as compared to Mandelbrots (where the constant is simply added to the iterate as in z^2+constant) is that you add 1 to the DE value on each iteration for the Mandelbrots but don't add 1 for the Julias.

And for my "delta DE" i.e. distance estimation using a numerical method (which is the one I adapted for doing heightfields):

http://www.fractalforums.com/mandelbulb-implementation/mandelbulb-ray-tracing-plugin-for-photoshop-aftereffects-and-quartzcomposer/msg10178/#msg10178 (http://www.fractalforums.com/mandelbulb-implementation/mandelbulb-ray-tracing-plugin-for-photoshop-aftereffects-and-quartzcomposer/msg10178/#msg10178)

For doing heightfields I essentially got the height of the step position on the ray above the fractal surface (as defined by whichever colouring algorithm you use) and the height above the surface at a very small distance further along the ray.


Title: Re: Glynn Julia set
Post by: fractalrebel on December 31, 2009, 09:02:05 PM
What was the date on which Earl Glynn first described his Julia set? I ask the question because I had not heard of the Glynn Julia set by that name until I saw this thread. I created a fractal image back around 1998-99 that was used in a couple of art contests (which it won in one of them) and have sold the image for some posters and as a cover for a magazine on neurochemistry. The image was created using the julia fractal

z -> z^1.5 - 0.2



Title: Re: Glynn Julia set
Post by: fractalrebel on December 31, 2009, 09:10:47 PM
What was the date on which Earl Glynn first described his Julia set? I ask the question because I had not heard of the Glynn Julia set by that name until I saw this thread. I created a fractal image back around 1998-99 that was used in a couple of art contests (which it won in one of them) and have sold the image for some posters and as a cover for a magazine on neurochemistry. The image was created using the julia fractal

z -> z^1.5 - 0.2



Here is my 1998-1999 image. It was created in 1998 and entered in the art contests in 1999:


Title: Re: Glynn Julia set
Post by: David Makin on December 31, 2009, 09:14:25 PM
Here is my 1998-1999 image. It was created in 1998 and entered in the art contests in 1999:

I remember that well, I saw it fairly soon after I discovered Fractint for the first time :)


Title: Re: Glynn Julia set
Post by: bugman on January 01, 2010, 01:02:19 AM
I just updated my 3D Glynn renderings in my previous post here:
http://www.fractalforums.com/mandelbrot-and-julia-set/glynn-julia-set/msg8706/#msg8706

I also added some Mathematica code as well as a little C++ code to demonstrate the method.


Title: Re: Glynn Julia set
Post by: Nahee_Enterprises on January 03, 2010, 02:00:09 AM
Here is my 1998-1999 image.  It was created in 1998 and entered in the art contests in 1999.

I always did like all of your older images.  They are "classic" in many ways!!!     :)

Glad to see you recycling them in this Forum.


Title: Re: Glynn Julia set
Post by: gaston3d on January 04, 2010, 12:16:35 AM
What was the date on which Earl Glynn first described his Julia set? I ask the question because I had not heard of the Glynn Julia set by that name until I saw this thread. I created a fractal image back around 1998-99 that was used in a couple of art contests (which it won in one of them) and have sold the image for some posters and as a cover for a magazine on neurochemistry. The image was created using the julia fractal

it seems that Earl Glynn described his set at Eurographics '91 conference, however Clifford Pickover was the first one who used name 'Glynn Function' in one of his books.
Glynn himself uses name 'Fractal Biomorph', see: Glynn Function Study Center (http://www.efg2.com/Lab/FractalsAndChaos/GlynnFunction.htm).

must admit that Biomorph heightmap rendering by Ramiro Perez (bottom of Glynn's page) later inspired me to 3d fractals and raytracing in general.
i was in high school then (late 90's) and even didn't know how to rise complex to fractional number ;) :nostalgia:


Title: Re: Glynn Julia set
Post by: JosLeys on January 05, 2010, 11:30:11 PM
While looking for Glynn fractal patterns using the different variations of the spherical coordinate formulas, I stumbled on an interesting shape while using Garth Thornton's variation. See the images below. The last one is a slice.

So this is for z^1.5-0.2..


Title: Re: Glynn Julia set
Post by: kram1032 on January 05, 2010, 11:40:39 PM
now that must be the ultimate celtic knot lol

Looks amazing :D


Title: Re: Glynn Julia set
Post by: gaston3d on January 05, 2010, 11:52:57 PM

possibilities are infinite... and undiscovered :nerd:

fractal of the month?


Title: Re: Glynn Julia set
Post by: BradC on January 06, 2010, 12:02:51 AM
Yeah, wow that totally looks woven!


Title: Re: Glynn Julia set
Post by: bugman on January 06, 2010, 12:42:50 AM
Did you use an orbit trap to get the weaved effect? I am getting a rather boring looking thing when I use the cosine formula.

It would be interesting to see the inside. Can you render a slice showing half of the fractal so we can see the inside?


Title: Re: Glynn Julia set
Post by: JosLeys on January 06, 2010, 12:49:41 AM
No orbit trap.
The fourth image I posted is the slice.


Title: Re: Glynn Julia set
Post by: bugman on January 06, 2010, 04:02:27 AM
I am curious to see if you get something different from me using the sine version of the formula.


Title: Re: Glynn Julia set
Post by: JosLeys on January 06, 2010, 08:38:21 AM
The sine version gives this:


Title: Re: Glynn Julia set
Post by: kram1032 on January 06, 2010, 10:39:46 AM
Also nice but noisy :)

The knot-one surprises with rather simple hyperbolic-ish knot-like geometry :)


Title: Re: Glynn Julia set
Post by: Nahee_Enterprises on January 06, 2010, 12:54:09 PM
While looking for Glynn fractal patterns using the different variations of
the spherical coordinate formulas, I stumbled on an interesting shape
while using Garth Thornton's variation.  See the images below.  The last
one is a slice.  So this is for z^1.5-0.2..

Very nice and quite interesting!!!     :)

The inside view was a bit surprising in some ways.


Title: Re: Glynn Julia set
Post by: Nahee_Enterprises on January 06, 2010, 01:01:39 PM
The sine version gives this:

Reminds me of the underside of a "Megalopyge opercularis" (or "Asp" as we always call them in Texas).
 


Title: Re: Glynn Julia set
Post by: matsoljare on January 06, 2010, 09:36:44 PM
(http://www.fractalforums.com/mandelbrot-and-julia-set/glynn-julia-set/?action=dlattach;attach=1215;image)

Very interesting, try some other values for that formula!


Title: Re: Glynn Julia set
Post by: JosLeys on January 07, 2010, 12:13:11 AM
Well here is the Julia for <-.22,0,0>
Could somebody try reproducing this to make sure I do not have some stupid error somewhere?


Title: Re: Glynn Julia set
Post by: David Makin on January 07, 2010, 01:22:15 AM
Well here is the Julia for <-.22,0,0>
Could somebody try reproducing this to make sure I do not have some stupid error somewhere?

Looks correct to me Jos.
Am not posting my rendered version - I can't be bothered waiting for the render to finish, it's so sloooow :)


Title: Re: Glynn Julia set
Post by: Nahee_Enterprises on January 08, 2010, 05:28:45 PM
Well here is the Julia for <-.22,0,0>
Could somebody try reproducing this to make sure I do not have some stupid error somewhere?

Ahhh!!!  The skeletal view of this organism, without the fleshy parts.    ;)


Title: Re: Glynn Julia set
Post by: Nahee_Enterprises on January 08, 2010, 05:31:17 PM
Well here is the Julia for <-.22,0,0>
Could somebody try reproducing this to make sure I do not
have some stupid error somewhere?

Looks correct to me Jos.
Am not posting my rendered version - I can't be bothered
waiting for the render to finish, it's so sloooow   :)

And what if you both made the same (or similar errors) ??    :evil1:


Title: Re: Glynn Julia set
Post by: xenodreambuie on January 30, 2010, 02:26:49 AM
Jos and/or David, can you clarify whether this cosine version is the flipped or correct one? Ie any parity additions? It is a beauty, and I haven't managed to reproduce it using inverse iteration. It also seems surprising for one with cosine phi to be symmetric in Z with a fractional power, instead of having a similar kind of asymmetry along X and Z.

I had no difficulty in reproducing the sine version with MIIM. It works with independent roots for theta and phi, with one or two each.


Title: Re: Glynn Julia set
Post by: bugman on January 30, 2010, 07:10:44 AM
I also haven't been able to reproduce the cosine Glynn with MIIM. This is the formula I used:

{x,y,z}^(1/1.5) = r^(1/1.5)*{cos(theta)*sin(phi),sin(theta)*sin(phi),cos(phi)}
where r = sqrt(x²+y²+z²), theta = (atan2(y,x)+ktheta*pi)/1.5, phi = (acos(z/r)+kphi*pi)/1.5;

I always find one valid root when ktheta = kphi = 0. If z>0 and x>0 then that is the only valid root I find.

If z>0 and x<0 then I find another valid root when ktheta = (y<0?2:1), kphi = 0.

If z<0 then I find two other valid roots when ktheta=((x<0 && y<0)?2:0.5), kphi=((x<0 && y<0)?0:1)
and when ktheta=((x<0 && y>0)?1:2.5), kphi=((x<0 && y>0)?0:1).


Title: Re: Glynn Julia set
Post by: JosLeys on January 30, 2010, 10:29:25 AM
I think you call this formula the 'flipped' one :
Code:
z= (R^(@pow/2))*sin(@pow*ph)*exp(i*@pow*th)+c1
   zz=(R^(@pow/2))*cos(@pow*ph)+cz
     R=(|z|+zz*zz)
     th=atan2(z)
     ph=atan2(zz+i*cabs(z))
     if ph>=#pi/2,ph=#pi-ph,endif


Title: Re: Glynn Julia set
Post by: David Makin on January 30, 2010, 03:10:39 PM
I think you call this formula the 'flipped' one :
Code:
z= (R^(@pow/2))*sin(@pow*ph)*exp(i*@pow*th)+c1
   zz=(R^(@pow/2))*cos(@pow*ph)+cz
     R=(|z|+zz*zz)
     th=atan2(z)
     ph=atan2(zz+i*cabs(z))
     if ph>=#pi/2,ph=#pi-ph,endif

Yea - the one with the adjustment to phi :)


Title: Re: Glynn Julia set
Post by: xenodreambuie on January 30, 2010, 11:46:20 PM
I think you call this formula the 'flipped' one :
Code:
z= (R^(@pow/2))*sin(@pow*ph)*exp(i*@pow*th)+c1
   zz=(R^(@pow/2))*cos(@pow*ph)+cz
     R=(|z|+zz*zz)
     th=atan2(z)
     ph=atan2(zz+i*cabs(z))
     if ph>=#pi/2,ph=#pi-ph,endif

Thanks Jos. Yes, that is the 'flipped' version.
To recap, the reason for the parity changes in some versions is to get equivalence between forward and inverse iteration for a given formula, which is necessary due to phi giving a double cover when iterated beyond 0 to pi.
The usual forward iterations have no parity change (of course), and to reproduce them using MIIM we have to add some parity change in the inverse method.
This flipped version originally resulted from a cosine phi inverse iteration without any parity, which turned out to be often more interesting than the one with correct roots. To duplicate it in forward iteration requires a parity change there instead.

However, that simple parity formula is only "correct" for integer powers, so you've discovered another useful mutation. If you haven't already tried it without the parity change to phi, that would give the "true" cosine version, which should be asymmetric. I haven't figured out how to reproduce this flipped Glynn inversely.


Title: Re: Glynn Julia set
Post by: xenodreambuie on January 31, 2010, 12:00:56 PM
I have solved it, sort of. The actual inverse of Jos's formula is simple, but it has a major flaw. It has two disjoint orbits, so it needs two different seed points to produce the complete image. That's very inconvenient because it needs a modification of the MIIM routine, and also to choose two good seeds for a given set of parameters. I currently adjust a seed interactively, and to do two that way would get painful. The picture below is one of the orbits for (-0.1,0,0), which shows the patchwork pattern more clearly. The best seed points are in one of the big patches on the left. I'm guessing that deducing a formula for ideal seeds depending on parameters is difficult. Another possibility is if there is some mapping between the two orbits that could be used like an extra root choice.

The partial formula I used is:
// two roots each for phi, theta: kphi, ktheta = 0 or 1
power = 1.5
Rootlimit = 1.5pi
theta = arctan2(y,x) + 2pi*(ktheta - floor((theta+rootlimit)/2pi))
if abs(theta)<rootlimit then
  phi = arccos(z/r)
  if phi>0.75pi then phi = pi - phi
  phi = phi/power
  if kphi>0 then phi = pi - phi
  theta = theta/power
  r = r^(1/power)
  ... (standard calculations from r,theta,phi)
else // root not valid