BehaviourComposer: ignore everything before this.Note that this needs to be a behaviour of the agents being laid out. It works by finding a position in the list of all agents being laid out in this circle and using that to compute the angle from the centre that it is to be moved to.
Begin description: Jump to a location on a circle. Many agents can do this and will be spread out along the circle. End description
Jump to a location on a circle
Begin NetLogo code:
substitute-text-area-for radius 8 substitute-text-area-for center-x 0 substitute-text-area-for center-y 0 substitute-text-area-for agents-on-the-circle all-individuals let saved-my-heading my-heading let those-in-the-circle sort agents-on-the-circle set my-next-heading position self those-in-the-circle * 360 / length those-in-the-circle set my-next-x center-x set my-next-y center-y go-forward radius set my-heading saved-my-heading
End NetLogo code
Jump to a location on a circle was implemented by Ken Kahn.
Place a set of agents on a circle relies upon the NetLogo layout-circle primitive which is restricted to placing all circles in the centre of the world. Place a set of agents in a rectangular grid places agents to fill a rectangle. Lay out a set of agents where the agents repel each other and the links between them act like springs attempts to find good locations for agents based upon their links with other agents. There are many movement behaviours in the main library.
BehaviourComposer: ignore everything after this.