NetLogo: How can I address the angles in the zy plane?

Viewed 16

I want to find a way in which I can use the following code (taken from the model Ants of the models library) in a way in which the cues come from the zy plane (like from up and down in a 3D world).

to follow-vertical-chemical-cue

  let cue-ahead chemical-cue-at-angle 0
  let cue-up chemical-cue-at-angle 45
  let cue-down chemical-cue-at-angle -45
  if (cue-up > cue-ahead) or (cue-down > cue-ahead)
  [
    ifelse cue-up > cue-down
    [tilt-up turn-up]
    [tilt-down turn-down]
  ]

end

to-report chemical-cue-at-angle [angle]

  let p patch-right-and-ahead angle 1
  if p = nobody [report 0]
  report [chemical] of p

end
0 Answers
Related