SLP-LOGO

Turtle Graphics Programming Language

Phone: 555-0310

Introduction

Welcome to SLP-LOGO---the language that teaches you to think like a programmer by teaching you to draw.

Watch the screen as you type FD 100. The turtle glides forward, leaving a trail of light behind it. Type RT 90, and it pivots smartly to the right. With just these two commands---forward and turn---you can draw anything. Squares, stars, spirals, flowers. The only limit is your imagination.

In 1967, Seymour Papert and his colleagues at MIT created Logo as an educational programming language---one designed not for professional programmers, but for children and beginners. At its heart was a simple but profound idea: an imaginary turtle that could be commanded to move, turn, and draw. By giving instructions to the turtle, learners discover the fundamentals of programming through immediate, visual feedback. A few commands create a square; a few more create a flower; before long, you are thinking algorithmically without even realizing it.

SLP-LOGO brings turtle graphics to your EC-TTY terminal over the Emulator.ca Systems network. This implementation captures the essential Logo experience: movement commands, pen control, loops, and user-defined procedures. Whether you are encountering programming for the first time or revisiting a language from your school days, Logo offers a uniquely satisfying way to explore computational thinking. Type a command, watch the turtle respond, and discover the joy of making the computer do exactly what you envision.

There is something profoundly satisfying about Logo. When your program draws a perfect spiral on the first try, you feel like a wizard commanding forces of nature. When it draws something unexpected, you feel like an explorer who has stumbled onto hidden territory. Either way, you are learning---not through dry exercises, but through play and discovery.

ABOUT THIS IMPLEMENTATION

SLP-LOGO is a focused subset of the Logo language, designed for clarity and responsive dial-up interaction. It includes the core turtle graphics commands, REPEAT loops, and procedure definitions---everything you need to create sophisticated drawings and learn fundamental programming concepts.

Quick Start

Logo is immediate and interactive. Here is how to draw your first shape:

  1. Dial 555-0310 from the EC-TTY main menu
  2. When you see the ? prompt, you are ready to command the turtle
  3. Type FD 50 and press ENTER---the turtle moves forward 50 units
  4. Type RT 90 and press ENTER---the turtle turns right 90 degrees
  5. Try REPEAT 4 [FD 50 RT 90] to draw a complete square
? FD 50
? RT 90
? REPEAT 4 [FD 50 RT 90]
? 

Congratulations---you are programming! Experiment with different numbers and see what the turtle draws.

Getting Connected

To access the Logo interpreter, configure your modem for dial-out and issue the following command:

ATDT555-0310

Upon successful connection, you will see the SLP-LOGO banner and the prompt:

Connection Sequence

CODE_FENCE_0

The ? prompt means the interpreter is ready. When you define a procedure, the prompt changes to > until you type END.

Command Reference

Turtle Movement Commands

Command Abbreviation Description
FORWARD n FD n Move turtle forward n units
BACK n BK n Move turtle backward n units
RIGHT n RT n Turn turtle right n degrees
LEFT n LT n Turn turtle left n degrees
HOME Return turtle to center, heading north
SETXY x y Move turtle to coordinates (x, y)
SETHEADING n SETH n Set turtle heading to n degrees

Pen Control Commands

Command Abbreviation Description
PENUP PU Lift pen (movement will not draw)
PENDOWN PD Lower pen (movement will draw)
CLEARSCREEN CS Clear drawing and reset turtle position

Control & Procedures

Command Description
REPEAT n [commands] Execute commands n times
TO name :param1 :param2 Begin procedure definition
END End procedure definition
STOP Exit current procedure
OUTPUT value Return value from procedure

Variables & Output

Command Description
MAKE "name value Assign value to variable
:name Retrieve value of variable
PRINT value Display value (abbrev: PR)

TIP

Commands and variable names are case-insensitive. FD, fd, and Fd are all the same.

Examples

Here are some patterns to try, arranged from simple to complex. Type each one and observe the result before moving to the next.

Basic Shapes

Square

CODE_FENCE_0

The turtle turns a total of 360 degrees (4 x 90), returning to its starting heading.

Triangle

CODE_FENCE_0

For a triangle, each turn is 120 degrees (360 / 3).

Star

CODE_FENCE_0

The 144-degree turn (720 / 5) creates a five-pointed star. Why 720 instead of 360? Because the turtle goes around twice!

Patterns from Repetition

Circle of Squares

CODE_FENCE_0

This draws 12 squares, each rotated 30 degrees from the last, creating a circular pattern.

Hexagon Flower

CODE_FENCE_0

Define a hexagon procedure, then repeat it with rotation to create a flower shape.

Advanced Patterns

Starburst

CODE_FENCE_0

Thirty-six rays emanating from the center create a starburst pattern. Each ray moves out and back, then the turtle turns 10 degrees for the next.

Limits

This is a minimal Logo subset designed for clarity and responsive dial-up interaction. The following features are not available in this implementation:

Not Supported:

Supported Constraints:

NOTE

Logo is designed for exploration. Start with simple shapes, experiment, and build your own vocabulary of procedures.

Learning Path

Logo rewards exploration. Here is a suggested progression from complete beginner to confident programmer:

Level 1: Basic Movement

Start by understanding what each command does. Try these one at a time:

FD 50          ; Move forward
RT 90          ; Turn right
FD 50          ; Move forward again

You have drawn a corner. Notice how the turtle remembered its direction after the turn.

