Terrapin Logo Version 3
Terrapin Logo v. 3 is the latest version of the venerable Logo computer language published by Terrapin Software, a tradition that stretches for nearly 30 years. Like all new versions of Terrapin Logo, Version 3 maintains all the features of previous versions while adding many more that have been requested by customers and that make Logo both easier to use and more powerful in what it can accomplish.
Terrapin Logo v. 3 continues the effort to enhance Logo's graphical user interface. While all capabilities and commands, including the new ones, are still available under program control, a number of new interfaces have been added that provide visual access as well and make Logo easier to understand, especially for younger children and first time users. Terrapin Logo v. 3 also keeps up with hardware changes by adding support for Lego's NXT robot controller and offering a native version for Intel Mac.
This document covers the new features in Terrapin Logo v. 3, providing a description of the feature, how to use it, and any new commands that have been introduced. It should be used in conjunction with the complete Terrapin Logo documentation and on-line Help.
Take a look at what’s new and try it out. You are going to like it!
- Graphics
- Visually rotating bitmaps
- Natural bitmap headings
- Drag, drop, and go
- Optional heading arrows
- Visible TELL list
- Customizable grid overlay
- Step definition
- Programming
- Environment
- Hardware
Graphics
Visually rotating bitmaps - bitmaps visually turn in the direction of their heading
Previous versions of Terrapin Logo included bitmap objects, multicolored files in bmp, jpg, or pict format that could be used in Terrapin Logo. Headings could be adjusted, but unlike turtles, bitmaps did not change direction to reflect their heading. Terrapin Logo v. 3 adds the capability for bitmaps to rotate to show their heading visually.
This feature offers many possibilities for creating animations and other moving pictures and provides a basis for clearer understanding of using bitmaps in a program. Bitmap headings can also be "locked," so that they do not visually rotate when the heading is changed so that Terrapin Logo v. 3 is backward compatible with previous versions.
In Terrapin Logo v. 3, bitmaps visually turn to reflect their heading by default. Commands to change or control this feature include:
- Preferences/Operation menu – activate “Allow Bitmaps to Rotate” checkbox
- EDP “PREFS – change ROTATING.BITMAPS to TRUE
- PPROP “PREFS “ROTATING.BITMAPS “TRUE

with LEFT, RIGHT, and SETHEADING commands.
For example, open the Toolbox and select the Sea Creatures folder. Drag the lobster image from the Toolbox to the Graphics window. Click in the Listener window and type RT 90 and watch the lobster turn 90 degrees.
The Bee-Bot procedure in the Examples folder which comes on the Terrapin Logo CD illustrates rotating bitmaps. To try it out, choose File/Load into workspace and navigate to the Robots folder in the Examples folder. Choose Bee-Bot.lgo and load it into workspace. Type MAIN in the Listener window and try controlling the on-screen Bee-Bot robot using the arrow and GO buttons the same way as using the actual Bee-Bot robot.
Natural bitmap headings - bitmaps enter Logo reflecting their natural visual heading
Toolbox folders with bitmap images now contain a file named orientations.idx. This file sets the natural heading for each bitmap in the folder when it is introduced into Logo. The natural heading is the direction in which the bitmap is oriented as it appears in the Graphics window.
For example, the rabbit image in the Animals folder in the Toolbox is facing to the left or a heading of 270 degrees. (HEADING 0 is straight up.) Drag and drop the rabbit onto the Graphics window and it will automatically turn the direction that it is facing. Type FD 50 and the rabbit moves forward from its own perspective.
The orientations.idx file may be edited with the Logo editor or any text editor. Each line of the orientations.idx file should contain the name of the bitmap followed by a space followed by the heading for the bitmap when it is loaded into Logo. When the bitmap is loaded, both its heading and its STARTANGLE property will be set to the heading specified in the file. The heading in the orientations.idx file is maintained whether the bitmap is dragged and dropped into Logo using the mouse or is loaded programmatically using LOADSNAP.
The following are sample entries from the orientations.idx file in the Animals folder in theToolbox.
Bee 90
Cat 225
Pig 270
Seagull 45

