public class XyTurtle
extends java.lang.Object
Turtle graphics were popular when I was in middle school as a teaching tool. It was a part of the LOGO teaching language. It uses a relative, vector style of graphics programming based on moving a virtual "turtle" around and giving it drawing commands. This style feels natural when building a sequence of geometries (e.g. while reading them from some streaming format).
Copyright 2007 Partner Software, Inc.
| Constructor and Description |
|---|
XyTurtle() |
| Modifier and Type | Method and Description |
|---|---|
void |
forward(double distance) |
XyDirection |
getDirection()
Gets the turtle's current direction.
|
double |
getMinimumSegmentLength()
Get the current minimum segment length setting.
|
XyPoint |
getPoint()
Gets the turtle's current location.
|
java.util.List<XyPolyline> |
getResults() |
boolean |
isPenDown() |
void |
left(XyAngle angle) |
void |
moveTo(XyPoint point)
Moves the virtual pen.
|
void |
penDown()
Puts the pen down, starting drawing.
|
void |
penUp()
Pulls the pen up, stopping drawing.
|
void |
right(XyAngle angle) |
void |
rotate(XyRotation rotation) |
void |
setDirection(XyDirection newDirection) |
void |
setMinimumSegmentLength(double newLength)
Sets the current minimum segment length.
|
void |
setPenDown(boolean tizit) |
void |
setPoint(XyPoint newPoint) |
public void moveTo(XyPoint point)
public void penUp()
public void penDown()
public void rotate(XyRotation rotation)
public void left(XyAngle angle)
public void right(XyAngle angle)
public void forward(double distance)
public java.util.List<XyPolyline> getResults()
public double getMinimumSegmentLength()
public void setMinimumSegmentLength(double newLength)
public XyPoint getPoint()
public void setPoint(XyPoint newPoint)
public XyDirection getDirection()
public void setDirection(XyDirection newDirection)
public boolean isPenDown()
public void setPenDown(boolean tizit)