Tracy Kuper
Tracy Kuper

Reputation: 51

NetLogo: Measure total area covered by turtles

After my NetLogo simulation, I would like to measure the total area covered by only the turtles. Is there a simple way to implement this in NetLogo, or will I have to do this in another program?

My simulation has clusters that form and I would eventually like to calculate the cluster agent density. 1

Upvotes: 1

Views: 73

Answers (1)

JenB
JenB

Reputation: 17678

NetLogo is not aware of where the edge of the turtles’ shapes are. So, if you are trying to work out what proportion of the screen has shapes on it, you need to do some complicated programming to calculate where the edges of the shapes are, how they overlap and so on. However, if all you care about is where the turtles are, then it's much easier. For example, to work out the proportion of patches where there are at least one turtle, you could do:

count patches with [any? turtles-here] / count patches

Upvotes: 2

Related Questions