I place a set of agents on a circle.

Begin micro-behaviour

LAYOUT-CIRCLE

Begin NetLogo code:
substitute-text-area-for radius 8               
substitute-text-area-for selection-criteria true                        
layout-circle 
  all-individuals with [selection-criteria] 
  radius ; the radius of the circle
End NetLogo code

Variants

To change the radius of the circle change the 8 to another number. If you want separate circles for different kinds of agents, e.g. "Sheep" then replace true with kind = "Sheep" inside the square brackets.

Related Micro-behaviours

LAYOUT-GRID lays out the agents in a rectangular grid. LAYOUT-SPRING computes a layout treating the links as springs.

SET-RANDOM-POSITION sets an agent's heading to a random value. SET-RANDOM-UNOCCUPIED-POSITION also finds a random position but only if it is unoccupied.

How this works

This uses the NetLogo layout-circle primitive to place the agents in a circle.

History

This was implemented by Ken Kahn