我制作了一个模型,将派系(不同颜色的海龟)排列成一个圆圈。
目前他们随机排列,想知道是否有人可以帮我安排它们,例如,红色占据前 90 度,蓝色占据下一个 90 度,等等(在设置中)。
这是我的代码...
ask patch 0 0
[ ask patches in-radius ( max-pxcor * .9) with [ random-float 100 < density ]
[ sprout 1
[ set breed cons
set shape "circle"
set faction random factions
set heading random 360
set size 1
]
]
]
.. 猜测我将不得不做 360 / 分数,但不知道如何表达它,如果有人可以帮助我,那就太好了。谢谢!