Serendip is an independent site partnering with faculty at multiple colleges and universities around the world. Happy exploring!

Emergence 2009: Langton's Ant V

Emergence

Biology 361 = Computer Science 361
Bryn Mawr College, Spring 2009

Back to index of models

Download/view: Stars1.nlogo

 

WHAT IS IT?
This model shows how stars are formed (kind of). It demonstrates how a few simple interations can create complex and good-looking patterns.
HOW IT WORKS

The world starts off black, with as many turtles created in the center as is specified by the num-turtles slider. The first 4 turtles face 0, 90, 180 and 270 degrees respectively. The directions of the other turtles is generated by Netlogo. The turtles move forward by the number of units specified in move-forward, and if the patch they land on is black, they turn the patch color to white and rotate 90 degrees right. Otherwise, it turns it sky and rotates left 90 degrees. At the same time, it changes the color of the patch that is 30 units in the x direction and 30 units in the y direction to yellow too.

HOW TO USE IT

- The num-turtles slider determine how many turtles to create initially.

- The move-forward slider says how many units each turtle should move forward by.

- Only the first 4 turtles have a specific direction. The rest are generated by Netlogo. Use the seed slider to yield the same sequence every time.

- The setup button clears the screen and creates the number of turtles set by num-turtles slider.

- Click on go forever to see the pattern produced.

THINGS TO NOTICE

For 4 turtles, the pattern produced will always be the same, no matter where the seed slider is at. This is because the direction of the first 4 turtles is set - it isn't determined by Netlogo.

THINGS TO TRY
Try running the model with the same num-turtles and num-forward and by changing the seed slider only. Are the patterns produced very differnt? Try out 4 turtles and 50 units forward to see the pattern that is produced.
EXTENDING THE MODEL
What changes if the seed slider is removed?
NETLOGO FEATURES
Without the seed slider, the model is not deterministic anymore.
RELATED MODELS
Take a look at the Vants model - it has similar rules, but very different outcomes.
CREDITS AND REFERENCES
The Vants model.

 

Models created using NetLogo.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.
7 + 5 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.