ball bouncing

No preview image

1 collaborator

Corey Corey Brady (Author)


(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0RC10 • Viewed 284 times • Downloaded 13 times • Run 0 times
Download the 'ball bouncing' 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

to setup
  ask patches with [ abs pxcor = max-pxcor  or abs pycor = max-pycor ] [ set pcolor yellow ]
  create-turtles 1
   set shape "circle"
   set size 2
   set color lime 

to go
  every .01
  ask turtles 
   fd speed
   if [pcolor] of patch-ahead speed = yellow

to bounce
  ifelse abs ( [pxcor] of patch-ahead speed) = max-pxcor 
   set heading (- heading)
    set heading 180 - heading 

There is only one version of this model, created almost 9 years ago by Corey Brady.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.