Netlogo shown today: Create 16 turtles Move forward 6 turtle steps ----------------- --------------------------- cro 16 fd 6 Put your pen down Lift your pen (or turtle tail) up ----------------- --------------------------------- pd pu Turn right 90 degrees Clear all (erase everything) --------------------- ---------------------------- rt 90 ca Draw a square (if your Pen is Down - PD you will see square) ------------------------------------------------------------ repeat 4 [ fd 3 rt 90 ] The above square has a side length of 3 Draw a cool pattern of 36 spiralling squares (if PD pen down) ------------------------------------------------------------- repeat 36 [ rt 10 repeat 4 [ fd 3 rt 90 ] ] What is 36 times 10? 360 degrees. So you will have a complete round the world circle of squares. Observer mode commands: ca, cro, Turtles mode commands: fd, rt, pd, pu Note: repeat is used in either mode, depending on what you need to do. repeat howManyTimes [ what you want to do ] What would the following repeat create, if we assume the pens of the turtles were down (PD or pd) so we could see the trail left by the turtle tails (or pens, aka pens)? repeat 8 [ fd 3 rt 45 ] <---- draws what???? repeat 4 [ fd 3 rt 90 ] <---- draws a square
Netlogo is also available at most of the computer labs on the UNI campus, including all CNS labs and all of the SCC (Student Computer Center) labs like the Library, Union, Redeker, Towers, Lawther, etc.
Even and Odd turtles become Fish and Airplanes. Also, see all of the default shapes for turtles. FlyFishing.html NetLogo example to play with.
Assignment Two: This is 3 of 4 questions/tasks handed out today in class: Music, Even and Odd Turtles, Chemistry & Physics Maxwell's Demon Gaslab NetLogo model - due on the Wednesday AFTER Labor Day (Due on Sep 03, 2012).
60, a deer, a female deer. 62, a drop of golden sun. 64, a name I call myself 65, a long, long way to run 67, a needle pulling thread 69, a note to follow 67 71, I drink with jam and bread That will bring us back to 72...oh oh ohThe magificent seven: Do-re-mi-fa-so-la-ti.
When you read you begin with A-B-C When you count you begin with 1-2-3 When you sing you begin with do-re-mi
More examples/explanations Music and NetLogo...