Skip to content

Commit

Permalink
update: finish up
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonGamerBot-QK committed Oct 7, 2024
1 parent b84c50c commit 808db70
Showing 1 changed file with 37 additions and 10 deletions.
47 changes: 37 additions & 10 deletions projects/Turtle/MyProgram.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ public static void main(String[] args) {
// import turtle.Turtle;
Turtle turtle = new Turtle();
turtle.penColor("red");
//draw your first initial
turtle.hide();

// draw your first initial
turtle.towards(10, 10);
turtle.backward(25);
turtle.right(90);
Expand All @@ -20,7 +22,7 @@ public static void main(String[] args) {
turtle.right(90);
turtle.forward(25);

//draw a 5 pointed star
// draw a 5 pointed star
turtle.up();
turtle.forward(100);

Expand All @@ -32,26 +34,51 @@ public static void main(String[] args) {
turtle.backward(50);
turtle.up();
}
//draw a flower
// draw a flower
turtle.home();
turtle.up();
turtle.left(90);
turtle.forward(100);
turtle.down();
turtle.forward(50);
turtle.down();
turtle.forward(150);
int tilt = 0;
for (int i = 0; i < 36; i++) {
turtle.penColor(Color.GREEN);
turtle.penColor(Color.YELLOW);
turtle.forward(50);
turtle.backward(50);
turtle.right(10);
tilt += 10;
}
turtle.right(180);
turtle.right(180 * tilt);
turtle.shapeSize(50, 50);
turtle.penColor(Color.darkGray);
turtle.forward(100);
//Create something colorful

// turtle.forward(100);
// Create something colorful
turtle.up();
turtle.home();
turtle.right(180);
turtle.forward(200);
turtle.down();
for(int i = 0; i< 50; i++) {
for (int j = 0; j < 50; j++) {
float midd = (float) (i + j) / 100;
turtle.penColor(Color.getHSBColor((float) i / 5 , midd, (float) j / 20));
turtle.setDirection(i * 8.5);
turtle.forward(10);
turtle.setDirection(j * 9);
turtle.forward(10);
turtle.setDirection((i + j) * 10);
turtle.forward(10);
turtle.setDirection((i - j) * 10);
turtle.forward(10);
}
}
turtle.show();
turtle.up();
turtle.home();
turtle.down();
while (1 != 0) {
turtle.right(10);
}
}
}

0 comments on commit 808db70

Please sign in to comment.