Help
Here is a short overview of the main commands
fd N : go forward N pixels
rt N : right turn N degrees
lt N : left turn N degrees
bk N : go backward N pixels
pu : pen up
pd : pen down
st : show turtle
ht : hide turtle
cs : clean screen and go back to initial position
clean: clean screen but don't change the turtle position
repeat N [ ] : repeat N times the commands inside the brackets
if condition [ ] : execute the commands insied the barckets if the condition (2>1 for example) is true
ifelse condition [ ] [ ] : execute the 1st bracket if the condition is true or the 2n if not.
to myfct :x end : create a function with the name myfct, one argument :x and the code uo to the keyword end
setpc color : set pen color by name or RGB code (#ff00ff)
fcfg color : set background color by name or RGB code (#ff00ff)
New
setpw width : set pen width (in pixels)
save function : store a function (created with the for command) on the server. This can be restored for future use.
load function : restore a function from the server (stored with the save command)
home : go back to the original position
setpos x y : move the turtle to the position corresponding tp x and y coordinates (in pixels)
seth N : set absolute value in degrees for the turtle direction.
pos : display the current position coordinates
heading : display the current direction in degrees
fence : the turtle can not move outside the zone
windows : the turtle can move outside the zone
echo N: display the computed value (echo rc!2)
Operators
Note: text operator taking an argument, the operator and the argument must be separated by the '!' character. For example cos!90
common : + - / * < <= >= > =
difference : <>
integer division : //, %
booleans : and or not
power : ^ (3^2 returns 9)
square root : sqr (rc!4 returns 2)
trigonometry : pi sin cos acos atan tan
random:N : returns a romdom number between 0 and n-1
misc : log, log10, exp, abs
