A C D F G H I J M P R S T

A

A5 - Class in <Unnamed>
Assignment A5
A5() - Constructor for class A5
Constructor: a black turtle starting at the middle of the panel with angle 0 (looking east).
addAngle(double) - Method in class Turtle
Add ang degrees to the angle.

C

clear() - Method in class Turtle
Clear the screen (make it all white).

D

drawCircle(double) - Method in class Turtle
Draw a circle of diameter d with center at the turtle's position.
drawGreenHex(int) - Method in class A5
Draw six green equilateral triangles with side lengths d to form a hexagon, starting at the turtle's current position and angle.
drawH(double, double, double) - Method in class A5
Draw an H at center (x, y) of size s.
drawPolygon(int, int) - Method in class A5
Draw an n-sided polygon, ending up with the turtle being where it started out and facing the same direction, and with the pen properties the same, too.
drawRect(double, double) - Method in class Turtle
Draw a rectangle of width w, height h with center at the turtle's position.
drawSpiral(int, int, int, int) - Method in class A5
Draw a spiral of n lines, beginning at the current turtle position and angle, using an angle of ang between adjacent lines and pausing ms milliseconds after each line.
drawSpiralMid(int, int, int, int) - Method in class A5
Do as in drawSpiral but clear screen and start at the center of the panel and angle 0.
drawTriangle(int, Color) - Method in class A5
Draw an equilateral triangle of side length e and color c at the turtle's current position.
drawTwoLines() - Method in class A5
Draw a black line 30 pixels to the right (east) and then a blue line 35 pixels down (south).

F

fillCircle(double) - Method in class Turtle
Fill a circle of diameter d with center at the turtle's position.
fillRect(double, double) - Method in class Turtle
Fill a rectangle of width w, height h with center at the turtle's position.
fillSquare(double) - Method in class A5
Fill a square of size (s, s), with top-left corner at the turtle's position.
fillTriangle(double) - Method in class Turtle
Fill triangle with lower left point at the turtle position and side length s.

G

getAngle() - Method in class Turtle
= angle of the turtle (in degrees).
getColor() - Method in class Turtle
= the turtle's current color.
getCommands() - Static method in class Turtle
= all the turtle commands carried out since the last clear(), one to a line.
getHeight() - Method in class Turtle
= height of the panel.
getWidth() - Method in class Turtle
= width of panel.
getX() - Method in class Turtle
= x-coordinate of the turtle.
getY() - Method in class Turtle
= y-coordinate of the turtle.

H

HSV2RGB(HSV) - Static method in class A5
= color in RGB color space formulae from http://en.wikipedia.org/wiki/HSV_color_space

I

intColor(int) - Static method in class Turtle
= the Color value for integer i.
isPenDown() - Method in class Turtle
= "the pen is down".

J

jumpTo(double, double, double) - Method in class Turtle
Move the turtle to (x,y), without drawing, and face it at angle ang --who ever heard of turtles jumping?

M

moveAhead(double) - Method in class Turtle
Move the turtle d units in its current direction.
moveBack(double) - Method in class Turtle
Move the turtle d units in the opposite (backward) direction.
multiPolygons(int, int, int) - Method in class A5
Draw 90 n-sided polygons of side length d, alternating between blue and red.

P

pause(int) - Method in class Turtle
Pause the program for millisec milliseconds.
placeInCenter() - Method in class A5
Place the turtle in the center of the panel, facing east, and clear the window (make it white).
putPenDown() - Method in class Turtle
Put pen down.
putPenUp() - Method in class Turtle
Lift pen.

R

radiate(int, int, int) - Method in class A5
Draw n straight radiating lines of length d at equal angles.
radiateMid(int, int, int) - Method in class A5
Do as in radiate but clear screen and start at center of panel and angle 0.
recursiveH(double, double, int, double) - Method in class A5
Make the graphics panel as big as possible, clear the panel, and draw an H-tree of depth d with center (x, y) and size s.
recursiveH1(double, double, int, double) - Method in class A5
draw an H-tree of depth d with center (x, y) and size s.

S

setAngle(double) - Method in class Turtle
Set the angle to ang degrees.
setColor(Color) - Method in class Turtle
Set the color of the turtle to c.
setPanelSize() - Method in class Turtle
Set the panel size as big as possible in the current JFrame window.
sierpinski(double, double, int, double) - Method in class A5
Make the graphics panel as big as possible, clear the panel, and draw a Sierpinksi triangle of depth d with side length s with the bottom left corner (x,y).
sierpinskicarpet(double, double, int, double) - Method in class A5
Make the graphics panel as big as possible, clear the panel, and draw a Sierpinksi carpet of depth d with side length s.

T

toString() - Method in class A5
= a representation of this Turtle, giving its position, the angle, it is facing, whether the pen is down, and its color.
Turtle - Class in <Unnamed>
An instance is a turtle in a panel within a JFrame.
Turtle() - Constructor for class Turtle
Constructor: a black turtle starting at the middle of the panel with angle 0 (looking east).
Turtle(double, double, double) - Constructor for class Turtle
Constructor: a black turtle starting at (x,y) with angle ang.

A C D F G H I J M P R S T