Level 2: Your First Shape

A square is just four sides with four turns:

FD 50 RT 90 FD 50 RT 90 FD 50 RT 90 FD 50 RT 90

That works, but it is tedious. Logo gives you a better way.

Level 3: The Power of REPEAT

Instead of typing the same commands four times, use REPEAT:

REPEAT 4 [FD 50 RT 90]

Same result, much less typing. Now change the numbers:

Level 4: Creating Procedures

Once you have a shape you like, give it a name:

TO SQUARE
> REPEAT 4 [FD 50 RT 90]
> END

Now SQUARE is a command, just like FD or RT. You can use it anywhere:

SQUARE RT 45 SQUARE RT 45 SQUARE

Level 5: Procedures with Parameters

Make your procedures flexible by adding parameters:

TO SQUARE :SIZE
> REPEAT 4 [FD :SIZE RT 90]
> END

Now you can draw squares of any size:

SQUARE 10
SQUARE 30
SQUARE 50

The Mathematical Secret

Here is something wonderful: the turtle always turns a total of 360 degrees when drawing a closed shape. For a square (4 sides), that is 90 degrees per turn (360/4). For a triangle (3 sides), it is 120 degrees (360/3). For a star, the math gets more interesting---try REPEAT 5 [FD 50 RT 144] and see what happens.

EXPLORATION CHALLENGE

What happens if you nest one shape inside another? Try: CODE_FENCE_0 The result may surprise you.

Appendix A: Quick Reference Card

+---------------------------------------------------------------+
|                   SLP-LOGO QUICK REFERENCE                    |
+---------------------------------------------------------------+
|  DIAL: 555-0310                                               |
|                                                               |
|  MOVEMENT:              PEN CONTROL:                          |
|    FD n   Forward n       PU    Pen up (stop drawing)         |
|    BK n   Back n          PD    Pen down (start drawing)      |
|    RT n   Right n deg     CS    Clear screen, reset turtle    |
|    LT n   Left n deg      HOME  Return to center              |
|                                                               |
|  CONTROL:               VARIABLES:                            |
|    REPEAT n [...]         MAKE "name value                    |
|    TO name :param         :name (retrieve value)              |
|    END                    PRINT value  (or PR)                |
|                                                               |
|  QUICK SHAPES:                                                |
|    Square:    REPEAT 4 [FD 50 RT 90]                          |
|    Triangle:  REPEAT 3 [FD 50 RT 120]                         |
|    Hexagon:   REPEAT 6 [FD 30 RT 60]                          |
|    Star:      REPEAT 5 [FD 50 RT 144]                         |
+---------------------------------------------------------------+

Appendix B: Troubleshooting

Problem: Turtle does not appear to move

The pen may be up. Type PD (pen down) to enable drawing, then try your movement command again.

Problem: Drawing goes off the visible area

The turtle can move beyond the visible canvas. Use HOME to return to the center, or CS to clear the screen and reset the turtle position.

Problem: Procedure definition does not end

Make sure you type END on a line by itself. The > prompt indicates you are still inside a procedure definition.

Problem: Variable not found error

Variables must be created with MAKE before use. Remember: use quotes when assigning (MAKE "X 10) but use a colon when retrieving (:X).

Problem: REPEAT command not working

The commands to repeat must be enclosed in square brackets. Correct: REPEAT 4 [FD 10 RT 90]. Incorrect: REPEAT 4 FD 10 RT 90.

Problem: Connection drops during session

Line noise or modem timeout can cause disconnections. Redial 555-0310 to start a new session. Unfortunately, drawings and procedure definitions are lost on disconnect.

Problem: Typed commands do not appear

Your terminal may have local echo disabled. The SLP-LOGO interpreter echoes your commands, so you should see them. If not, check your terminal settings.

Appendix C: Glossary

Canvas - The drawing area where the turtle creates graphics.

Heading - The direction the turtle is facing, measured in degrees (0 = north, 90 = east).

Pen - The imaginary drawing instrument attached to the turtle; when down, movement creates lines.

Procedure - A named sequence of commands that can be called like a built-in command. Created with TO and END.

Turtle - The imaginary drawing cursor that responds to your Logo commands; originally visualized as a small robot or cursor.

Variable - A named storage location for a value, created with MAKE and accessed with a colon prefix.

Appendix D: Sample Programs

Flower

TO PETAL :SIZE
> REPEAT 6 [FD :SIZE RT 60]
> END
? REPEAT 12 [PETAL 20 RT 30]

Starburst

TO RAY :LEN
> FD :LEN BK :LEN
> END
? REPEAT 36 [RAY 40 RT 10]

Where to Go From Here

You have taken your first steps with Logo. The commands are simple, but the possibilities are endless. Every procedure you define becomes a new tool in your vocabulary. Every pattern you discover opens new creative directions.

Here are some challenges to try:

  1. Polygons -- Write a procedure that draws any regular polygon given the number of sides
  2. Nested shapes -- What happens when you repeat a shape with a small turn between each?
  3. Symmetry -- Create patterns with rotational or reflective symmetry
  4. Art -- Combine your procedures to create something beautiful

The turtle is patient. It will draw exactly what you tell it, for as long as you want to explore. This is the gift of Logo: a space where mistakes cost nothing, where experimentation is encouraged, and where the only limit is your imagination.

See Also


SLP-LOGO is a product of Emulator.ca Systems. For technical support, consult your EC-TTY documentation or contact your system operator.