New bitmaps may be added to folders and their natural orientation added to the orientations.idx file. Default orientation is HEADING 0. Bitmaps in the folder for which an orientation is not specified in the orientations.idx file with have a heading of 0 when put into Logo. Lines containing bitmaps not in the folder are ignored. Bitmaps in the folder that are not listed in the orientations.idx file will have a HEADING and STARTANGLE property of 0.
Starting angles may not be set in the special purpose BACKGROUNDS, COLORS, CONTROLS, and Tiled Backgrounds Toolbox folders and there is no orientations.idx file in those folders.
Drag, drop, and go - quicker starting with bitmap programming
Animating bitmap images in Logo is a popular activity that Terrapin Logo v. 3 makes much simpler. Most users get started with animation by dragging and dropping images from the Toolbox. Previously this required several steps: dragging and dropping the image, putting the image on the TELL list so that commands are directed to it, and setting its heading to reflect its visual orientation.
In Terrrapin Logo v. 3, when a bitmap image is dragged and dropped from the toolbox, its HEADING is set to its STARTANGLE which reflects its visual orientation. (See section on Natural bitmap headings above.) The image is placed as the only item on the TELL list so that all commands are directed to the image that has just been dragged and dropped (or loaded with LOADSNAP). This allows simpler placement and animation of the image without requiring intervening commands.
You can immediately issue commands to bitmap images
dragged to the Graphics window from the Toolbox
or loaded with LOADSNAP.
If an additional image is loaded, then it is placed on the TELL list. TELL or TELLALL may be used to put the turtle(s) or other or multiple bitmaps on the TELL list so that they all respond to commands entered in the Listener window.
Optional heading arrows - arrows appear over bitmaps and turtles indicating their heading
Arrows indicating heading may be made to appear over turtles and bitmaps. The arrow on each turtle or bitmap points in the direction of the object's HEADING. This helps emphasize directionality and the concept of heading in Logo. It is especially useful when working with objects (such as circles or balls) which do not have an obvious visual heading or objects whose actual heading is different from their apparent one.

indicate the heading of bitmaps and turtles.
The heading arrows may be activated and deactivated using a menu command or program commands.
- Preferences/Appearance – activate “Show heading” checkbox
- EDP “PREFS – change SHOW.HEADINGS to TRUE
- PPROP “PREFS “SHOW.HEADINGS “TRUE
Visible TELL List - Visible boundary box may be made to appear around all objects on the TELL list
The TELL list is a list of currently active Logo turtles and bitmaps. Objects on the TELL list are those that respond to commands typed in the Listener window. When Logo first starts, TURTLE.0, the single turtle in the center of the Graphics window is the only object on the TELL list. The TELL list may be accessed with the WHO command.
Terrapin Logo v. 3 allows you to make the WHO command visible by having boundary boxes appear around all objects on the TELL list. This can be useful when using multiple turtles or multiple bitmaps so that the objects that are listening to commands are readily apparent.

The boundary box surrounds the full extent of the object and so makes it visible, even if otherwise it is not. Boundary boxes may be activated and deactivated in several different ways.
- Preferences/Appearance – activate “Enable visible TELL list” checkbox
- EDP “PREFS – change VISIBLE.TELL to TRUE
- PPROP “PREFS “VISIBLE.TELL “TRUE/FALSE
Customizable grid overlay - grid with user definable horizontal and vertical scale may be placed over the Graphics window
The Logo Graphics window has an underlying cartesian grid on which the turtle moves. Terrapin Logo v. 3 allows this grid to be made visible. This can be a great help in teaching cartesian coordinates and in planning bitmap and turtle movements.
The visible grid is in a separate plane from the Graphics window and does not interfere with turtle graphics or other actions in the Graphics window. The default scale is 100 turtle steps in each direction and the horizontal and vertical scales are the same.
Three new primitives have been introduced in Terrapin Logo v. 3 to manage the visible grid. GRIDON makes the grid appear. GRIDOFF makes the grid disappear. GRID takes a number as input and sets both the horizontal and vertical scale of the grid to its input in turtle steps. These new commands are defined in on-line Help.

