Warning: This pages are still under construction.
Among the various strategies devised for aleviating the burden of computing interference between two polyhedral object models, orientation-based pruning has not been exploited to its full potential. Instead of using the information concerning the spatial localisation of the model's features, these approaches consider their orientations to eliminate candidates that cannot take part in a collision. The most intuitive of such approaches is back-face culling, a well-known concept in Computer Graphics adapted to collision detection. Here, the faces that are culled off are those whose normals do not project on the "interior" of the relative motion direction.
Each time the direction of relative motion changes, the set of candidate faces for intersection has to be updated. This is equivalent to the updating of volumetric hierarchies when the object's features attain new positions in space due to translations or rotations. In some cases, for example if the models are convex, such updating can be done in an incremental fashion. In the volumetric approaches, this is done exploiting spatial and temporal coherence: for small time increments, the features that realize the minimum distance (and are therefore good candidates for inminent collisions) are the same as in the previous time frame or in their neighborhood. Similarly, if the relative direction of movement changes smoothly, new faces to cull off appear (and others disappear) in the limit between previously culled and not culled ones.
As will become clear in what follows, orientation-based pruning constitutes an alternative to the more popular volumetrical focusing procedures. Furthermore, both approaches can be used together in a hibrid strategy.
Direction of motion gives an important on-line clue for restricting the faces to be considered for collision, attending to their orientation. However, it is strongly dependent on the actual relative velocities. Furthermore, these velocities have to be known or computed a priori. A velocity-independent orientation-based preprocessing of polyhedra, for enhancement of further collision checking, would be the construction of a hierarchical representation that partitions subsets of polyhedral features attending to their orientation. More on this will be considered later. Between both extremes, strategies can be devised that reduce the search space for a specific range of situations, like the present approach: here, the elimination of candidates exploits the fact that for a given relative orientation of polyhedra, only certain contacts between their boundary features can take place. Such contacts can be determined through the so-called applicability constraints (Donald, 87) .
Any contact between two polyhedra can be expressed in terms of two basic contacts:
It is obvious that if two polyhedra collide, the first edge - face pairs that are going to intersect are associated to applicable contacts. The choice of the edge - face candidate pair, for each applicable contact, depends on the type of contact:
Polyhedral features can be mapped on the spherical surface in a straightforward manner:
By superposition of the SFOG of one polyhedron on the central symmetric image of the SFOG of the other polyhedron, a compact representation of all applicable vertex-face and edge-edge contacts is obtained:
The problem of finding applicable features is reduced to that of obtaining node-region and arc-arc intersections efficiently.
while (OPEN_NODES <> Ø)endwhile }node <- OPEN_NODES; ordered_intersection(node, &EDGE_APP); for every a in Succ_Arcs(node)endwhileif EDGE_APP[a] = Ø thenendforif FACE_APP[succ_node(a)]= Ø thenelseFACE_APP[succ_node(a)]:=endifFACE_APP[node];succ_node(a) -> OPEN_NODES;a -> OPEN_ARCS;endif
while (OPEN_ARCS <> Ø)arc <- OPEN_ARCS; edge := last(EDGE_APP[arc]); cycle := succ_cycle(edge, arc); s := arc_intersection(arc, cycle, edge); if s=Ø thenendwhileif FACE_APP[succ_node(arc)] = Ø thenelseFACE_APP[succ_node(arc)] := cycle; succ_node(arc) -> OPEN_NODES;endifEDGE_APP[arc] <- s; arc -> OPEN_ARCS;endif
Complexity of this algorithm is linear in the output. A worst case can be found were the size of this output is quadratic, due to edge-edge applicability relationships (when the number of edges bounding a face of polyhedron P is O(nP) and the number of edges applicable to each of them is O(nQ)), but it is attached to a very specific geometry, where a large number of vertices are coplanar. If vertices are in general position, the number of edges applicable to the boundary of a face is bounded by a constant, and the output complexity becomes linear in the input.
It is straightforward to adapt the plane sweep principle to the sphere: the vertical
sweep-line is replaced by a sweep-meridian, the sweep begins at an arbitrary point
(as we cannot speak of a ``leftmost'' point), and proceeds eastwards (as the plane sweep
from left to right). As in the planar case of line
segment intersection detection, two arcs will intersect at most at one point (recall that arcs larger
than 180o have been removed, since they correspond to concave edges), and monotonicity
is ensured: one arc cannot intersect the sweep-meridian at more than one point simultaneously.
Each time the sweep-meridian arrives at the western endpoint of an arc a[i], this arc is tested for
intersection with all the active arcs (i.e., arcs currently intersected
by the sweep-meridian) of opposite colour Lc'[i]}$, and included in the list of active
arcs Lc[i] (c[i] denotes the colour of a[i]). As soon as the eastern endpoint of an arc is
reached, that arc is deleted from the active list. In this way,
every purple intersection will be detected exactly once. A pseudo-code transcription
of this simple algorithm is presented:
NAÏVE SFOG SEARCH ALGORITHM
Preprocessing: Order the 2n endpoints e[i] by increasing meridian value. Let a[i]
be the arc with endpoint e[i] and c[i] its colour.
Lred = Ø,
Lblue = Ø
for (i = 1 .. 2n) do
if (e[i] is a western endpoint) thenendforfor (all a' in Lc'[i]) doelseif (a[i] intersects a') thenendforreport purple intersectionendif
insert(a[i], Lc[i])delete(a[i], Lc[i])endif
Snapshots of this algorithm, and how the node-in-region inclusions are performed during the same sweep can be found here
A more sophisticated approach is based on the observation that, at a given instant, red and blue arcs along the sweep line are grouped into blocks of varying size. Purple intersections can only take place between the arcs at the limits of these monochromatic groups, e.g., the lowest arc of a blue block and the highest arc of the red block immediately beneath. In other words, "interior" arcs in each block do not have to be cared for. However, these delimiting arcs change as the sweep progresses, due to the insertion of new arcs, the deletion of existing arcs, purple intersections, and also crossings between arcs of the same colour. All these events have to be taken into account for updating conveniently the blocks. BEGIN and END events are basic to the sweep process, and PURPLE events are the desired output, but the monochromatic intersections are not interesting by themselves. As their number can even outgrow that of the PURPLE events, a healthy strategy will be that of computing only those monochromatic intersections that are necessary to keep the information about the frontier arcs updated. This purpose is pursued in the HeapSweep algorithm due to Basch and Guibas (Basch et al., 96) . This algorithm has been adapted to the sweep on a spherical surface.
Pseudocode of the algorithm is given below. The overall efficiency of the algorithm depends largely on the data structures used:
For clarity in the pseudocode, we highlight the node-region intersection part by using a different font color.
if current meridian >= 360° and first_after_complete_turn = FALSE thenfirst_after_complete_turn <- TRUE;endif
for all active blocks dobuild up list of regionsendfor
Extract next event from e_p_s
case event.type of
BEGIN :Search T to determine where s=event.arc has to be inserted.END :
if s is beyond the limits of T thenif the adjacent block has the same color than s thenelseinsert s in this block,else
update T
create new block with element s,endif
update T,
if current meridian >= 360° thenconstruct list of regions associated to this new block:endif
take the list of regions of the nearest same colored block,
delete from this list those regions closed by arcs in the block inbetween and
include the pole regions delimited by arcs in the block inbetween.
include event.node in these regions
test for PURPLE schedulingif both neighbors of s in T have distinct colors thenendifinsert s in the same colored block,else
update T
test for PURPLE scheduling
if current meridian >= 360° theninclude event.node in the regions associated to this same colored blockendifif the neighbors' color is the same than s.color thenendifinsert s in the block,else
if current meridian >= 360° theninclude event.node in the regions associated to this blockendifsplit the existing block,endif
create new block with unique element s
update T
test for PURPLE scheduling
if current meridian >= 360° thenconstruct list of regions associated to this new block:endif
take the list of regions of the same colored block above,
delete from this list those regions closed by the arcs above in the splitted block
take the list of regions of the same colored block below,
delete from this list those regions closed by the arcs below in the splitted block
include the regions delimited by arcs above and below in the splitted block.
include event.node in these regionsDelete s=event.arc from the corresponding block
if s was the unique element in its block thenmerge the two neighbor blocks (one of them possibly NULL)endif
elseif s was an extreme of its block thenendifupdate Tendif
test for PURPLE scheduling with new limit
if current meridian >= 360° and no arc begins at event.node theninclude event.node in the regions associated to the block where s belonged to.endif
INTERNAL :
(assume that a0 is below a1)
rotate arc a0 and a1 in the block
if a0 was the lower extreme of its block thenif a1 was the upper extreme of its block thenelseupdate T by interchanging the two blockendselse
test for PURPLE scheduling with lower and upper blocksupdate T by deleting a0 and introducing a1 as the new lower blockendendif
test for PURPLE scheduling with lower block
if a1 was the upper extreme of its block thenendifupdate T by deleting a1 and introducing a0 as the new upper blockendendif
test for PURPLE scheduling with upper block
PURPLE :
(Let the intersecting arcs be ar and ab)
Assign a0 to the lower arc from both before the intersection, and a1 to the upper one
Let regions(B0) be the regions list associated to the block of size sz0 containing a0 (regions(B1) defined analogously)
if any one of the arcs' endpoints is still in the first sweep thenStore ar and ab for outputendif
if sz1 = 1 thenif sz0 = 1 thenelseif Tabove = NULL thenelse /* sz0 > 1 */if Tbelow = NULL thenelseupdate T by interchanging the two (unique) blockendselse
if current meridian >= 360° thenDelete from regions(B0) the region under a1 and insert the region above (these are "polar" regions).endif
Delete from regions(B1) the region above a0 and insert the region below (these are also "polar" regions).
insert a1 in the block belowendif
update T by deleting Tbelow and interchanging the intersecting arcs in T
if current meridian >= 360° thenDelete from regions(B0) the region under a1 and insert the region above (the latter is a "north pole" region).endif
if Tbelow = NULL theninsert a0 in the block aboveelse
update T by deleting Tabove and interchanging the intersecting arcs in T
if current meridian >= 360° thenDelete from regions(B1) the region above a0 and insert the region below (the latter is a "south pole" region).endif
insert a0 in the block aboveendif
insert a1 in the block below
update T by deleting Tabove if the size of the block above was previously greater than 1, and Tbelow if the size of the block below was previously greater than 1, and interchanging the intersecting arcs in T
if Tabove = NULL thenelse /* sz1 > 1 */if Tbelow <> NULL thenelsedelete a0 from the block belowendif
create new block containing a0 (call it B0*)
update T by interchanging the intersecting arcs in T and inserting below a1 the arc from the block below that was previously underneath a0 (this arc may coincide with Tbelow)
if current meridian >= 360° thenCreate regions(B0*) by inserting the region above a1 plus regions(B0) minus the region bounded above by a1.endif
Delete from regions(B1) the region above a0 and insert the region below.
if Tbelow <> NULL thenendifdelete a0 from the block belowendif
update T by interchanging the intersecting arcs in T, deleting Tabove if the size of the block above was previously greater than 1, and inserting below a1 the arc from the block below that was previously underneath a0 (this arc may coincide with Tbelow)
if current meridian >= 360° thenDelete from regions(B1) the region above a0 and insert the region below.endif
if sz0 = 1 thenif Tabove <> NULL thenendifif Tbelow = NULL thenendifdelete a1 from the block aboveelse
create a new block containing a1 (call it B1*)
update T by interchanging the intersecting arcs in T and inserting above a0 the arc from the block above that was previously over a1 (this arc may coincide with Tabove)
if current meridian >= 360° thenCreate regions(B1*) by inserting the region underneath a0 plus regions(B1) minus the region bounded below by a0.endif
Delete from regions(B0) the region below a1 and insert the region above.
delete a1 from the block aboveendif
insert a1 in the block below
update T by interchanging the intersecting arcs in T, deleting Tbelow if the size of the block below was previously greater than 1, and inserting above a0 the arc from the block above that was previously over a1 (this arc may coincide with Tabove)
if current meridian >= 360° thenDelete from regions(B0) the region below a1 and insert the region above.endif
(Tabove and Tbelow cannot be NULL)endif
delete a1 from the block above
create a new block containing a1 (B1*)
delete a0 from the block below
create a new block containing a0 (B0*)
update T by interchanging the intersecting arcs in T, and inserting above a0 the arc from the block above that was previously over a1 (this arc may coincide with Tabove), as well as inserting below a1 the arc from the block below that was previously underneath a0 (this arc may coincide with Tbelow)
if current meridian >= 360° thenCreate regions(B0*) by inserting the region above a1 plus regions(B0) minus the region bounded above by a1.endif
Create regions(B1*) by inserting the region underneath a0 plus regions(B1) minus the region bounded below by a0.
end case
Last modified on monday, 15 April, 2002