User Tools

Site Tools


turtle_graphics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
turtle_graphics [2024/09/11 09:52] – [Java "Animated" APLU Turtle] frchristurtle_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,-50);         hexter.setPos(100,-50);
                
-         
         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,0);         hexter.setPos(0,0);
         hexter.setFillColor(Color.BLUE);         hexter.setFillColor(Color.BLUE);
-     hexter.fill();+ hexter.fill();
            
         Turtle t = new Turtle(hexter);          Turtle t = new Turtle(hexter); 
-        t.setColor(Color.RED); +        t.setPenColor(Color.RED); 
- t.setPos(-200, 180); + t.setPos(-200, 180); 
-     t.hideTurtle().label( "by My name"); + t.hideTurtle()
 +        t.label( "by My name");
            
  }  }
turtle_graphics.1726062769.txt.gz · Last modified: 2024/09/11 09:52 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki