Draw spokes on a wheel

Dick Kriesel dick.kriesel at mail.com
Fri Mar 17 21:32:17 EST 2006


On 3/17/06 2:24 PM, "Mark Talluto" <userev at canelasoftware.com> wrote:

> One things is for sure, I owe each of you a drink of your choice at the RevCon
> in Monterey this year.

With positive reinforcement like that, I'll do even better:

on mouseUp
  drawAstig 50,200,225,2
end mouseUp

on drawAstig pSpokeRadiusInner,pSpokeRadiusOuter,pLabelRadius,pLineSize
  go url "http://home.infostations.net/jhurley/StopTurtles.rev"
  start using stack "stopTurtles" -- note: thanks, Jim Hurley
  create stack
  set the width of it to 600
  set the height of it to 600
  go to it
  lock screen
  set the textSize of the templateField to 16
  set the margins of the templateField to 1,7,0,0
  startTurtle
  setH 75 -- note: set heading
  repeat with i = 1 to 24
    penUp
    forward pSpokeRadiusInner
    penDown
    forward pSpokeRadiusOuter - pSpokeRadiusInner
    penUp
    if i mod 2 = 0 then
      forward pLabelRadius - pSpokeRadiusOuter
      label i div 2
      set the width of last field to the formattedWidth of last field
      set the height of last field to the formattedHeight of last field
      back pLabelRadius
    else
      back pSpokeRadiusOuter
    end if
    right 15
  end repeat
  stopTurtle
  set the lineSize of last graphic to pLineSize
  unlock screen
end drawAstig

RevConWest is sounding better and better...

-- Dick





More information about the Use-livecode mailing list