Where is the web version?
You can launch the web version via https://turtlespaces.org/weblogo/ — but please give it a minute to load!
Why learn / teach Logo?
How do I open the example turtleSpaces?
First, enter the catalogue by typing either cat and pressing return, or control-shift-`
Use the cursor keys to move to the examples folder and press return.
Use the cursor keys to move to the example you wish to load and press return.
Some turtleSpaces have an .autorun procedure that auto-starts the example, while some need you to start them manually. Open the editor (by typing ed or control-shift-e) and browse through the code using the cursor keys (shift-up and shift-down page through the code), and when you find the procedure you want to execute, press control-shift-q to exit the editor, then type the procedure name and return.
You can also type pots from the prompt to get a list of all the procedures in the turtleSpace. If you can’t see them all (because of the text split-screen), type os (overlayscreen) to switch to the text overlay mode (type ss or splitscreen to go back to the text split-screen mode)
How do I clear the screen?
There are three primary ways to ‘clear the screen’ (workspace) in turtleSpaces:
- clearscreen (or cs) causes the calling turtle’s ‘track’ to be erased, and the turtle to return to its origin. This does not affect other turtles.
- csall causes all turtles tracks to be erased, and all turtles to return to their origin. This will also reset the position of the camera turtle.
- reset does what csall does, but it also resets a number of parameters, including the view turtle, pen color, pen state, fluid etc. essentially returning to a startup state.
How do I move the camera?
- You can left-click and drag inside the window to ‘orbit’ the camera’s ‘anchor point’ (at initialization this is [0 0 0], Myrtle’s default location).
- You can right-click and drag left or right to rotate the camera, drag up and down to zoom in and out.
- You can click both buttons and drag to move the camera up, down, left or right
How do I make the turtle move smoothly?
fluid causes the turtle to move and turn smoothly. nofluid turns it off (the default mode).
How do I move the camera programmatically?
The default ‘camera’ is a turtle named Snappy! You can command Snappy by switching to him by typing:
and then commanding him as you would Myrtle (fd 20, rt 90 etc.) If you only want to tell Snappy to do one or a few things, you can also prefix the instruction with his name and a colon (this works for any turtle):
How do I see from a different turtle?
You can change the view turtle using setview, eg:
which will place the camera behind the turtle. To change the camera’s position relative to the turtle, use setviewpoint, which take a list of [x-offset y-offset z-offset] eg:
setviewpoint [0 30 -80]
How do I create a new turtleSpace?
When turtleSpaces starts up, you begin in a blank turtleSpace. Once you begin building, you can name your turtleSpace using the settitle primitive, eg:
Then type save and press return to ‘save’ your turtleSpace.
turtleSpaces are stored under your username in the ~turtlespaces folder in your home folder.
How do I create a new procedure?
Either in the editor or at the command prompt, you can create new procedures by entering something like the following:
to square :size repeat 4 [fd :size rt 90] end
Unlike some other Logos, you can name a procedure whatever you like, but be warned, if you use a name that is already used by another primitive, you will override that primitive (which can be very useful!) If you want to use the built-in primitive in your replacement primitive, prefix it with @ as in:
to square :size @square :size print |This is my square!| end
Some other handy control-shift key combinations:
CONTROL-SHIFT-` Catalog CONTROL-SHIFT-E Edit CONTROL-SHIFT-S Save CONTROL-SHIFT-K Toggle Keyclick CONTROL-SHIFT-I (twice) Initialise CONTROL-SHIFT-H Home CONTROL-SHIFT-C Clearscreen CONTROl-SHIFT-R Reset CONTROL-SHIFT-P Primitive Reference CONTROL-SHIFT-B Backtrack CONTROL-SHIFT-V Paste (Drag-selecting text automatically copies it)
Also, if you press the up arrow at the interactive prompt, you will go back through the ‘history’ of what you’ve previously typed in, so if you make an error it’s easy to go back and fix it!
Help! I forgot to save! (or: Where are my files?!)
No worries, turtleSpaces saves everything you do. Using your operating system’s file manager (Finder, Explorer) navigate to the turtleSpaces folder in your home folder. Then go into your user (selected when you started turtleSpaces) and then open the TSP folder you were working in (either you had opened or named with settitle) or the most recent folder in the untitled_turtleSpaces folder.
In there, you’ll find a folder called autosave that contains a copy of the workspace every time you changed or added a procedure, with the .lgo suffix. You can just drag and drop these files on top of the turtleSpaces window to load them in. There’s also interactive_history.txt which contains a log of everything you typed at the interactive prompt!
Somewhere there should be some record of what you lost.
Read the examples!
It’s important to read through the examples once you have a familiarity with Logo – much of the syntax and language will become crystal clear to you once you do. Read all the tutorials and other documentation as well. Read, read, read!