NETLOGO: turtle placement

119 views Asked by At

My simulation space is a total of 1024 patches. I need to randomly place 113 turtles within the middle area of my simulation space which is only 78 patches. Does anyone have any input on how to do this and make sure that the turtles are only in that specified area? Thanks!

1

There are 1 answers

0
JenB On

Positions are simply numbers so you can set xcor and ycor in appropriate ranges by using the random-float generator and rescaling as required. For example, set xcor 3 + random-float 5 will locate the turtle with an x coordinate in the interval from 3 to 8