Download Turtle Graphics Mac Java



Download Turtle Graphics Mac JavaDownload turtle graphics mac javatpointTurtle graphics

Understanding the difference between objects and classes using a Logo or Turtle Graphics style turtle. Links to stuff from the video: + TurtlesStarter.zip. This topic started in this recent post, where I introduced a simple turtle graphics engine for AutoCAD implemented in C#. My eventual aim is still to implement a subset of the Logo programming language in F#, calling through to this C# engine, but for now I've been side-tracked: I'm simply having too much fun with the engine itself and exploring the possibilities of turtle graphics inside. Turtle Graphics free download - CorelDRAW Graphics Suite, Intel Graphics Media Accelerator Driver, nVidia ForceWare Graphics Driver (Windows 98/Me), and many more programs.

Download Turtle Graphics Mac Java Installer

Java

Download Turtle Graphics Mac Java Download

Documentation‎ > ‎

Turtle

Class Turtle

Constructor Summary
Turtle()
Constructs a turtle.
Method Summary
voidbackward(double step)
Moves the Turtle backwards.
voidbye()
Closes and exits the program.
voidclear()
Clears the screen to white.
voidclear(java.lang.String color)
Clears the screen to a color.
voiddelay(int t)
Pauses the program.
doubledistance(double x, double y)
Gets the distance between the Turtle's position and another specified position.
voiddot()
Places a dot at the Turtle's present position.
voiddot(double size)
Places a dot at the Turtle's present position.
voiddot(double size, java.lang.String color)
Places a dot at the Turtle's present position.
voiddot(java.lang.String color)
Places a dot at the Turtle's present position.
voiddown()
Lowers the Turtle's tail down so it will draw on the screen as it moves.
voidface(double angle)
Rotates the Turtle to a specified heading.
voidforward(double step)
Moves the Turtle forward.
voidgoTo(double x, double y)
Moves the Turtle to a specified position.
doubleheading()
Gets the heading.
doubleheading(double x, double y)
Gets the heading if the Turtle was facing the specified position.
voidhome()
Returns the Turtle to position (0,0) with a heading of 0 degrees.
voidinteractiveMode()
Allows the user to type what they want the Turtle to do while the Turtle window is up.
booleanisDown()
Checks to see if the Turtle's tail is down.
voidleft(double delta)
Rotates the Turtle counterclockwise.
static voidmain(java.lang.String[] args)
Turtle demo.
voidpenColor(int red, int green, int blue)
Sets the color that the Turtle draws with, allows custom colors.
voidpenColor(int red, int green, int blue, int alpha)
Sets the color that the Turtle draws with, allows custom colors with alpha channel.
voidpenColor(java.lang.String color)
Sets the color that the Turtle draws with.
voidpenSize(double size)
Sets the line width that the Turtle draws.
voidright(double delta)
Rotates the Turtle clockwise.
voidsave(java.lang.String filename)
Saves the screen to a PNG image.
voidscreenSize(int width, int height)
Resizes the drawable area of the window.
voidsetOpacity(int alpha)
Sets the opacity of the color that the Turtle draws with.
voidspeed(int t)
Sets the delay in milliseconds between execution of Turtle commands.
voidup()
Picks the Turtle's tail up so it won't draw on the screen as it moves.
voidworldCoordinates(double minx, double miny, double maxx, double maxy)
Sets the what Turtle position will be at the bottom-left and the top-right of the screen.
voidwrite(double x, double y, java.lang.String text, double angle)
Write text on the screen.
voidwrite(java.lang.String text)
Write text centered a the Turtle's current position.
voidwrite(java.lang.String text, double angle)
Write text centered a the Turtle's current position.
doublex()
Gets the x coordinate.
doubley()
Gets the y coordinate.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

Turtle

Constructs a turtle.
Method Detail

up

Picks the Turtle's tail up so it won't draw on the screen as it moves.

down

Lowers the Turtle's tail down so it will draw on the screen as it moves.

left

Rotates the Turtle counterclockwise.
Parameters:
delta - an angle in degrees.