is available for the Graphics window.
In addition, the grid may be shown and hidden in several other ways.
- Preferences/Appearance – activate “Show Grid” checkbox, enter numbers for Vertical and Horizontal scales
- EDP “Graphics – change GRIDVISIBLE to TRUE and enter scale for GRIDSPACING
- PPROP “Graphics “GRIDVISIBLE “TRUE
PPROP “Graphics “GRIDSPACING [hscale vscale]
The grid scale is customizable by the user and the horizontal and vertical scales may be set to different values if desired.
Step definition - defines the number of pixels an object traverses with each step
By default, turtles and bitmaps move in steps of one pixel when given FORWARD and BACK commands. Terrapin Logo v. 3 allows the user to determine the size, in pixels, of each step for each turtle or bitmap.
Three new primitives have been introduced in Terrapin Logo v. 3 to manage step sizes. STEPSIZE takes a pixel value as input and sets the step size for all Logo objects to the value of its input. SETSTEPSIZE takes a pixel value and object name as inputs and sets the step size for that object to the number of pixels input. GETSTEPSIZE takes an object name as input and reports the number of pixels in its step size. On-line Help contains definitions and examples of these new primitives.
- STEPSIZE pixels
- SETSTEPSIZE pixels “objectname
- GETSTEPSIZE “objectname
By default, FORWARD and BACK movement steps are one pixel. FORWARD 100 moves a turtle forward 100 steps, which by default is 100 pixels. If the step size is changed to 2, then FORWARD 100 moves the turtle forward 200 pixels.

may be defined.
The stepsize for an object may also be set using property lists as well as the new primitives. The stepsize may be entered directly by changing the property.
- PPROP “objectname “STEPSIZE pixels
The stepsize can also be set through the property dialog for the object which appears when the object is right-clicked or when it is made to appear with the EDP command.
- EDP “objectname change Step Size to desired value
Programming
Visual workspace contents - dialog with listing of defined procedures, names, objects, aliases, and TELL list
The Logo workspace contains all of the elements, including procedures, names, objects, aliases, turtles, and the TELL list, with which Logo programming is done. When a Logo file is saved, the contents of the workspace is saved in the file.
Workspace contents may be queried via Logo commands as always. Terrapin Logo v. 3 makes workspace contents visible to improve understanding and management of the workspace.
A new Workspace View button
has been added to the Toolbar. Clicking this button causes the Workspace View dialog to appear.
A new WORKSPACE.VIEW primitive is also available and causes the Workspace View dialog to appear.

Several options are available within the Workspace View dialog for examining the contents of Logo workspace. Click on the desired button to see the workspace contents specified.
The following flags in Workspace View provide additional information about items in Logo workspace.
* – Active (head of Tell list)
+ – Tell list member
A – Alias
B – Buried
P – Primitive
S – System
V – Visible
Visual list editor - dialog showing list elements displayed by ITEM number
Terrapin Logo v. 3 enhances list management by introducing a visual list editor. All of the list management commands are still available, but a new primitive, EDL, offers access to a visual list editor. The visual editor lists each item in the list by its ITEM number, followed by the value of that item. Changes in list contents may be made in the editor and will take effect when the OK button is clicked.
The list editor is expandable, in that lists which contain other lists as elements may also be edited. When a list element within the list editor is selected, a second list editor appears to the right containing the items in the selected element by item number.
- EDL “listname
MAKE “MONTHS [JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY
AUGUST SEPTEMBER OCTOBER NOVEMBER DECEMBER]
EDL “MONTHS

Dashboard – enhanced visual debugging tool
The Dashboard is a new visual debugging tool in Terrapin Logo v. 3 that makes it easier than ever to debug your programs and check the Logo environment in which they are running.
Clicking the
pause button or using the PAUSE command causes the Dashboard to appear. PAUSE may be inserted into a procedure to cause it to pause at a particular point or the pause button may be clicked while a Logo procedure is running. When Logo encounters either version of PAUSE, it temporarily stops a procedure and displays the Dashboard, which shows the current status of the Logo environment. This includes the values of variables and memory status. From the Dashboard, the procedure may be continued or stopped or continued one line at a time.

