MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Eye of Ra :ellipse_self_similar

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101377] Re: Eye of Ra :ellipse_self_similar
  • From: Roger Bagula <rlbagula at sbcglobal.net>
  • Date: Fri, 3 Jul 2009 05:40:07 -0400 (EDT)
  • References: <h2fe37$ppu$1@smc.vnet.net>

A cantor staircase standing wave fractal:
http://www.flickr.com/photos/fractalmusic/3682265002/
Mathematica:
Clear[f, dlst, pt, cr, ptlst, x, y]
(* phase locking Cantor staircase function : http : // \
mathworld.wolfram.com/DevilsStaircase.html*)
f0[{omega_, t_}] := {omega, t + omega - Sin[2Pi t]/(2Pi)};
WindingNumber[n_, {omega_, t_}] := (Nest[f0, {omega, t}, n][[2]] - t)/n;
dlst = Table[ Random[Integer, {1, 3}], {n, 100000}];
f[1, {x_, y_}] := N[ {2*x*y/(x2 + y2) , (y2 - x2)/(y2 + x2)}];
f[2, {x_, y_}] := N[ {WindingNumber[2, {y, x}], WindingNumber[2, {x, y}]}];
f[3, {x_, y_}] := N[ {-(y2 - x2)/(y2 + x2), 2*x*y/(x2 + y2) }];
pt = {0.5, 0.75};
cr[n_] := If[n - 1 == 0, RGBColor[0, 0, 1], If[n - 2 == 0,
     RGBColor[0, 1, 0], If[n - 3 == 0, RGBColor[1, 0, 0], RGBColor[0,
   0, 0]]]]
ptlst = Table[{cr[dlst[[j]]], Point[pt = f[dlst[[j]], Sequence[pt]]]},
  {j, Length[dlst]}];
Show[Graphics[Join[{PointSize[.001]}, ptlst]], AspectRatio -> Automatic, \
PlotRange -> All]

>  
>


  • Prev by Date: Re: questions on webmathematica
  • Next by Date: Re: NDSolve to solve a set of "loop" equations
  • Previous by thread: Eye of Ra :ellipse_self_similar
  • Next by thread: Re: Maximize returning approximate values