right

Rotates the Turtle clockwise.
Parameters:
delta - an angle in degrees.

forward

Moves the Turtle forward.
Parameters:
step - a distance measured in pixels.

dot

Places a dot at the Turtle's present position.

dot

Places a dot at the Turtle's present position.
Parameters:
size - the width in pixels.

dot

Places a dot at the Turtle's present position.
Parameters:
size - the width in pixels.
color - name of a color or a 6-digit hex color string (e.g. '00FF00' for green)

dot

Places a dot at the Turtle's present position.
Parameters:
color - name of a color or a 6-digit hex color string (e.g. '00FF00' for green)

write

Write text centered a the Turtle's current position.
Parameters:
text - message to be written on the screen.

write

Write text centered a the Turtle's current position.
Parameters:
text - message to be written on the screen.
angle - the angle in degrees that the text is rotated counterclockwise.

write

Write text on the screen.
Parameters:
x - the x coordinate of the center of the text.
y - the y coordinate of the center of the text.
text - message to be written on the screen.
angle - the angle in degrees that the text is rotated counterclockwise.

speed

Sets the delay in milliseconds between execution of Turtle commands.
Parameters:
t - the delay in milliseconds.

backward

Moves the Turtle backwards.
Parameters:
step - a distance measured in pixels.

goTo

Moves the Turtle to a specified position. This will result in a line being drawn if the tail is down.
Parameters:
x - x coordinate.
y - y coordinate.

face

Rotates the Turtle to a specified heading. (0 is right. 90 is up.)
Parameters:
angle - heading in degrees.

home

Returns the Turtle to position (0,0) with a heading of 0 degrees.

delay

Pauses the program.
Parameters:
t - pause in milliseconds

penColor

Sets the color that the Turtle draws with.
Parameters:
color - name of a color or a 6-digit hex color string (e.g. '00FF00' for green)

penColor

Sets the color that the Turtle draws with, allows custom colors.
Parameters:
red - red as value between 0 - 255
green - green as value between 0 - 255
blue - blue as value between 0 - 255

penColor

Sets the color that the Turtle draws with, allows custom colors with alpha channel.
Parameters:
red - red as value between 0 - 255
green - green as value between 0 - 255
blue - blue as value between 0 - 255
alpha - alpha as value between 0 - 255

setOpacity

Sets the opacity of the color that the Turtle draws with.
Parameters:
alpha - alpha value between 0 - 255 to set as opacity of new pen color

penSize

Sets the line width that the Turtle draws.
Parameters:
size - line width in pixels

x

Gets the x coordinate.
Returns:
x coordinate

y

Gets the y coordinate.
Returns:
y coordinate

heading

Gets the heading.
Returns:
the angle that the Turtle is facing in degrees. (0 is right. 90 is up.)

distance

Gets the distance between the Turtle's position and another specified position.
Parameters:
x - x coordinate
y - y coordinate

heading

Gets the heading if the Turtle was facing the specified position. (0 is right. 90 is up.)
Parameters:
x - x coordinate
y - y coordinate

isDown

Checks to see if the Turtle's tail is down.
Returns:
true if the Turtle's tail is down.

clear

Clears the screen to white.

clear

Clears the screen to a color.
Parameters:
color - name of a color or a 6-digit hex color string (e.g. '00FF00' for green)

screenSize

Resizes the drawable area of the window.
Parameters:
width - width in pixels.
height - height in pixels.

worldCoordinates

Sets the what Turtle position will be at the bottom-left and the top-right of the screen.
Parameters:
minx - x coordinate of the left side of the screen.
miny - y coordinate of the bottom of the screen.
maxx - x coordinate of the right side of the screen.
maxy - y coordinate of the top of the screen.

save

Saves the screen to a PNG image.
Parameters:
filename - the filename of the image excluding the extension. (e.g. 'myImage' instead of 'myImage.PNG')

bye

Closes and exits the program.

interactiveMode

Allows the user to type what they want the Turtle to do while the Turtle window is up.

main

Turtle demo.
Parameters:
args - commandline arguments