Yertle the Turtle
Richmond Mathewson
richmondmathewson at gmail.com
Mon Jan 30 15:20:10 EST 2017
Having imported an SVG image of a tortoise into a stack . . .
Being a fan of Seymour Papert . . .
I thought I'd try and implement turtle graphics in Livecode.
But came up against something awkward . . .
[As a caveat, I should like to point out I don't know how the following
is implemented
in any other languages either]
1. Rotating my turtle widget is easy.
2. But telling the turtle to move forwards or backwards is not easy at all:
In LOGO one can tell the turtle to turn left by, say, 30 degrees, and
then move forward 20 units.
But in LiveCode, as far as I know, one can either move an object by
setting 2 coordinates,
or by 'set the loc'.
2.1. Now if I want my turtle, rotated at 30 degrees to move forward by
20 units I will have to mess
around with SINE and COSINE and probably not end up with the turtle
moving exactly 20 units at 30
degrees from the vertical.
2.2. I wonder how my turtle will be seen to draw a pen line from the two
ends of the "line".
Richmond.
More information about the use-livecode
mailing list