AutoMovie API
    Preparing search index...

    Function steerAutoMovieCrowd

    • A crowd's ways planned once: every agent heads for its goals at its own desired speed and avoids the others and the obstacles by anticipation, the whole crowd integrated together on a fixed step and each agent's course read back by time.

      Each agent's acceleration is the social force model's driving term toward its desired velocity, (v0 e0 - v) / tau with the relaxation time tau (Helbing and Molnar 1995, Phys Rev E 51:4282), plus the anticipatory interaction of the universal power law (Karamouzas, Skinner and Guy 2014, Phys Rev Lett 113:238701): with every other agent and obstacle it would meet within the time to collision t at the current velocities, the force is minus the spatial gradient of E(t) = k t^-2 exp(-t / t0). That gradient is k exp(-t / t0) t^-2 (2 / t + 1 / t0) along the contact normal n at the predicted collision, divided by the closing speed along it, -(n . u), so the push grows as a collision nears in time and is aimed away from where it would happen. The desired direction e0 follows the goals as Reynolds's path following does (Reynolds 1999): toward the point LOOKAHEAD seconds of desired travel past the agent's nearest point on the polyline of its start and goals, slowed within ARRIVAL relaxation times of desired travel from its destination; with a herding share p it is N[(1 - p) e0 + p <v_j> / v0] (Helbing, Farkas and Vicsek 2000, Nature 407:487), <v_j> the mean velocity of the agents within NEIGHBOURHOOD, each weighted by Tukey's biweight kernel (1 - (d / NEIGHBOURHOOD)^2)^2 (Beaton and Tukey 1974; the compactly supported smoothing kernels of SPH and Wendland's family are of the same kind): the paper's mean heading of the neighbours, read with a compact, continuously differentiable weight that falls to nothing at the neighbourhood's edge and a velocity that grows from rest, so the right-hand side is Lipschitz, which a well-posed integration needs (Picard and Lindelof), and no neighbour's entry or start jumps it. At each integration stage, the position rate comes from projecting the agent's own velocity into its maximum speed disc and the reciprocal avoidance half-planes over the horizon t0 (van den Berg, Guy, Lin and Manocha 2011, solveAutoMovieHalfPlaneProgram): the anticipatory force steers, and the half-plane program supplies a projected position rate at each integration stage. The program can return a fallback when its constraints are infeasible. An obstacle takes part in the anticipatory push and also in the program. Its half-plane is the agent's own exit from the obstacle's velocity obstacle relative to its motion (Fiorini and Shiller 1998), so an obstacle that overtakes, meets or crosses the agent is anticipated by its velocity. The exit is the nearest the agent's speed can reach (steerAutoMovieCrowdGeometry.obstacle). The program keeps the obstacles' half-planes hard when it falls back, as van den Berg et al. keep theirs, so agents may crowd one another but do not give way into an obstacle. The sampled diagnostics cannot certify clearance between knots.

      The state of the whole crowd is one vector handed to the engine's one fixed-step integrator, integrateMotionTrajectory (#3424), so every agent sees every other at the same instant (a synchronous update) and the courses are read back by its Hermite interpolation. Agents with distinct sort keys are integrated in a canonical order, so listing them in another order gives bit-identical courses. Interaction couples agents: adding one changes the others' courses. The pass is kinematic and reports a pair in contacts when the pair overlaps at two successive knots.

      The force scale K is the energy's normalisation, which the paper fixes only up to units (E(1) = 1 in its figure); the published simulation's own constants, its force cap and its sensing range were searched for (the paper's supplement and the authors' page could not be read) and are provisional here, as is every other named constant marked so.

      Parameters

      Returns IAutoMovieSteerCrowd.IResult

      Each agent's course in the order given, and the contacts.

      When an agent's radius, speed or start is not finite and positive where it must be, a goal list is empty, or the interval is not forward: a caller's defect.