max-pxcor3.1 max-pycor3.1

max-pxcor max-pycor

These reporters give the maximum x-coordinate and maximum y-coordinate, (respectively) for patches, which determines the size of the world.

Unlike in older versions of NetLogo the origin does not have to be at the center of the world. However, the maximum x- and y- coordinates must be greater than or equal to zero.

Note: You can set the size of the world by editing the view or using resize-world.

crt 100 [ setxy random-float max-pxcor
                random-float max-pycor ]
;; distributes 100 turtles randomly in the
;; first quadrant

See also min-pxcor, min-pycor, world-width, and world-height

Take me to the full NetLogo Dictionary