turtle_graphics
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
turtle_graphics [2024/09/11 09:52] – [Java "Animated" APLU Turtle] frchris | turtle_graphics [2024/09/12 14:27] (current) – [Make Your own Picture] frchris | ||
---|---|---|---|
Line 71: | Line 71: | ||
| | ||
Turtle hexter = new Turtle(Color.GREEN); | Turtle hexter = new Turtle(Color.GREEN); | ||
+ | | ||
hexter.setPos(100, | hexter.setPos(100, | ||
- | | ||
for (int i=0; i< 6; i++) { | for (int i=0; i< 6; i++) { | ||
hexter.forward(100); | hexter.forward(100); | ||
hexter.right(-60); | hexter.right(-60); | ||
} | } | ||
+ | | ||
hexter.setPos(0, | hexter.setPos(0, | ||
hexter.setFillColor(Color.BLUE); | hexter.setFillColor(Color.BLUE); | ||
- | | + | hexter.fill(); |
| | ||
Turtle t = new Turtle(hexter); | Turtle t = new Turtle(hexter); | ||
- | t.setColor(Color.RED); | + | t.setPenColor(Color.RED); |
- | t.setPos(-200, | + | t.setPos(-200, |
- | | + | t.hideTurtle(); |
+ | t.label( "by My name" | ||
| | ||
} | } |
turtle_graphics.1726062769.txt.gz · Last modified: 2024/09/11 09:52 by frchris