Skip to content

Instantly share code, notes, and snippets.

@ellbur
Created November 15, 2011 20:22
Show Gist options
  • Select an option

  • Save ellbur/1368211 to your computer and use it in GitHub Desktop.

Select an option

Save ellbur/1368211 to your computer and use it in GitHub Desktop.
That thing on the chatper pages of Jurassic Park
public class Drawing1 {
public static void main(String[] args) {
Turtle.setSpeed(1000);
y(10);
}
static void x(int n) {
if (n == 0) {
return;
}
else {
x(n-1);
Turtle.turn(90);
y(n-1);
Turtle.draw(10);
}
}
static void y(int n) {
if (n == 0) {
return;
}
else {
Turtle.draw(10);
x(n-1);
Turtle.turn(-90);
y(n-1);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment