Computer simulation of the dynamics of rigid bodies interacting through
collisions, stacks and joints is performed using a constraint-based
system in which constraints are defined in terms of the positions of the
bodies. Displacements caused by reaction forces necessary to ensure that
the bodies comply with the position constraints can be calculated and can
be done iteratively by updating equations defining the reaction forces
and the displacements such that the computation time and memory resources
required to perform the calculations is linearly dependent upon the
number of bodies and the number of contacts and joints between the
bodies. Computational requirements and memory requirements are reduced
further by performing the calculations using vector operations.