To build patch clusters at large spatial scales

巧了我就是萌 提交于 2019-11-29 17:20:50
Bryan Head

If your goal is to simply have heterogeneous regions (rather than specifically blocky, symmetric things), you might play around with some of the answers here: Creating a random shape (blob) of a given area in NetLogo

Frank's solution and my first solution will probably run pretty slow on that large of a world. I just added a solution that should scale to a world of your size. I've put it here too for convenience:

to make-blob [ area x y ]
  let blob-maker nobody
  crt 1 [ set blob-maker self setxy x y ]
  let border patch-set [ patch-here ] of blob-maker
  repeat area [
    ask blob-maker [
      ask min-one-of border [ distance myself ] [
        set pcolor green
        set border (patch-set border neighbors4) with [ pcolor = black ]
      ]
      rt random 360
      fd .8
    ]
  ]
  ask blob-maker [ die ]
end

That said, if you like the blockiness, it's often the case that models with a large number of patches in a blocky formation can be reworked into models with a smaller number of patches that behave quite similarly. For example, one strategy is to scale down the size and movements of the turtles so that the world is still relatively large to them.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!