field.dipoleOrRadial

The field of a magnet at the cursor: a bar magnet along its travel, or a single pole.

field.dipoleOrRadial(layout: OrientationLayout): AgentFieldAt

Import sim from shaders/std and use sim.agentForces.field.dipoleOrRadial.

Parameters

NameTypeNotes
layoutOrientationLayout

Example

integrator.orientation2d(simLayout, {home, fieldAt: field.dipoleOrRadial(simLayout), torques, maxOffset: 0.12, name: 'filingsUpdate'})

See also