checking of the Logo environment while a procedure is running.
The Dashboard panel in the top left lists the current names or variables in the Logo environment. Clicking on a variable displays its value. Names are labeled as
A - Alias
B - Buried
S - System
The Dashboard panel in the top center lists the current objects in the Logo environment. Objects are labeled as
P - Permanent
S - System
B - Buried
C - Current (first on TELL list)
A - Active (in the TELL list)
V - Visible
The Dashboard panel at the top right lists the current procedures in workspace. Clicking on a procedure displays its definition. Procedures are labeled as
S - System
B - Buried
P - Primitive
No label indicates a user-defined procedure in workspace.
The Trace panel in the middle of the Dashboard displays the procedure that was running when the PAUSE command called the Dashboard to display. The output panel at the bottom of the Dashboard displays requested information.
Once the Dashboard appears, the buttons at the bottom allow you to Refresh the information displayed, continue with the procedure, continue with the next line of the procedure, or stop the procedure.
Multiple turtles - new primitives to simplify working with multiple turtles
Terrapin Logo v. 3 adds two new primitives to make it quick and easy to work with multiple turtles. Multiple turtles add a new aspect to Logo graphics programming and enhance the Logo idea that apparently complex results can be created with relatively simple commands.
The two new primitives, CTURTLES and LTURTLES, allow you to specify the number of turtles you want and cause them appear aligned in the Graphics window either in a circle (CTURTLES) or a line (LTURTLES). These new primitives make it simple to get going with multiple turtles and inspire students to investigate and learn multiple turtle commands.
- CTURTLES number

- LTURTLES number

Full definitions of CTURTLES and LTURTLES with syntax and examples may be found in on-line Help.
Environment
Preferences menu - Preferences for the Logo environment may be set through a new Preferences menu
Terrapin Logo v. 3 offers more direct control of the Logo environment through a new Preferences menu which allows easy setting and saving of preferred preferences in the way Logo appears and operates. Preference settings are still available via property lists and so can be set with program commands, but the new Preferences menu offers a quick way to see how preferences are set and to change them simply.
The Preferences menu is accompanied with a new Preferences.lgo file. Preferences set via the new Preferences menu may be saved and will automatically be loaded when Logo starts again.
The Preferences menu offers several dialogs where preferences may be set.




The Turtle Center may also be accessed by clicking the Turtle Center button
or by right-clicking (Control-clicking on a Mac with a single mouse button) a particular turtle.
Record settings – Saves the current preference settings in a file named Preferences.lgo that will be automatically loaded when Logo is started again.
Restore defaults – Set the preferences to the initial default settings.
Preferences file – Preferences for the Logo environment may be saved in a file that is automatically loaded into Logo
In conjunction with the Preferences Menu, Terrapin Logo v. 3 incorporates a new Preferences.lgo file that, when present in the Logo directory, loads automatically when Logo starts. The Preferences.lgo file is created when Record Settings on the Preferences menu is selected. Preferences as currently set are recorded in the Preferences.lgo file. Subsequently, each time Logo starts, the Logo environment will reflect the preferences that have been set and recorded.
Preferences.lgo is a standard Logo file that may be viewed and edited in the Logo editor or any text editor. The first three lines of the file replace the Environment.txt file of previous versions. Each of these three lines is preceded by a semicolon (;) to make Preferences.lgo backward compatible with Environment.txt in earlier versions. Normally a semicolon (;) would indicate that a line is a comment, but these lines are read when Logo starts. The rest of the files are property commands which set the preferences that as indicated through the Preferences menu.
Different preferences may be saved for different purposes by renaming the Preferences.lgo file. This may be done at the file level or by loading Preferences.lgo into the Logo editor and saving it with a different name. The renamed file may be loaded whenever that particular set of preferences is desired. This provides a simple way of maintaining different sets of Logo preferences for different purposes.
To cause Logo to start up with the default preferences, delete the Preferences.lgo file in the Logo directory. Alternately, choose Restore defaults from the Preferences menu and then choose Record settings. The Preferences.lgo file will be recorded with the default preferences.
Hardware
Terrapin Logo v. 3 is native for new Intel Macs and both OS X and Windows operating systems that they run.
Terrapin Logo v. 3 has built-in commands to communicate with the Lego NXT robot controller as well as the RCX. The following new commands for the NXT have been introduced in Terrapin Logo v. 3. Definitions are available in online Help.
- NXT.PORTS
- NXT.OPEN
- NXT.CLOSE
- NXT.OFF
- NXT.IOMAP.READ
The following commands communicate with both the RCX and NXT, but may behave somewhat differently, depending on the robot controller with which communication has been established.
- BEEP
- MOTOR
- SETSENSOR