Turtle Graphics: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 1: Line 1:
This is a very basic implementation of turtle graphics with [http://jsxgraph.org JSXGraph].
===List of commands===
* t.forward(len); or t.fd(len);
* t.back(len); or t.bk(len);
* t.right(angle); or t.rt(angle);
* t.left(angle); or t.lt(angle);
* t.penUp();
* t.penDown();
* t.clean();
* t.setPos(x,y);
===Example===
<html>
<html>
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" />
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" />

Revision as of 16:07, 19 December 2008

This is a very basic implementation of turtle graphics with JSXGraph.

List of commands

  • t.forward(len); or t.fd(len);
  • t.back(len); or t.bk(len);
  • t.right(angle); or t.rt(angle);
  • t.left(angle); or t.lt(angle);
  • t.penUp();
  • t.penDown();
  • t.clean();
  • t.setPos(x,y);

Example