[This is preliminary documentation and subject to change]
Liogo can't be a Logo without Turtle Graphic. So Liogo comes with the most famous commands and operations from the Logo world.
The Logo turtle is an image or a triangle facing to the turtle heading. At first, turtle is facing north and is set to 0,0 on the mathematical axis. Two main commands are used to move the turtle: "forward N" to move forward turtle to N steps and "back N" to move back turtle to N steps. "left" and "right" are used to change the turtle heading from an angle in degree. Let's see an academic sample:
repeat 4 [ forward 100 right 90 ] |
Here is the command line to build this sample (called "square.lgo" ;-) and
launch it (use "mono square.exe" on Linux)
(Note that when you want build an EXE using graphics, you need to use
"/t:winexe" option with LIOGOC).
Here is the output Window:
Lot of famous developers had wrote nice drawing using just these few commands. I take two sample from Daniel Ajoy and David Costanzo:
to polygon :n :size repeat :n [ forward :size right 360 / :n ] end to house polygon 4 100 forward 100 right 30 polygon 3 100 end house |
TO COLORBALL REPEAT 4 [ SETPENCOLOR REPCOUNT REPEAT 120 [ FORWARD REPCOUNT * 2 RIGHT 204 ] HOME RIGHT 90 * REPCOUNT ] END COLORBALL |
A full list of graphics command and operation in Liogo are listed here
LIOGO - GPL Copyright (c) 2005-2006 Lionel Laské