Draw spokes on a wheel
Dick Kriesel
dick.kriesel at mail.com
Fri Mar 17 16:37:37 EST 2006
On 3/17/06 10:26 AM, "Mark Talluto" <userev at canelasoftware.com> wrote:
> I need a little help drawing spokes to a wheel. This is actually
> used in a vision test. I have an image here to help illustrate the
> madness. I am sure someone like Jim Ault is shaking his head right
> now. <http://www.canelasoftware.com/pub/rev/astig.jpg>
>
> I have been using an image, but would like to offer the ability to
> adjust the line length and thickness. The new antialiasing feature
> will also be handy. Thanks for any input.
Here's another way to draw the spokes:
on drawAstig pInnerDiameter,pOuterDiameter,pLineSize
repeat with i = 0 to 345 step 15
create graphic
set the style of it to "oval"
set the height of it to pOuterDiameter
set the width of it to pOuterDiameter
set the angle of it to i
set the arcangle of it to 15
set the opaque of it to "true"
set the lineSize of it to pLineSize
end repeat
create graphic
set the style of it to "oval"
set the height of it to pInnerDiameter
set the width of it to pInnerDiameter
set the opaque of it to "true"
set the foregroundColor of it to "white"
create graphic
set the style of it to "oval"
set the height of it to pOuterDiameter+5
set the width of it to pOuterDiameter+5
set the foregroundColor of it to "white"
set the lineSize of it to pLineSize + 4
end drawAstig
Applying the hour numbers seems to require a different approach. If you use
turtle graphics, you can probably both draw the spokes and accurately
position label fields containing the hour numbers.
-- Dick
More information about the use-livecode
mailing list