Diffusion Final MIHS
Model was written in NetLogo 5.2.1
•
Viewed 227 times
•
Downloaded 28 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Aedan McCall, Theo Copley & Austin Hoyt Period 7 Diffusion
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
globals [ Numberofcollisions ] to setup clear-all set Numberofcollisions 0 create-turtles Molecules [ setxy random-xcor random-ycor ] ;figure out how to set ;the turtles to spawn within a confined space without just infinitely bouncing off each other reset-ticks end to go move-turtles if ticks >= 500 [ stop ] collisioncheck tick end to move-turtles ask turtles [ right random 1 forward 1 ] end to collisioncheck ask turtles [ if patch-at dx 0 = nobody [ set heading (- heading) ] if patch-at 0 dy = nobody [ set heading (180 - heading) ] ;Check to see if the turtle is at the edge of the world; if so, then the turtle turns around let nearby-turtles nobody set nearby-turtles turtles in-radius 2 if any? nearby-turtles [ let chosen-turtle [who] of one-of nearby-turtles ;face one-of nearby-turtles if chosen-turtle != [who] of self [ face turtle chosen-turtle rt 180 forward 1 set Numberofcollisions Numberofcollisions + 1 ] ] ] end
There is only one version of this model, created over 8 years ago by Aedan McCall.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Diffusion Final MIHS.png | preview | Preview for 'Diffusion Final MIHS' | over 8 years ago, by Aedan McCall | Download |
This model does not have any ancestors.
This model does not have any descendants.