Automated Drawing
Richmond
richmondmathewson at gmail.com
Sat May 9 12:59:15 EDT 2015
On 09/05/15 16:52, Richmond wrote:
> On 21/03/15 18:17, Jim Hurley wrote:
>> Richmond,
>>
>> I wrote this Turtle Graphics library in the dark ages of RR, before
>> “sum” became a reserved word.
>>
>> So, comment out the “sum” handler in the stack script.
>>
>> Jim
>>
>
> Having copied your stack script across into my stack I am stuck with 2
> problems:
>
> 1. How to make the line to show as 'pd' [penDown] doesn't seem to work.
>
> 2. How to exchange your graphic "turtleGraphic" for an img.
>
> In all other respects the thing is super!
>
> Richmond.
Actually my "big" problem at the moment is, with this script:
on right dangl
rt dangl
end right
on rt dangl
subtract dangl from angl
drawTurtle
end rt
on drawTurtle
myWait waitTime
if noDraw then exit drawturtle
put 5 into distance
put round(x0 +x)&comma& round(-y+y0) & return into gPoints
put distance * cos(radPerDeg * angl) into dx
put dx into fld "dx"
put distance * sin(radPerDeg * angl) into dy
put dy into fld "dy"
put round(x+x0+dx)&comma&round(-y+y0-dy) after gPoints
set points of graphic "turtleGraphic" to gPoints
set the angle of img "turt" to ((the angle of img "turt") - angl)
end drawTurtle
with the graphic "turtleGraphic" and the img "turt" initially pointing
in the same direction,
why they don't go on pointing in the same direction everytime I send
"right 45" via the message box?
Richmond.
More information about the use-livecode
mailing list