<s>
In	O
physical	B-Algorithm
simulations	I-Algorithm
,	O
sweep	B-Algorithm
and	I-Algorithm
prune	I-Algorithm
is	O
a	O
broad	O
phase	O
algorithm	O
used	O
during	O
collision	O
detection	O
to	O
limit	O
the	O
number	O
of	O
pairs	O
of	O
solids	O
that	O
need	O
to	O
be	O
checked	O
for	O
collision	O
,	O
i.e.	O
</s>
<s>
This	O
is	O
achieved	O
by	O
sorting	O
the	O
starts	O
(	O
lower	O
bound	O
)	O
and	O
ends	O
(	O
upper	O
bound	O
)	O
of	O
the	O
bounding	B-Algorithm
volume	I-Algorithm
of	O
each	O
solid	O
along	O
a	O
number	O
of	O
arbitrary	O
axes	O
.	O
</s>
<s>
When	O
the	O
bounding	B-Algorithm
volumes	I-Algorithm
of	O
two	O
solids	O
overlap	O
in	O
all	O
axes	O
they	O
are	O
flagged	O
to	O
be	O
tested	O
by	O
more	O
precise	O
and	O
time-consuming	O
algorithms	O
.	O
</s>
<s>
Sweep	B-Algorithm
and	I-Algorithm
prune	I-Algorithm
exploits	O
temporal	O
coherence	O
as	O
it	O
is	O
likely	O
that	O
solids	O
do	O
not	O
move	O
significantly	O
between	O
two	O
simulation	O
steps	O
.	O
</s>
<s>
Because	O
of	O
that	O
,	O
at	O
each	O
step	O
,	O
the	O
sorted	O
lists	O
of	O
bounding	B-Algorithm
volume	I-Algorithm
starts	O
and	O
ends	O
can	O
be	O
updated	O
with	O
relatively	O
few	O
computational	O
operations	O
.	O
</s>
<s>
Sorting	O
algorithms	O
which	O
are	O
fast	O
at	O
sorting	O
almost-sorted	O
lists	O
,	O
such	O
as	O
insertion	B-Algorithm
sort	I-Algorithm
,	O
are	O
particularly	O
good	O
for	O
this	O
purpose	O
.	O
</s>
<s>
According	O
with	O
the	O
type	O
of	O
bounding	B-Algorithm
volume	I-Algorithm
used	O
,	O
it	O
is	O
necessary	O
to	O
update	O
the	O
bounding	B-Algorithm
volume	I-Algorithm
dimensions	O
every	O
time	O
a	O
solid	O
is	O
reoriented	O
.	O
</s>
<s>
To	O
circumvent	O
this	O
,	O
temporal	O
coherence	O
can	O
be	O
used	O
to	O
compute	O
the	O
changes	O
in	O
bounding	B-Algorithm
volume	I-Algorithm
geometry	O
with	O
fewer	O
operations	O
.	O
</s>
<s>
Another	O
approach	O
is	O
to	O
use	O
bounding	B-Algorithm
spheres	I-Algorithm
or	O
other	O
orientation	O
independent	O
bounding	B-Algorithm
volumes	I-Algorithm
.	O
</s>
<s>
Sweep	B-Algorithm
and	I-Algorithm
prune	I-Algorithm
is	O
also	O
known	O
as	O
sort	B-Algorithm
and	I-Algorithm
sweep	I-Algorithm
,	O
referred	O
to	O
this	O
way	O
in	O
David	O
Baraff	O
's	O
Ph.D.	O
thesis	O
in	O
1992	O
.	O
</s>
<s>
refer	O
to	O
the	O
algorithm	O
as	O
sweep	B-Algorithm
and	I-Algorithm
prune	I-Algorithm
.	O
</s>
