Hawk's eye in cricket (Pigeon vision)

Hawk's eye in cricket (Pigeon vision) preview image

1 collaborator

Default-person Anurag Palkar (Author)

Tags

ballistics 

Tagged by Anurag Palkar over 5 years ago

projectile motion& 

Tagged by Anurag Palkar over 5 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 3D 6.0.2 • Viewed 143 times • Downloaded 11 times • Run 0 times
Download the 'Hawk's eye in cricket (Pigeon vision)' modelDownload this modelEmbed this model

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


## WHAT IS IT?

(a general understanding of what the model is trying to show or explain)

## HOW IT WORKS

(what rules the agents use to create the overall behavior of the model)

## HOW TO USE IT

(how to use the model, including a description of each of the items in the Interface tab)

## THINGS TO NOTICE

(suggested things for the user to notice while running the model)

## THINGS TO TRY

(suggested things for the user to try to do (move sliders, switches, etc.) with the model)

## EXTENDING THE MODEL

(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)

## NETLOGO FEATURES

(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)

## RELATED MODELS

(models in the NetLogo Models Library and elsewhere which are of related interest)

## CREDITS AND REFERENCES

(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)

Comments and Questions

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

Click to Run Model

turtles-own [theta phi bz]
breed [batsts batst]
globals [g down ini_vel vel]
extensions [ vid ]

to-report brightcolors
  report ((random 7) + 3) * 10 + ((random 6) + 4)
end 

to setup
  clear-all
  reset-ticks
  ;import-drawing "./pitch.jpg"
  create-turtles 1 [
    set size 1.2
    set color brightcolors
    set shape "ball baseball"
    if style = "left arm around" [set bz -8]
    if style = "left arm over" [set bz 3]
    if style = "right arm around" [set bz 8]
    if style = "right arm over" [set bz -3]

    setxyz -37 20 bz
    set theta ini_theta
    set ini_vel ini_velocity
    set vel (list (ini_vel * cos theta * cos phi) (ini_vel * sin theta * cos phi) (ini_vel * sin phi))
    set heading theta + 90
    set pitch ini_phi
    set g (10 / 100)
    set down True
    pd
  ]
  create-batsts 10 [
    setxyz 38 who 0
    set size 1
    set heading 0
  ]
  create-turtles 10 [
    setxyz -38 who - 10 0
    set size 1
    set heading 0
  ]
  create-batsts 10 [
    setxyz 38 who - 20 2
    set size 1
    set heading 0
  ]
  create-turtles 10 [
    setxyz -38 who - 30 2
    set size 1
    set heading 0
  ]
   create-batsts 10 [
    setxyz 38 who - 40 -2
    set size 1
    set heading 0
  ]
  create-turtles 10 [
    setxyz -38 who - 50 -2
    set size 1
    set heading 0
  ]
  ;ask patches [set pcolor green]
end 

to onestep
  if xcor > 38 [stop]
  if ycor > 0.1 and down
  [
  fd ini_vel
  set ini_vel (item 0 vel ^ 2 + (item 1 vel + g) ^ 2 + (item 2 vel) ^ 2) ^ 0.5
  set vel (list (item 0 vel) (item 1 vel + g) (item 2 vel))
  set theta atan item 1 vel item 0 vel
  set heading theta + 90
  print g
  ]
  if ycor <= 0.1 or not down
  [
  set down False
  set ini_vel (item 0 vel ^ 2 + (item 1 vel - g) ^ 2) ^ 0.5
  set vel (list (item 0 vel) (item 1 vel - g) (item 2 vel))
  set theta atan item 1 vel item 0 vel
  set heading 90 - theta
  fd ini_vel * .9
  print g
  ]
end 

to takestep
  ask turtle (0) [ onestep ]
end 

to go
  ask turtle (0)[ onestep ]
  export-view (word ticks".png")
  if ticks = 17 [ vid:save-recording "fo1.gif" ]
  tick
end 

There is only one version of this model, created over 5 years ago by Anurag Palkar.

Attached files

File Type Description Last updated
Hawk's eye in cricket (Pigeon vision).png preview Preview for 'Hawk's eye in cricket (Pigeon vision)' over 5 years ago, by Anurag Palkar Download

This model does not have any ancestors.

This model does not have any descendants.