【发布时间】:2012-01-31 11:35:20
【问题描述】:
我一直在尝试在 NetLogo 中显示乌龟的当前坐标。我知道要显示其中一个坐标,我可以使用:
show [xcor] of turtle 0
或
show [ycor] of turtle 0
但是如何显示两个坐标呢?
谢谢。
【问题讨论】:
标签: netlogo
我一直在尝试在 NetLogo 中显示乌龟的当前坐标。我知道要显示其中一个坐标,我可以使用:
show [xcor] of turtle 0
或
show [ycor] of turtle 0
但是如何显示两个坐标呢?
谢谢。
【问题讨论】:
标签: netlogo
你可以show [list xcor ycor] of turtle 0。
或者,更高级的:show [(word "(" xcor ", " ycor ")")] of turtle 0。
【讨论】:
如果您不知道确切的海龟 (of turtle 5) 的坐标,但您想确定运行进程的特定海龟的位置,您可以使用
show list xcor ycor ; not need to use self or myself
【讨论】:
show list xcor ycor。它永远不会增加使用 of self 的意义
从 http://ccl.northwestern.edu/netlogo/docs/programming.html#syntax
你可以的
显示乌龟 5 的 [xcor + ycor]
但不确定这是否有帮助?
对不起.. 它没有.. 1 秒!
【讨论】: