Date: Apr 13, 2013 8:36 PM
Author: David Park
Subject: Re: Arranging disks (or any object for that matter) be
Clif,

The previous Presentations solution can be easily modified for this.

<< Presentations`

I scale the turtle down so it can walk basically on a unit circle.

turtleShape = {Darker[Green], Thickness[1/32],

Circle[{-1, .7}, .5, {8 Pi/6, 3 Pi/2}],

EdgeForm[Directive[Thick, White]], Disk[{1, 0}, .5, {0, Pi}],

Disk[{0, 0}, 1, {0, Pi}], Disk[{-.5, 0}, .25, {Pi, 2 Pi}],

Disk[{.5, 0}, .25, {Pi, 2 Pi}], White, Disk[{1.2, .3}, .04]} //

ScaleOp[1/5, {0, 0}];

This provides the dynamic, again with a completely fixed background. Each

turtle is rotated and then translated into position. I added a circle as a

base for the turtles, who are arrayed clockwise about the circle.

DynamicModule[{numDisks = 0, angle = 0},

pagelet[

phrase["Number of Disks:", Spacer[10],

SetterBar[

Dynamic[numDisks, (numDisks = #;

angle = -2 \[Pi]/Max[1, numDisks]) &], Range[0, 9]]],

Draw2D[

{{GrayLevel[0.5], ComplexCircle[0, 0.96]},

Dynamic@

Table[

turtleShape // RotateOp[(nn - 1) angle - \[Pi]/2, {0, 0}] //

TranslateOp[ToCoordinates[Exp[I (nn - 1) angle]]], {nn, 1,

numDisks}]},

PlotRange -> 1.5,

Background -> LightBrown,

ImageSize -> 500]

]

]

David Park

djmpark@comcast.net

http://home.comcast.net/~djmpark/index.html

From: Clif McInnis [mailto:c_mcinnis@hotmail.com]

Bob,

Thank you, that works very well. I am wondering if it is possible to put an

object in the place of the disk. I have a little turtle shape (the code

below)that I had tried to substitute for the line " Disk[{Cos[a], Sin[a]},

3/Max[8, n]]" which did not work out too well. My guess is that it would

work if I would assign the {x,y} values of the semi disk that makes the

shell to Cos[a],Sin[a] and then related the other parts of the shape to

those coordinates, however before I undertook that endeavor I thought that I

would just ask you to give me a yes/no answer as to whether it would even be

a possibility. Again Thank You for your help.

Sincerely -- Clifton McInnis

Graphics[{

Darker[Green], Thickness[1/32],

Circle[{-1, .7}, .5, {8 Pi/6, 3 Pi/2}],

EdgeForm[Directive[Thick, White]], Disk[{1, 0}, .5, {0, Pi}],

Disk[{0, 0}, 1, {0, Pi}], Disk[{-.5, 0}, .25, {Pi, 2 Pi}],

Disk[{.5, 0}, .25, {Pi, 2 Pi}], White, Disk[{1.2, .3}, .04]}]