Chapter
Finding
a Line
9
Transversal
in Three
Amenta* show
Abstract An axial ob~t are parallel
in @ is a box or rectangle, to the coordinate
setofaxialob~cts present
isa
a randomized
number 1
line that
an algorithm
which
in expected
linear
linear
the set of line
axes.
intersects
finds
time.
of connected
every
a line
We if one
and prove
objects
A line which set. the
Let z,y
us call
lines.
In this
in E3,
whose
paper,
in expected
O(n)
general
proximation The
data
of sight
Our
polyhedra
with
Pellegrini
gives
and
an
in
was studied give
line
involving
directed
the lines
of
algorithm
conditions
ditions
which
Seidel’s
an O(n Teller
[HT91].
the
in [AW87],
linear
programming,
O is Rd and
B
ima
E3, We
Seidel’s
give
Murry
Hill,
the New
author
was
which that
initialize
B = {}
and
Berkeley. visiting
AT
Much & T
by a subrou-
O, –l}.
O.
The
m)
L into
feasible
every
with
two
sets
m is on all
returns
if such
z O,
algorithm
is feasible
rein(B)
1 E B,
We say
side(l,
m which
m = rein(B),
GLP(B,
the
a point
mjn-
exists. on m.
1E B k
m
m
all
base
case */
L – {1})
m)
mo.
was
Laboratories,
CONDITION
Jersey.
66
1:
For every
mo, ml
E O, there
is a canon-
FINDINGA
LINE TRANSVERSAL
OF AXIAL
OBJECTSIN
ml), which satisfies: ical path pafh(mo, CROSSING CONDITION: If, for any 1 E L, sicfe(l, ml ) ~ ml), 0 and uide(i, mo) 0 is tangent to some helix turning clockwise around 1 as it moves in the direction of 1, and m with sign(l, m) > 0 is tangent to a counterclockwise helix.
This L -
of the
is alscj by the
m {1},
Figure
we are guaranteed
GLP(B,
can be computed in time O(IBI), be computed in constant time,
L)
will
2, the probability
be on that
whose solution
and that side(i, m) can we get the recu~rrence
l,k)+O(l)+#T(n
k O(k!n)
[RS 90].
sign(l,
-
l,k
-
1)
1: side(l,
m) >0
m) = O when m and 1 intersect,
and 1 are parallel.
the removal of 1 changes the minimum is < (k -- lBl)/n. Condition 2 also implies that it is always true that, IBI ~ k, since an object only gets added to B if its removal changes the minimum. Assuming that min(l?)
-
lines.
respect to also be in
m ~ O.
note that
Because of condition
T(n, k)~T(n
lines
Let (PS, pv, p. ) be a point in E3. An ordered pair of distinct points determines a directed line. Linespace is the space of directed lines in ~. Let 1 and m be two directed lines, defined by points (/1, /2) and (m], m2) respectively. Define side(f, m) as
U {/], L - {/]) = GLP(B, L). Since the ml = GLP(B algorithm is correct for any B, itis correct for B = {},
every 1 E B.
directed
in E3. Before we can state the new problem, we need to give some definitions and describe some geometric
Convexity Condition. And m < ml, by the Endpoint Condition. This contradicts the assumption that ml is L), so ml must be on 1. Therefore the correct GLP(B,
For the time
a line transversal
invcdving
If uide(i, mo) < 0, we show by If not, the correct ml is on 1.
some m E path(rno,
and returns
of finding
to a problem
if
l?}
for the induction,
is correct.
L – {1})
contradiction then
wwume,
GLP(B,
of axial
time O(k!ra).
GLP(B, L) correctly finds the First we show that andl minimum m, if one exists, such that m 6 C(B) m is feasible with respect to L. This is true when L
Linespace
We will reduce the problem
three equivalence
A fixed
line 1 divides
classes, where sign(i,
or when m
linespace
m)
imto
has the s~e
value for all m in any class. A continuous mapping of the closed interval [0,1] We can think of any path in to linespace is a path. Iinespace as a motion of a line in E3, from a position m.
to another
position
ml.
If, for some directed
side(l, ml ) ~ O, and side(f, mo) which takes ~ into ml without becoming parallel LEMMA 3.1. Crossing
line 1,
s O, there
is no motion intersecting 1 or
either
to /. This immediately Any path in linespace
gives us satisjies
the
Condition.
A set f in hnespace is connecied two points in ~ there is a finite-length
if between any path, completely
68
AMENTA
For example, for a fixed line 1, the contained in f. equivalence class {m : side(l, m) > O} is connected because you can move any line in the set into any other, without
intersecting
1.
of linesA set L of n lines induces a partition pace into equivalence classes, where, for each 1 E L, sign(l, m) has the same value for every m in any class. Usually these equivalence class are open sets. The closure of such an equivalence class is a face, by analogy with the faces in an arrangement, The faces in linespace induced
by a general
set of lines need not be connected
[CEGS 89], [Pel 90]. For a set B of directed lines which
intersect,
lines,
or are parallel
Parameterization
and
consisting
C(B)
is the
set of
to, all the lines in
function
of the points
Since there is a total a unique minimum.
lines, forming having
minimal
ordering
and so on.
on the points,
the set has
to return
rein(B)
a bounding
different
box around with
C(B)
O. We can avoid
a bounding
subroutines
box, however,
based on the number
to each axis. Intuitively, by considering
in each case m = rein(B)
the minimum
such m as x’ and ~ go to zero. 5
Line
Transversal
In this section, line transversal
of Boxes
and
Rectangles
we reduce the problem of finding a of a set of axial boxes and rectangles
to finding a feasible line in a linespace induced by axial lines, using ideas from
ability
of lines on the boundary
to the z axis, we can
[HT91].
The
approach
is to search
of the octants,
and dy/dz. Thus the four parameters (x’, y’, z, y) can We use the represent almost any directed line m. to represent the z’ parameter of line m, notation x’(m)
each axis a in turn, we search for a line normal to a. First we find a plane P normal
0 = {m:
z’(m)
into octants based on the sign without loss of generality, the
There
the set ~
and then each
octant
and so on.
in turn
overall
arrangement [Pel 90] and
normalize the vectors, so that v = (z + z’, y + ~, 1), and u = (z, y, O), where x’ and ~ are the slopes dx/d.z
We divide linespace of x’ and y’. Consider, positive octant.
of
we can find
set of
Octants
lines normal
the min-
computable it can also be implemented efficiently. can be interpreted as directed axial
parametrically by Any line in E3 can be represented u + tw,where u is a point on the line, w is a direction vector, and t is a scalar parameter. If we give up the to represent
subset
z‘,
n O. This is theoretically
to intersect
by calling
on the compact
with
We define the subroutine imum m c C(B) in constant time; The e constraints
lines in B parallel
B. For example, C’({l}) is the three-dimensional lines which intersect or are parallel to 1.
4
set, & is a continuous
for a line transversal.
is a simple
O(n)
algorithm
to search ~.
For
transversal to a which
intersects all of the objects, if one exists, by examining each object and keeping track of the interval on a which P. If we succeed, we try to find a line might intersect transversal of the traces of the objects in P. This two
dimensional version of the problem can be formulated as linear programming problem with two variables a~d >0
and d(m)
> 0}
O(n)
time, O is an open set. In order to be able to define the minimum of the octant, we consider instead a compact set O defined using an arbitrarily ~. For any m c O,
small
symbolic
constant
constraints. and
normal
So this simple
illustrates
that
the
algorithm
runs in O(n)
set of line
transvers~s
to each axis a is connected.
The rest of the paper is devoted to the algorithm to search a particular octant for a line transversal. We consider
without
loss of generality
the positive
octant
o. For any axial rectangle arbitrary m e Q intersecting
AR,
supporting
so that
the edges of AR
and m is feasible
with
AR.
respect
consider picking apy We direct the liqes they
form
to all of them.
a cycle, All
the
=
lines of O which intersect the rectangle are exactly those which are feasible with respect to all four of the directed
= O} belong to no octant. We assign a lexicographic ordering to the parameters, which imposes a total ordering on the set of directed lines. We test whether two lines have the relation
axial lines. Now consider the projection of an axial box AB onto the plane z = O along an arbitrary line m G O. For any m, the boundary of the projected figure is formed
Notice
that
the lines in the set ~ = {m : z’(m)
O or Y(m)
m.
< ml
by comparing
z’(me)
< z’(ml
), and,
if they
< z’(ml), and so on. are the same, z’(me) For O or any compact subset of O, the most significant parameter xl is a continuous function on the
by the projections
of the same six lines.
Again
we direct
these six lines so that they forma cycle and a line m E O intersects AB if and only if m is feasible with respect to all the directed
axial lines.
FINDING
A LINE TRANSVERSAL
Figure
2: reduction
OF AXIAL
to directed
OBJECTS IN 3D
Figure
lines problem
with
Thus we reduce the problem of finding transversal of a set of axial boxes and rectangles instances
of the following
69
3: a hyperboloid
y = av and z = ai.
a line to eight
PROBLEM 1: Given a set of =ial lines L, find a line m E O which is feasible with respect to every 1 c L.
Evaluating coefficients get similar c =
(C=,
Cv,
aY
a=
1
1 z
av
az 01
1
1
1
v y+y’
Canonical
Paths
and
isfies the Crossing
Condition.
To establish
are two kinds of canonical
If then
and ml
rno
they
and ml
intersect Let
N intersects contains
the Convex-
the clmed ml.
in a common
at some point
N be the pencil m.
and ml.
segment
This is a planar If mo and ml
p
+ Cy(y)
+ (2/
– yz’)
(when
P
o
=
(6.1)
ti
=
(b= -
(ay -
cY)z’
c=)+
(bz – az)z’
and #(m) we write
path(rw,
bounded
as
hyperboloid
we shall
?re
must satisfy
this
we
this
d=-=-
(6.2)
C2 + z’
by rno and
path.
which
For convenience,
which ml)
plane,
y in terms
parameters
rb For any m 6 H t7 O, z’(m)
component,
~,z,and
the two direction
equation.
The set H = C({a, c is one set of ruling
of this
that
p.
lie in a common
on a hyperboloid of one sheet, hyperboloid of lines.
We can solve this system to express of z’. We find related by
at
pencil
canonical do not
and z axes, respectively. of tines through a, b and
intersection
c=(#)
of lines in P through
We define
of that
E
plane P,
Clearly y’ is defined for any z’, so without loss of generality, let m E lf with z’(ml) z z’(m) ~ z’(me).
b, c})
At both mo and ml, the parameter y’ z c, so the sign of c1z’ must be equal to the sign of cz + z’. If c1 >0, then they are both positive at both ~ and ml. Since CIZ’
lines
and C2+ z’ are linear,
can construct three non-intersecting axial lines {a, b, c} through them, where a, b and c are parallel Ito the z, y
The
b= -bz(z’)+z=O
of p as a point
we can think
O in a single connected
both
0
ay+a.(y’)-v=O
paths.
are contained
are parallel,
infinity).
=
seen that any path in linespace sai-
ity Condition and the Endpoint Condition, we define a ml) between any nql, ml 60. canonical path path(mo, There
if
(z’, y’, z, y).
Connectivity
Now we show that the sets O and L in this problem satisfy conditions 1 and 2, which means that it can be algorithm. solved by the GLP We have already
V) E C({a})
this determinant gives us an equation with dependent on the constants % and ag. We equations from the lines b = (b=, y, b,, 1) and Z, 1), producing a system of three equations
in the four unknowns 6
A line (z’, #,z,
o Z+z’
problem:
of lines
call a
of lines with
the positive octant O, that is, the part of it where both slopes a? and y’ are positive, is a connected set of lines. To make all this more credible, we define If ~explicitly. Leta=(z, ay, az, 1) be the line parallel tcl the z axis
any m inbetween and m E O.
they must also both be positive
rno and ml.
So z’(m)
>0,
i(m)
at >0,
If c1 ~.
every canonical
the same value everywhere
z’(m)
=
path either
has
for z’ or has at mast one line
ml)
~
f
and
~ is
lines m E O is a face induced
the set L of axial linea, so it is connected.
by
Since there are
and the set of line transversals
in the
ml)
such that
On a hyperbolic path, each ~ determirp z’ in O, so for any ~, there is at most ope
p.
m c path(mo, a similar
such that
ml)
argument
z’(m)
for the other
=
/3. We can make
parameters.
Now assume, for the purpose of contradiction, that ml) does not satisfy the Endpoint Condition.
path(mo,
Since z’ is the moat significant parameter, either z’ ml), or there is some m E is constant along paih(mo, path(mo, ml), such that z’(m) > z’(ml) > z’(me). But so there must be Z’ is continuous along pat h(mo, ml), another
The set of feasible
O
Condition.
a unique in
in
Conditions 7.1.
any ~, there is at most one m E path(~, Eveyface
A face f is connected
only eight octants,
Given
2:
as the solution problem.
with any particular z’. Ifpath(mo, ml) is planar, either ml), or, for z’(m) is the same for every m c path(rno,
is connected.
ml)n
PROBLEM axial lines
First
ml) G j. We establish that path(mo, If there were some point m c path(mo,
path(mo,
COROLLARY 6.1. The set of directed line transvernumber of connected of azial objects has a constant
components.
do so in two
and again m may or may not
be in path(mo, ml), In any case, there path(mo, m~) n C({/}).
Proof.
sals
The lines b and c intersect
P.
c are disjoint,
both in H and in C({l}),
azial
components,
it at all. If 1 lies in P,, every m G N If p is the common
in some common
of connected
Theorem 6.1 can also be interpreted of a three-dimensional motion planning
intersects
ml)
number
happen
we have:
lines.
that
5: this can’t
point
), which
z’(ml
It path(mo,
remains ml ).
in between is impossible.
m’,
possible But
that
m and ~,
z’
is
with
z’(m’)
constant
since all the parameters
=
along
cannot
be
FINDING
A LINE TRANSVERSAL
constant,
every path(rno,
OF AXIAL
ml ) must satisfy
OBJECTS IN 3D the Endpoint
Condition. Finally, we need to establish satisfy Condition 2. LEMMA then
7.2.
there
min(A
are
– {1})
any A
For
at
most
that ~
L,
4 axzal
if
hnes
rnirz(A)
1 G A
L
exists, such
-
{1})