MathGroup Archive 2006

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

Search the Archive

Re: circular infinity

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72211] Re: circular infinity
  • From: Yves Klett <yves.klett at googlemail.com>
  • Date: Thu, 14 Dec 2006 05:49:38 -0500 (EST)
  • Organization: Comp.Center (RUS), U of Stuttgart, FRG
  • References: <elotg7$pe2$1@smc.vnet.net>

Hi Eep,

a nice case for rule application and nesting (somewhat recursive):

splitcircle = c:Circle[{x_, y_}, r_] -> {c, Circle[{x, y - r/2}, r/2],
      Circle[{x, y + r/2}, r/2]};

c0 = Circle[{0, 0}, 1];

Show[Graphics[Nest[#1 /. splitcircle & , c0, 8]], AspectRatio -> Automatic,
    PlotRange -> All];


That saves a lot of typing, does it not...

Regards,
Yves

Eep² schrieb:
>  Hi, I'm trying to create the image at http://tnlc.com/eep/circles.html in Mathematica but I don't have much programming (or math) 
> experience and am wondering if anyone here could help me out. Here's what I have so far:
> 
>> Manual:
>>
>> Show[Graphics[{
>> Circle[{0, 0}, 2],
>>
>> Circle[{-1, 0}, 1], Circle[{1, 0}, 1],
>>
>> Circle[{-1.5, 0}, .5], Circle[{1.5, 0}, .5],
>> Circle[{-.5, 0}, .5], Circle[{.5, 0}, .5],
>>
>> Circle[{-1.75, 0}, .25], Circle[{-1.25, 0}, .25],
>> Circle[{-.75, 0}, .25], Circle[{-.25, 0}, .25], Circle[{.25, 0}, .25],
>> Circle[{.75, 0}, .25], Circle[{1.25, 0}, .25], Circle[{1.75, 0}, .25],
>>
>> Circle[{-1.875, 0}, .125], Circle[{-1.625, 0}, .125],
>> Circle[{-1.375, 0}, .125], Circle[{-1.125, 0}, .125],
>> Circle[{-.875, 0}, .125], Circle[{-.625, 0}, .125],
>> Circle[{-.3725, 0}, .125], Circle[{-.125, 0}, .125],
>> Circle[{.375, 0}, .125], Circle[{.625, 0}, .125],
>> Circle[{.875, 0}, .125], Circle[{.125, 0}, .125],
>> Circle[{1.125, 0}, .125], Circle[{1.375, 0}, .125],
>> Circle[{1.625, 0}, .125], Circle[{1.875, 0}, .125],
>>
>> Circle[{-1.9375, 0}, .0625], Circle[{-1.8125, 0}, .0625],
>> Circle[{-1.6875, 0}, .0625], Circle[{-1.5675, 0}, .0625],
>> Circle[{-.875, 0}, .0625], Circle[{-.625, 0}, .0625],
>> Circle[{-.3725, 0}, .0625], Circle[{-.125, 0}, .0625],
>> Circle[{.375, 0}, .0625], Circle[{.625, 0}, .0625],
>> Circle[{.875, 0}, .0625], Circle[{.125, 0}, .0625],
>> Circle[{1.5675, 0}, .0625], Circle[{1.6875, 0}, .0625],
>> Circle[{1.8125, 0}, .0625], Circle[{1.9375, 0}, .0625]
>> }], AspectRatio -> Automatic]
>> The last iteration needs spacing work still--I just got tired of writing it out manually...
>>
>> Based off the formula on http://local.wasp.uwa.edu.au/~pbourke/fractals/circles/ for POV-Ray:
>>
>> cx = 0;
>> cy = 0;
>> r = 1;
>>
>> SingleCircle = Show[
>>    Graphics[
>>        Circle[{cx, cy}, r]
>>    ]
>>    , AspectRatio -> Automatic
>> ];
>>
>> loopradius = 1;
>> nn = 1;
>> iterations = 1;
>>
>> While [
>>    (iterations < 8),
>>    loopradius = loopradius/2;
>>    nn = 2*nn;
>>    n = -(nn - 1);
>>
>>    While[n <= nn - 1,
>>        SingleCircle[{-n/nn, 0}, loopradius];
>>        n = n + 2;
>>        ]
>>    iterations = iterations + 1;
>> ]
>>
>> But it only ever renders a single outer circle. :/
>>
>> This fails with many errors:
>>
>> cx = 0;
>> cy = 0;
>> r = 1;
>>
>> SingleCircle = Show[
>>    Graphics[
>>        Circle[{cx, cy}, r]
>>    ], AspectRatio -> Automatic];
>>
>> while[r > 1/(1/16),
>>    cx=0 + r/2;
>>    r = r/2;
>>    SingleCircle[{cx, 0}, r];
>>    cx = 0 - r/2\;
>>    SingleCircle[{cx, 0}, r];
>> ]
>>
>> Any help would be appreciated. Thanks. 
> 


  • Prev by Date: REPOSTING:RE: REPOSTING: PowerTower extended to real exponents
  • Next by Date: Re: SphericalPlot3D in gray
  • Previous by thread: Re: circular infinity
  • Next by thread: Re: circular infinity