To build patch clusters at large spatial scales

后端 未结 1 1452
[愿得一人]
[愿得一人] 2020-12-22 03:24

I used the code from How to create cluster patches that do not overlap between them to build patches as shown in the first figure below.

Here is the code :



        
相关标签:
1条回答
  • 2020-12-22 03:58

    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.

    0 讨论(0)
提交回复
热议问题