Programming turtle graphics

From JSXGraph Wiki
Revision as of 12:40, 21 December 2008 by A WASSERMANN (talk | contribs)
Jump to navigationJump to search

List of available commands

There is a predefined turtle object t. Therefore, all commands start with t, like t.fd(100);

* t.forward(len); or t.fd(len);
* t.back(len); or t.bk(len);
* t.right(angle); or t.rt(angle); (<math>0\leq angle \leq 360</math>)
* t.left(angle); or;
* t.penUp(); or t.pu();
* t.penDown(); or t.pd();
* t.clearScreen(); or t.cs();
* t.clean();
* t.setPos(x,y); 
* t.home();
* t.hideTurtle(); or;
* t.showTurtle(); or;
* t.setPenSize(size); (size: number)
* t.setPenColor(col); (col: colorString, e.g. 'red' or '#ff0000')



Log window