|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectanar.Turtle
public class Turtle

Implements logo turtle in the anar framework Original Syntax Syntax again French Syntax http://pagesperso-orange.fr/blady/Ressources/dia_logo.pdf
| Field Summary | |
|---|---|
static java.lang.String[][] |
AND
|
static java.lang.String[][] |
ARGUMENTS
|
static java.lang.String[][] |
BACK
|
static java.lang.String[][] |
CLEAN
|
static java.lang.String[][] |
CLEARSCREEN
|
static java.lang.String[][] |
CLEARTEXT
|
static java.lang.String[][][] |
COMMANDS
|
static boolean |
debug
|
boolean |
displayTurtle
|
static java.lang.String[][] |
DOWN
|
static java.lang.String[][] |
END
|
static java.lang.String[][] |
FENCE
|
static java.lang.String[][] |
FORWARD
|
Vertex |
head
turtle head |
static java.lang.String[][] |
HIDETURTLE
|
static java.lang.String[][] |
HOME
|
static java.lang.String[][] |
IF
|
static java.lang.String[][] |
LEFT
|
Vertex |
norm
turtle normal which defines the turning plan |
static java.lang.String[][] |
OR
|
static java.lang.String[][] |
PENDOWN
|
static java.lang.String[][] |
PENERASE
|
boolean |
penState
Correspond to the state of the pen up or down True = penDown False = penUp |
static java.lang.String[][] |
PENUP
|
static java.lang.String[][] |
REPEAT
|
static java.lang.String[][] |
RIGHT
|
static java.lang.String[][] |
SETBACKGROUND
|
static java.lang.String[][] |
SETHEADING
|
static java.lang.String[][] |
SETPENCOLOR
|
static java.lang.String[][] |
SETPOS
|
static java.lang.String[][] |
SETSPEED
|
static java.lang.String[][] |
SETX
|
static java.lang.String[][] |
SETXY
|
static java.lang.String[][] |
SETXYZ
|
static java.lang.String[][] |
SETY
|
static java.lang.String[][] |
SETZ
|
static java.lang.String[][] |
SHOWTURTLE
|
Vertex |
tail
turtle direction |
static java.lang.String[][] |
THEN
|
Obj |
trace
The trailing trace of the turtle. |
Obj |
turtle
The body of the turtle. |
static java.lang.String[][] |
UP
|
static java.lang.String[][] |
WINDOWS
|
static java.lang.String[][] |
WRAP
|
| Constructor Summary | |
|---|---|
Turtle()
start a new turtle at origin with default heading and orientation |
|
Turtle(XYZ head)
starts a turtle in point p with default heading and orientation |
|
Turtle(XYZ head,
XYZ tail,
XYZ norm)
|
|
| Method Summary | |
|---|---|
Turtle |
BACK(float dist)
BACK - the turtle go backward same as FORWARD(-f) Moves the turtle backward, i.e., exactly opposite to the direction that it's headed, by the specified distance. |
Turtle |
BACK(Param dist)
BACK |
Turtle |
BK(float dist)
BACK |
Turtle |
BK(Param dist)
BACK |
Turtle |
CLEAN()
Erases all lines that the turtle has drawn on the graphics window. |
Turtle |
CLEARSCREEN()
Erases the graphics window and sends the turtle to its initial position and heading. |
Turtle |
CS()
|
Turtle |
DOWN(float angle)
DOWN - Turns the turtle clockwise by the specified angle, measured in degrees (1/360 of a circle). |
Turtle |
DOWN(Param angle)
|
void |
draw()
Draw the turtle body and the trailing results. |
Turtle |
drawingFromHead()
|
Turtle |
drawingFromTail()
|
void |
drawTrace()
Draw the trailing trace from the turtle. |
Turtle |
DW(float angle)
DOWN |
Turtle |
DW(Param angle)
DOWN |
Turtle |
FD(float dist)
FORWARD |
Turtle |
FD(Param dist)
FORWARD |
Turtle |
FORWARD(float dist)
FORWARD in the local frame Moves the turtle forward, in the direction that it's headed, by the specified distance (measured in turtle steps). |
Turtle |
FORWARD(Param dist)
|
Vertex |
getPos()
|
Turtle |
HIDETURTLE()
Makes the turtle visible. |
Turtle |
HOME()
Moves the turtle to the center of the screen. |
Turtle |
HT()
|
Turtle |
LEFT(float angle)
LEFT - Turns the turtle clockwise by the specified angle, measured in degrees (1/360 of a circle). |
Turtle |
LEFT(Param angle)
|
Turtle |
load(java.lang.String fileName)
Load a file with a LOGO syntax. |
Turtle |
LOGO(java.lang.String command)
Parse a command with the LOGO syntax. |
Turtle |
LOGO(java.lang.String[] tokens)
|
Turtle |
LT(float angle)
LEFT |
Turtle |
LT(Param angle)
LEFT |
Turtle |
PD()
|
Turtle |
PENDOWN()
Sets the pen's position to DOWN, without changing its mode. |
Turtle |
PENUP()
Sets the pen's position to UP, without changing its mode. |
Turtle |
PU()
|
Turtle |
REPEAT(int times,
java.lang.String command)
|
Turtle |
resetTurtle()
|
Turtle |
RIGHT(float angle)
RIGHT - Turns the turtle clockwise by the specified angle, measured in degrees (1/360 of a circle). |
Turtle |
RIGHT(Param angle)
|
Turtle |
ROTATEXY(float angle)
rotates the heading of the turtle on the turning plan |
Turtle |
ROTATEXY(Param angle)
|
Turtle |
ROTATEXZ(float angle)
rotates the local turning plan |
Turtle |
ROTATEXZ(Param angle)
|
Turtle |
RT(float angle)
RIGHT |
Turtle |
RT(Param angle)
RIGHT |
void |
setCameraOnTurtle()
|
Turtle |
SETH(float angle)
|
Turtle |
setHead(XYZ head)
|
Turtle |
SETHEADING(float angle)
Turns the turtle to a new absolute heading. |
Turtle |
setNorm(XYZ norm)
|
Turtle |
SETPC(AColor color)
|
Turtle |
SETPC(float red,
float green,
float blue)
|
Turtle |
SETPC(int color)
|
Turtle |
SETPENCOLOR(float red,
float green,
float blue)
Sets the pen to colorvector. |
Turtle |
SETPOS(float x,
float y)
Moves the turtle to an absolute X,Y, Z coordinate. |
Turtle |
SETPOS(float x,
float y,
float z)
Moves the turtle to an absolute X,Y, Z coordinate. |
Turtle |
SETPOS(Param x,
Param y,
Param z)
|
Turtle |
setTail(XYZ tail)
|
Turtle |
setTurtle(XYZ head,
XYZ tail,
XYZ norm)
|
Turtle |
SETX(float dist)
Moves the turtle along the X axis from its current position to a new absolute X coordinate. |
Turtle |
SETX(Param dist)
|
Turtle |
SETXY(float x,
float y)
|
Turtle |
SETXY(Param x,
Param y)
|
Turtle |
SETXYZ(float x,
float y,
float z)
|
Turtle |
SETXYZ(Param x,
Param y,
Param z)
|
Turtle |
SETY(float dist)
Moves the turtle along the Y axis from its current position to a new absolute Y coordinate. |
Turtle |
SETY(Param dist)
|
Turtle |
SETZ(float dist)
Moves the turtle along the Z axis from its current position to a new absolute Z coordinate. |
Turtle |
SETZ(Param dist)
|
Turtle |
SHOWTURTLE()
Makes the turtle visible. |
Turtle |
ST()
|
Turtle |
UP(float angle)
UP - Turns the turtle clockwise by the specified angle, measured in degrees (1/360 of a circle). |
Turtle |
UP(Param angle)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Vertex tail
public Vertex head
public Vertex norm
public Obj trace
public Obj turtle
public static final java.lang.String[][] FORWARD
public static final java.lang.String[][] BACK
public static final java.lang.String[][] RIGHT
public static final java.lang.String[][] LEFT
public static final java.lang.String[][] UP
public static final java.lang.String[][] DOWN
public static final java.lang.String[][] HOME
public static final java.lang.String[][] PENUP
public static final java.lang.String[][] PENDOWN
public static final java.lang.String[][] PENERASE
public static final java.lang.String[][] CLEARSCREEN
public static final java.lang.String[][] CLEAN
public static final java.lang.String[][] HIDETURTLE
public static final java.lang.String[][] SHOWTURTLE
public static final java.lang.String[][] WRAP
public static final java.lang.String[][] WINDOWS
public static final java.lang.String[][] FENCE
public static final java.lang.String[][] CLEARTEXT
public static final java.lang.String[][] SETPENCOLOR
public static final java.lang.String[][] SETBACKGROUND
public static final java.lang.String[][] SETHEADING
public static final java.lang.String[][] SETPOS
public static final java.lang.String[][] SETXY
public static final java.lang.String[][] SETXYZ
public static final java.lang.String[][] SETX
public static final java.lang.String[][] SETY
public static final java.lang.String[][] SETZ
public static final java.lang.String[][] REPEAT
public static final java.lang.String[][] AND
public static final java.lang.String[][] OR
public static final java.lang.String[][] IF
public static final java.lang.String[][] THEN
public static final java.lang.String[][] END
public static final java.lang.String[][] SETSPEED
public static final java.lang.String[][][] COMMANDS
public static final java.lang.String[][] ARGUMENTS
public boolean displayTurtle
public boolean penState
public static boolean debug
| Constructor Detail |
|---|
public Turtle()
public Turtle(XYZ head)
head -
public Turtle(XYZ head,
XYZ tail,
XYZ norm)
| Method Detail |
|---|
public Turtle drawingFromHead()
public Turtle drawingFromTail()
public Vertex getPos()
public Turtle LOGO(java.lang.String command)
command -
public Turtle LOGO(java.lang.String[] tokens)
public Turtle load(java.lang.String fileName)
fileName - - Path to your LOGO file.
public Turtle REPEAT(int times,
java.lang.String command)
public Turtle FORWARD(float dist)
dist -
public Turtle FORWARD(Param dist)
dist -
anar.geo.extra.Turtle#FORWARD(float)public Turtle FD(float dist)
dist -
anar.geo.extra.Turtle#FORWARD(float)public Turtle FD(Param dist)
dist -
anar.geo.extra.Turtle#FORWARD(float)public Turtle BACK(float dist)
dist -
anar.geo.extra.Turtle#FORWARD(float)public Turtle BACK(Param dist)
dist -
anar.geo.extra.Turtle#BACK(float)public Turtle BK(Param dist)
dist -
anar.geo.extra.Turtle#BACK(float)public Turtle BK(float dist)
dist -
anar.geo.extra.Turtle#BACK(float)public Turtle HOME()
public Turtle setHead(XYZ head)
public Turtle setTail(XYZ tail)
public Turtle setNorm(XYZ norm)
public Turtle setTurtle(XYZ head,
XYZ tail,
XYZ norm)
public Turtle resetTurtle()
public Turtle SETPOS(float x,
float y,
float z)
x - y - z -
public Turtle SETPOS(float x,
float y)
x - y -
public Turtle SETPOS(Param x,
Param y,
Param z)
x - y - z -
anar.geo.extra.Turtle#setPos(float,float,float)
public Turtle SETXYZ(float x,
float y,
float z)
x - y - z -
anar.geo.extra.Turtle#setPos(float,float,float)
public Turtle SETXYZ(Param x,
Param y,
Param z)
x - y - z -
anar.geo.extra.Turtle#setPos(float,float,float)
public Turtle SETXY(float x,
float y)
x - y -
anar.geo.extra.Turtle#setPos(float,float)
public Turtle SETXY(Param x,
Param y)
x - y -
anar.geo.extra.Turtle#setPos(float,float)public Turtle SETX(float dist)
dist -
public Turtle SETX(Param dist)
dist -
anar.geo.extra.Turtle#setX(float)public Turtle SETY(float dist)
dist -
public Turtle SETY(Param dist)
dist -
anar.geo.extra.Turtle#setY(float)public Turtle SETZ(float dist)
dist -
public Turtle SETZ(Param dist)
dist -
anar.geo.extra.Turtle#setZ(float)public Turtle SETHEADING(float angle)
angle - in degree
public Turtle SETH(float angle)
angle -
anar.geo.extra.Turtle#SETHEADING(float)public Turtle ROTATEXZ(float angle)
angle - in rad
public Turtle ROTATEXZ(Param angle)
angle - in rad
public Turtle ROTATEXY(float angle)
angle - in rad
public Turtle ROTATEXY(Param angle)
angle - in rad
public Turtle RIGHT(float angle)
angle - in degree
public Turtle RIGHT(Param angle)
angle - in degree
anar.geo.extra.Turtle#RIGHT(float)public Turtle RT(float angle)
angle - in degree
anar.geo.extra.Turtle#RIGHT(float)public Turtle RT(Param angle)
angle - in degree
anar.geo.extra.Turtle#RIGHT(float)public Turtle LEFT(float angle)
angle - in degree
public Turtle LEFT(Param angle)
angle - in degree
anar.geo.extra.Turtle#LEFT(float)public Turtle LT(float angle)
angle - in degree
anar.geo.extra.Turtle#LEFT(float)public Turtle LT(Param angle)
angle - in degree
anar.geo.extra.Turtle#LEFT(float)public Turtle UP(float angle)
angle - in degree
public Turtle UP(Param angle)
angle - in degree
anar.geo.extra.Turtle#UP(float)public Turtle DOWN(float angle)
angle - in degree
public Turtle DOWN(Param angle)
angle - in degree
anar.geo.extra.Turtle#DOWN(float)public Turtle DW(float angle)
angle - in degree
anar.geo.extra.Turtle#DOWN(float)public Turtle DW(Param angle)
angle - in degree
anar.geo.extra.Turtle#DOWN(float)public Turtle CLEAN()
public Turtle CLEARSCREEN()
public Turtle CS()
public Turtle SHOWTURTLE()
public Turtle ST()
anar.geo.extra.Turtle#SHOWTURTLE()public Turtle HIDETURTLE()
public Turtle HT()
anar.geo.extra.Turtle#HIDETURTLE()public Turtle PENUP()
public Turtle PU()
anar.geo.extra.Turtle#PENUP()public Turtle PENDOWN()
public Turtle PD()
anar.geo.extra.Turtle#PENDOWN()
public Turtle SETPENCOLOR(float red,
float green,
float blue)
red - green - blue -
public Turtle SETPC(float red,
float green,
float blue)
red - green - blue -
anar.geo.extra.Turtle#SETPENCOLOR(float,float,float)public Turtle SETPC(AColor color)
color - OogColor
anar.geo.extra.Turtle#SETPENCOLOR(float,float,float)public Turtle SETPC(int color)
color - (processing)
anar.geo.extra.Turtle#SETPENCOLOR(float,float,float)public void draw()
public void drawTrace()
public void setCameraOnTurtle()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||