Skip to content

An implementation of turtle graphics in Java using a single file to allow for easy student use.

License

Notifications You must be signed in to change notification settings

NicholasSeward/Turtle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turtle

This page is dedicated to a custom Java class for drawing turtle graphics. Turtle allows you to draw 2D graphics by telling a turtle what to do. The turtle can turn and travel forwards and backwards. You can also raise and lower the tail of the turtle to control whether it draws or not. Complex drawings can be made with very little code. Check out the code for the image at the bottom of the page.

This is currently version 2.0 and has been in use by multiple teachers for over 10 years. Version 3.0 is in the works. It will likely be smaller and more feature complete. New features: polyfill, 3D, better text support, arbitrary transforms.

Documentation

Tutorial

Lessons

Square Spiral

SquareSpiral.java

public class SquareSpiral
{
    public static void main(String[] args) 
    {
        Turtle bob = new Turtle();
        for(int i=0;i<360;i  )
        {
            bob.forward(i*1.25);
            bob.left(90.25);
        }
    }
}

Turtle Video

About

An implementation of turtle graphics in Java using a single file to allow for easy student use.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages