【发布时间】:2021-10-10 08:05:47
【问题描述】:
大家下午好: 目前我正在 Netlogo 的一个程序中工作,我想将世界划分为上象限和下象限,并要求海龟移动到上象限。我已经从这里回答的上一个问题中弄清楚了如何将世界划分为四个象限,但我不知道如何将其划分为两个。
非常感谢您的帮助
ask patches with [ pxcor <= max-pxcor and pxcor > 0 and pycor > 0]
[
set pcolor red
set quadrant 1
]
ask patches with [ pxcor >= min-pxcor and pxcor < 0 and pycor > 0]
[
set pcolor blue
set quadrant 2
]
ask patches with [ pxcor <= max-pxcor and pxcor > 0 and pycor < 0]
[
set pcolor green
set quadrant 3
]
ask patches with [ pxcor >= min-pxcor and pxcor < 0 and pycor < 0]
[
set pcolor yellow
set quadrant 4
]
【问题讨论】:
-
我还想指出,在 OP 的示例代码中,短语“pxcor
标签: netlogo