Egg Drop

No preview image

1 collaborator

Default-person Alice Johnson (Author)

Tags

gravity 

Tagged by Alice Johnson over 4 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.0 • Viewed 70 times • Downloaded 11 times • Run 0 times
Download the 'Egg Drop' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

turtles-own [time dist]

to setup
  clear-all
  reset-ticks
  ask patches [set pcolor blue]
  ask patches with [pycor < 15][set pcolor green]
  ask patches with [pycor < drop_height and pxcor < 100]
  [set pcolor black]
  create-turtles 1
  [set shape "egg"
    set size 40
    set color white
    setxy 115 drop_height
    set heading 0]
end 

to go; for "drop"
  tick
  ask turtles [set time time + 1]
  ask turtles [forward dist
    set dist (time * 2 - 1) * -16]
  wait 0.1
  ask turtles [if pcolor = green [set shape "petals" set color yellow stop]]
  show [time - 1] of turtle 0
  show [ycor] of turtle 0
  If any? turtles with [pcolor = green] [stop]
end 

to steps; to control the drop second by second
   tick
  ask turtles [set time time + 1]
  ask turtles [forward dist
    set dist (time * 2 - 1) * -16]
  ask turtles [if pcolor = green [set shape "petals" set color yellow]]
  show [time - 1] of turtle 0
  show [ycor] of turtle 0
  If any? turtles with [pcolor = green] [stop]
end 

There is only one version of this model, created over 4 years ago by Alice Johnson.

Attached files

File Type Description Last updated
egg drop preview.png png Preview over 4 years ago, by Alice Johnson Download

This model does not have any ancestors.

This model does not have any descendants.