Skip to content
kembuco edited this page Sep 14, 2010 · 7 revisions

Documentation

About

This originated as an entry for the An Event Apart 10k contest. Inspired by nostalgia and the LOGO turtle drawing program that some of us used to play with back in the day. It is not an implementation of LOGO, but it does emulate some of the features of the language. Below is a list of commands. Happy drawing.

Commands

  • HELP – Lists all of the available commands
  • !n – Reruns command where n is the number of the command in history
  • ALIAS command alias – aliases the given command with the new alias e.g. “ALIAS [FORWARD F]”
  • FORWARD n – Moves the turtle forward n pixels
  • BACK n – Moves the turtle back n pixels
  • LEFT n – Turns the turtle n degrees to the left
  • RIGHT n – Turns the turtle n degrees to the right
  • PENUP – Pulls the pen up off the canvas so that if the turtle moves it will not draw a line
  • PENDOWN – Puts the pen down on the canvas so that if the turtle moves it will draw a line
  • HOME – Moves the turtle back to its starting position
  • CLEARSCREEN – Clears the canvas, moves the turtle to its starting position, and resets the command history
  • CLEAN – Clears the canvas and resets the command history
  • LINEWIDTH – Sets the width of the pen in pixels
  • MOVETO x y – Moves the turtle to the supplied coordinates. Takes pendown/penup state into account

Experimental

  • SAVEAS name – Saves the current command history as a program in localStorage
  • LOAD name – If a program with the given name exists in localStorage, it is loaded and run

Aliases

  • FORWARD – FD
  • BACK – BK
  • LEFT – LT
  • RIGHT – RT
  • PENUP – PU
  • PENDOWN – PD
  • CLEARSCREENCLEAR
Clone this wiki locally