GithubHelp home page GithubHelp logo

gamesedu / logo-tortoise Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andyhd/logo-tortoise

0.0 2.0 0.0 329 KB

A logo interpreter and tortoise (turtle) graphics emulator in Javascript with HTML5 Canvas

Home Page: http://andyhd.github.com/Logo-Tortoise/

HTML 42.00% CSS 2.14% JavaScript 55.86%

logo-tortoise's Introduction

Logo Tortoise

What is this?

The thing that got me interested in programming way back in 1987 was the BBC Micro that sat in my primary school classroom. One day, the teacher hooked it up to a robot "turtle", which held a pen over a large sheet of paper on the ground and could be made to move around and draw by way of writing programs on the computer.

This repository is a attempt to recreate the magical experience I had that day.

What can I do with it?

This is still unfinished, but you can draw pictures using Logo programs that you can type into the area at the bottom of the page. An example program is preloaded.

The interpreter understands the following keywords:

forward x
Move forward x steps
right x
Turn right x degrees
left x
Turn left x degrees
penup
Stop drawing lines when moving
pendown
Start drawing lines when moving
repeat x [ instructions ]
Repeat instructions x times
to verb parameters instructions end
Defines the function verb, optionally taking parameters listed in the form :x, so that you can subsequently write verb and instructions will be performed
Eg:
to square :x repeat 4 right 90 forward :x end
square 20
if expression [ instructions ]
Performs instructions if expression evaluates to true

Currently, expressions are only accepted by the if keyword, so you can't do forward 1 + 1, for example.

Why are you calling it a tortoise?

Because turtles are aquatic. Artistic tortoises make more sense to me.

It doesn't work

Yeah, I've only tested it in Chrome, Firefox 7 and Safari 5 so far. It's a work in progress.

logo-tortoise's People

Contributors

andyhd avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.