1 | \chapter{Analysis of Visibility in Polygonal Scenes}
|
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
|
---|
6 | \section{Analysis of 2D line space}
|
---|
7 |
|
---|
8 | \label{LINE_SPACE}
|
---|
9 |
|
---|
10 | The proposed visibility algorithm uses a mapping of oriented 2D lines to
|
---|
11 | points in 2D oriented projective space --- {\em line space}. Such a
|
---|
12 | mapping allows to handle sets of lines much easier than in the primal
|
---|
13 | space~\cite{pv-vc-93}.
|
---|
14 |
|
---|
15 | We use a 2D projection of Pl\"ucker
|
---|
16 | coordinates~\cite{Stolfi:1991:OPG} to parametrize lines in the plane.
|
---|
17 | This mapping corresponds to an ``oriented form'' of the duality
|
---|
18 | between points and lines in 2D. Let $l$ be an oriented line in
|
---|
19 | ${\mathcal R}^2$ and let $u=(u_x, u_y)$ and $v=(v_x, v_y)$ be two
|
---|
20 | distinct points lying on $l$. Line $l$ oriented from $u$ to $v$ can be
|
---|
21 | described by the following matrix:
|
---|
22 |
|
---|
23 | $$
|
---|
24 | M_l=\left(
|
---|
25 | \begin{array}{cccc}
|
---|
26 | u_x & u_y & 1 \\
|
---|
27 | v_x & v_y & 1
|
---|
28 | \end{array}
|
---|
29 | \right)
|
---|
30 | $$
|
---|
31 |
|
---|
32 | Pl\"ucker coordinates $l^*$ of $l$ are minors of $M_l$:
|
---|
33 |
|
---|
34 | $$
|
---|
35 | l^* = (l^*_x, l^*_y, l^*_z) = (u_y - v_y, v_x - u_x, u_x v_y - u_y v_x ).
|
---|
36 | $$
|
---|
37 |
|
---|
38 | $l^*$ can be interpreted as homogeneous coordinates of a point in 2D
|
---|
39 | {\em oriented projective space} ${\cal P}^2$. Two oriented lines are
|
---|
40 | equal if and only if their Pl\"ucker coordinates differ only by a
|
---|
41 | positive scale factor. $l^*$ also corresponds to coefficients of the
|
---|
42 | implicit equation of a line: $l'$ expressed as $l': ax + by + c= 0$
|
---|
43 | induces two oriented lines $l^*_1$, $l^*_2$, with Pl\"ucker
|
---|
44 | coordinates $l^*_1 = (a, b, c)$ and $l^*_2 = -(a,b,c)$. The \plucker
|
---|
45 | coordinates of 2D lines defined in this chapter are a simplified form
|
---|
46 | of the \plucker coordinates for 3D lines that will be discussed in
|
---|
47 | Chapter~\ref{chap:rot3d}: \plucker coordinates of a 2D line correspond
|
---|
48 | to the \plucker coordinates of a 3D line embedded in the $z = 0$ plane
|
---|
49 | after removal of redundant coordinates (equal to 0) and permutation of
|
---|
50 | the remaining ones (including some sign changes).
|
---|
51 |
|
---|
52 |
|
---|
53 | Homogeneous coordinates are often normalized, e.g. $l^*_N = (a/b, 1,
|
---|
54 | c/b)$. The normalization introduces a singularity --- in our example
|
---|
55 | vertical lines map to points at infinity. To avoid singularities we
|
---|
56 | treat ${\cal P}^2$ as 3D linear space and call it {\em line space}
|
---|
57 | denoted ${\mathcal L}$. Consequently, $l^*$ represents a halfline in
|
---|
58 | ${\mathcal L}$. All points on halfline $l^*$ represent the same
|
---|
59 | oriented line $l$.
|
---|
60 |
|
---|
61 | To sum up: an oriented line in 2D is mapped to a halfline beginning
|
---|
62 | at the origin in 3D. An example of the concept is depicted in
|
---|
63 | Figures~\ref{lines1}-(a) and ~\ref{lines1}-(b). Further in this
|
---|
64 | chapter we will mostly use ``projected'' 2D illustrations of line
|
---|
65 | space (such as in Figure~\ref{lines1}-(c)). We will still talk about
|
---|
66 | planes and halflines, but they will be depicted as lines and points,
|
---|
67 | respectively, for the sake of clarity of the presentation.
|
---|
68 |
|
---|
69 |
|
---|
70 | \subsection{Lines passing through a point}
|
---|
71 |
|
---|
72 | A {\em pencil of oriented lines} passing through a point $p = (p_x,
|
---|
73 | p_y) \in {\mathcal R}^2$ maps to an oriented plane $p^*$ in line
|
---|
74 | space that is expressed as:
|
---|
75 | $$
|
---|
76 | p^* = \{(x,y,z) | (x,y,z) \in {\mathcal L}, p_x x + p_y y + z = 0\}.
|
---|
77 | $$
|
---|
78 |
|
---|
79 | This plane subdivides ${\mathcal L}$ in two open halfspaces $p^*_+$
|
---|
80 | and $p^*_-$. Points in $p^*_-$ correspond to oriented lines passing
|
---|
81 | clockwise around $p$ (see Figure~\ref{lines1}). Points in $p^*_+$
|
---|
82 | correspond to oriented lines passing counterclockwise around $p$
|
---|
83 | (these relations depend on the orientation of the primal space). We
|
---|
84 | denote $-p^*$ an oriented plane opposite to $p^*$ that can be
|
---|
85 | expressed as:
|
---|
86 | $$
|
---|
87 | -p^* = \{(x,y,z) | (x,y,z) \in {\mathcal L}, -p_x x - p_y y - z = 0\}.
|
---|
88 | $$
|
---|
89 |
|
---|
90 |
|
---|
91 | \begin{figure*}[tb]
|
---|
92 | \rule{0pt}{0pt}\hfill
|
---|
93 | \includegraphics[width=1.0\textwidth,draft=\DRAFTFIGS]{figs/lines1}
|
---|
94 | \hfill\rule{0pt}{0pt}
|
---|
95 | \centerline{\small \hspace{0.01\textwidth}{\bf (a)}\hspace{0.3\textwidth} {\bf (b)} \hspace{0.3\textwidth} {\bf (c)}}
|
---|
96 | \vspace{-1.5em}
|
---|
97 | \caption{
|
---|
98 | {\bf (a)} Four oriented lines in primal space.
|
---|
99 | {\bf (b)} Mappings of the four lines and point p.
|
---|
100 | Lines intersecting p map to plane $p^*$.
|
---|
101 | Lines passing clockwise (counterclockwise) around $p$, map to
|
---|
102 | $p^*_-$ ($p^*_+$).
|
---|
103 | {\bf (c)} The situation after projection to a plane perpendicular to $p^*$. }
|
---|
104 | \label{lines1}
|
---|
105 | \end{figure*}
|
---|
106 |
|
---|
107 | \subsection{Lines passing through a line segment}
|
---|
108 |
|
---|
109 | Oriented lines passing through a line segment can be decomposed into
|
---|
110 | two sets depending on their orientation. Consider a supporting line
|
---|
111 | $l_S$ of a line segment $S$, that partitions the plane in open
|
---|
112 | halfspaces $S^+$ and $S^-$. Denote $a$ and $b$ the two endpoints of
|
---|
113 | $S$ and $a^*$ and $b^*$ their mappings to ${\mathcal L}$. Lines that
|
---|
114 | intersect $S$ and ``come from'' $S^-$ can be expressed in line space
|
---|
115 | as an intersection of halfspaces $a^*_+$ and $b^*_-$. The opposite
|
---|
116 | oriented lines intersecting $S$ are expressed as $a^*_- \cap b^*_+$
|
---|
117 | (see Figure~\ref{lines2}-(a,b)).
|
---|
118 |
|
---|
119 | %\begin{minipage}{\textwidth}
|
---|
120 |
|
---|
121 | \begin{figure}[htb]
|
---|
122 | \rule{0pt}{0pt}\hfill
|
---|
123 | \includegraphics[width=0.6\textwidth,draft=\DRAFTFIGS]{figs/lines2}
|
---|
124 | \hfill\rule{0pt}{0pt}
|
---|
125 | \centerline{\small
|
---|
126 | \hspace{0.01\textwidth}{\bf (a)}\hspace{0.2\textwidth} {\bf (b)}
|
---|
127 | }
|
---|
128 | \vspace{-1.5em}
|
---|
129 | \caption{ {\bf (a)} A line segment $S$ and three oriented lines that
|
---|
130 | intersect $S$. {\bf (b)} The situation in line space: the projection of two
|
---|
131 | wedges corresponding to lines intersecting $S$. Mappings of supporting
|
---|
132 | line $l_S$ of $S$ are two halflines that project to point
|
---|
133 | $l_S^*$. Line $k$ intersects point $b$ and therefore maps to plane
|
---|
134 | $b^*$. Lines $m$ and $n$ map to the wedge corresponding to their
|
---|
135 | orientation. }
|
---|
136 | \label{lines2}
|
---|
137 | \end{figure}
|
---|
138 |
|
---|
139 |
|
---|
140 |
|
---|
141 |
|
---|
142 | \subsection{Lines passing through two line segments}
|
---|
143 |
|
---|
144 | \label{sec:blocker_polygon}
|
---|
145 |
|
---|
146 | Consider two disjoint line segments such as those depicted in
|
---|
147 | Figure~\ref{lines3}-(a). The set of lines passing through the two line
|
---|
148 | segments can be described as an intersection of four halfspaces in
|
---|
149 | line space. The four halfspaces correspond to mappings of endpoints of
|
---|
150 | the two line segments. Since the halfspaces pass through the origin
|
---|
151 | of ${\mathcal L}$, their intersection is a pyramid with the apex at
|
---|
152 | the origin. The boundary halflines of the pyramid correspond to
|
---|
153 | mappings of the four {\em extremal lines} induced by the two
|
---|
154 | segments. Denote ${\mathcal P}(S, O)$ a line space pyramid
|
---|
155 | corresponding to oriented lines intersecting line segments $S$ and $O$
|
---|
156 | in this order. We represent the pyramid by a {\em blocker polygon}
|
---|
157 | $B(S, O)$ (see Figure~\ref{lines3}-(b)). Since $B(S, O)$ only
|
---|
158 | represents the pyramid ${\mathcal P}(S, O)$, it need not be a planar
|
---|
159 | polygon, i.e. its vertices may lay anywhere on the boundary halflines
|
---|
160 | of ${\mathcal P}(S, O)$. We normalize the vertex coordinates: they
|
---|
161 | correspond to an intersection of the boundary halfline of ${\mathcal
|
---|
162 | P}(S, O)$ and the unit sphere centered at the origin of ${\mathcal L}$.
|
---|
163 |
|
---|
164 | \begin{figure}[htb]
|
---|
165 | \hfill\rule{0pt}{0pt}
|
---|
166 | \includegraphics[width=0.7\textwidth,draft=\DRAFTFIGS]{figs/lines3}
|
---|
167 | \hfill\rule{0pt}{0pt}
|
---|
168 | \centerline{\small
|
---|
169 | \hspace{0.01\textwidth}{\bf (a)}\hspace{0.2\textwidth} {\bf (b)}
|
---|
170 | }
|
---|
171 | \vspace{-1.5em}
|
---|
172 | \caption{ {\bf (a)} Two line segments and corresponding four extremal lines
|
---|
173 | oriented from $S$ to $O$. Separating lines $ad$ and $bc$ bound region
|
---|
174 | of partial visibility of $S$ behind $O$ (penumbra). Supporting lines
|
---|
175 | $ac$ and $bd$ bound region where $S$ is invisible (umbra). {\bf (b)}
|
---|
176 | Blocker polygon $B(S,O)$ representing pyramid ${\mathcal
|
---|
177 | P}(S,O)$.
|
---|
178 | }
|
---|
179 | \label{lines3}
|
---|
180 | \end{figure}
|
---|
181 |
|
---|
182 |
|
---|
183 | In Figure~\ref{lines4}-(a), the supporting line of $cd$ intersects $ab$
|
---|
184 | at point $x$. The set of rays passing through $ab$ and $cd$ can be
|
---|
185 | decomposed to rays passing through $ax$ and $cd$, and through $xb$
|
---|
186 | and $cd$. Rays through $ax$ and $cd$ map to a pyramid that is
|
---|
187 | described by intersection of only three halfspaces induced by mappings
|
---|
188 | of $a$, $x$ and $d$. Rays through $xb$ and $cd$ can be
|
---|
189 | described similarly. The configuration in line space is depicted in
|
---|
190 | Figure~\ref{lines4}-(b).
|
---|
191 |
|
---|
192 | \begin{figure}[htb]
|
---|
193 | \rule{0pt}{0pt}\hfill
|
---|
194 | \includegraphics[width=0.7\textwidth,draft=\DRAFTFIGS]{figs/lines4}
|
---|
195 | \hfill\rule{0pt}{0pt}
|
---|
196 | \centerline{\small
|
---|
197 | \hspace{0.01\textwidth}{\bf (a)}\hspace{0.2\textwidth} {\bf (b)}
|
---|
198 | }
|
---|
199 | \vspace{-1.5em}
|
---|
200 | \caption{ {\bf (a)} Degenerate configuration of line segments: the supporting
|
---|
201 | line of $cd$ intersects $ab$ at point $x$. There are five extremal
|
---|
202 | lines. Note, that there is no umbra region. {\bf (b)} In line space the
|
---|
203 | configuration yields two pyramids sharing a boundary that is a
|
---|
204 | mapping of the oriented line $cd$.
|
---|
205 | }
|
---|
206 | \label{lines4}
|
---|
207 | \end{figure}
|
---|
208 |
|
---|
209 | \subsection{Lines passing through a set of line segments}
|
---|
210 |
|
---|
211 | Consider a set of $n+1$ line segments. We call one line segment the
|
---|
212 | {\em source} (denoted by $S$) and the other $n$ segments we call
|
---|
213 | occluders (denoted by $O_k$, $1 \leq k \leq n$). Further in the
|
---|
214 | chapter we will use the term {\em ray} as a representative of an
|
---|
215 | oriented line that is oriented from the source ``towards'' the
|
---|
216 | occluders.
|
---|
217 |
|
---|
218 | Assume that we can process all occluders in a strict front-to-back
|
---|
219 | order with respect to the given source. We have already processed $k$
|
---|
220 | occluders and we continue by processing $O_{k+1}$. $O_{k+1}$ can be
|
---|
221 | visible through rays that correspond to the pyramid ${\mathcal P}(S,
|
---|
222 | O_{k+1})$. Nevertheless some of these rays can be blocked by
|
---|
223 | combination of already processed occluders $O_x$ ($1\leq x \leq k$).
|
---|
224 | To determine if $O_{k+1}$ is visible we subtract all ${\mathcal
|
---|
225 | P}(S,O_x)$ from ${\mathcal P}(S,O_{k+1})$:
|
---|
226 |
|
---|
227 | $$
|
---|
228 | {\mathcal V}(S,O_{k+1}) = {\mathcal P}(S,O_{k+1})\ - \bigcup_{1 \leq x \leq k} {\mathcal P}(S,O_x)
|
---|
229 | $$
|
---|
230 |
|
---|
231 | ${\mathcal V}(S, O_{k+1})$ is a set pyramids representing rays through
|
---|
232 | which $O_{k+1}$ is visible from $S$. In turn, all rays corresponding
|
---|
233 | to ${\mathcal V}(S,O_{k+1})$ are blocked behind $O_{k+1}$. If
|
---|
234 | ${\mathcal V}(S, O_{k+1})$ is an empty set, occluder $O_{k+1}$ is
|
---|
235 | invisible. This suggest incremental construction of an arrangement of
|
---|
236 | pyramids ${\mathcal A}_k$ that corresponds to rays blocked by the
|
---|
237 | $k$ processed occluders. We determine ${\mathcal V}(S,O_{k+1})$ and
|
---|
238 | ${\mathcal A}_{k+1}$ (${\mathcal A}_0$ is empty):
|
---|
239 |
|
---|
240 | $$
|
---|
241 | {\mathcal V}(S,O_{k+1}) = {\mathcal P}(S,O_{k+1}) \ - \ {\mathcal A}_k,
|
---|
242 | $$
|
---|
243 | $$
|
---|
244 | {\mathcal A}_{k+1} = {\mathcal A}_k \cup {\mathcal P}(S,O_{k+1}) =
|
---|
245 | {\mathcal A}_k \ \cup \ {\mathcal V}(S,O_{k+1}).
|
---|
246 | $$
|
---|
247 |
|
---|
248 | Figures~\ref{lines5}-(a,b) depict a projection of an arrangement
|
---|
249 | ${\mathcal A}_3$ of a source and three occluders. Note that the
|
---|
250 | shorter the source line segment the narrower ($s^*_a$ and $s^*_b$ get
|
---|
251 | closer) are the pyramids ${\mathcal P}(S,O_k)$.
|
---|
252 |
|
---|
253 |
|
---|
254 |
|
---|
255 |
|
---|
256 | \begin{figure}[htb]
|
---|
257 | \rule{0pt}{0pt}\hfill
|
---|
258 | \includegraphics[width=0.6\textwidth,draft=\DRAFTFIGS]{figs/rot2new}
|
---|
259 | \hfill\rule{0pt}{0pt}
|
---|
260 | \centerline{\small
|
---|
261 | \hspace{0.01\textwidth}{\bf (a)}\hspace{0.2\textwidth} {\bf (b)}
|
---|
262 | }
|
---|
263 | \vspace{-1.5em}
|
---|
264 | \caption{ {\bf (a)} The source line segment $S$ and three
|
---|
265 | occluders. $Q_{1-3}$ denote unoccluded funnels. {\bf (b)} The
|
---|
266 | line space subdivision. For each cell, the corresponding occluder-sequence
|
---|
267 | is depicted. Note the cells $Q^*_1$, $Q^*_2$ and $Q^*_3$
|
---|
268 | corresponding to unoccluded funnels.}
|
---|
269 | \label{lines5}
|
---|
270 | \end{figure}
|
---|
271 |
|
---|
272 | Recall that the pyramid ${\mathcal P}(S,O_k)$ is represented by
|
---|
273 | blocker polygon $B(S,O_k)$. The construction of the arrangement
|
---|
274 | ${\mathcal A}_k$ resembles the from-point visibility problem, more
|
---|
275 | specifically the hidden surface removal applied on the blocker
|
---|
276 | polygons with respect to the origin of ${\mathcal L}$. The difference
|
---|
277 | is that the depth information is irrelevant in line space. The
|
---|
278 | priority of blocker polygons is either completely determined by the
|
---|
279 | processing order of occluders or their depth must be compared in
|
---|
280 | primal space. This observation is supported by the classification of
|
---|
281 | visibility problems presented in
|
---|
282 | Chapter~\ref{chap:classes}. Visibility from point in 3D and visibility
|
---|
283 | from region in 2D induce a two-dimensional problem-relevant line
|
---|
284 | set. This suggests the possibility of mapping one problem to another.
|
---|
285 |
|
---|
286 | In the next section we show how the arrangement ${\mathcal A}_k$ can
|
---|
287 | be maintained consistently and efficiently using the occlusion tree.
|
---|
288 |
|
---|
289 |
|
---|
290 |
|
---|
291 | \section{Pl\"ucker coordinates of lines in 3D}
|
---|
292 |
|
---|
293 | \label{sec:plucker}
|
---|
294 |
|
---|
295 |
|
---|
296 | We will use a mapping that describes an oriented 3D line as a point
|
---|
297 | in a projective 5D space~\cite{Boissonnat98} by means of \plucker
|
---|
298 | coordinates~\cite{Teller92phd,p-rsls-97,yn-sbgtc-97,Pu98-DSGIV}. \plucker
|
---|
299 | coordinates allow to represent sets of lines using 5D polyhedra and to
|
---|
300 | compute visibility by means of polyhedra set operations in 5D.
|
---|
301 |
|
---|
302 | A line in 3D can be described by homogeneous coordinates of two
|
---|
303 | distinct points on that line. Let $l$ be a line in ${\cal R}^3$ and
|
---|
304 | let $\mbi{u}=(u_x, u_y, u_z, u_w)$ and $\mbi{v}=(v_x,v_y,v_z, v_w)$ be
|
---|
305 | two distinct points in homogeneous coordinates lying on $l$. A line
|
---|
306 | $l$ oriented from $\mbi{u}$ to $\mbi{v}$ can be described by the following matrix:
|
---|
307 |
|
---|
308 | \begin{equation}
|
---|
309 | l=\left(
|
---|
310 | \begin{array}{cccc}
|
---|
311 | u_{x} & u_{y} & u_{z} & u_{w} \\
|
---|
312 | v_{x} & v_{y} & v_{z} & v_{w}
|
---|
313 | \end{array}
|
---|
314 | \right)
|
---|
315 | \label{coord_cara}
|
---|
316 | \end{equation}
|
---|
317 |
|
---|
318 | Minors of the matrix correspond to components of the {\em \plucker
|
---|
319 | coordinates} $\bpi_l$ of line $l$:
|
---|
320 |
|
---|
321 | \begin{equation}
|
---|
322 | \begin{array}{ll}
|
---|
323 | \bpi_l & = (\pi_{l0}, \pi_{l1}, \pi_{l2}, \pi_{l3}, \pi_{l4}, \pi_{l5}) = \\
|
---|
324 | & = (\xi_{wx},\xi_{wy},\xi_{wz},\xi_{yz},\xi_{zx},\xi_{xy}),
|
---|
325 | \end{array}
|
---|
326 | \label{eq:plucker_coords_def}
|
---|
327 | \end{equation}
|
---|
328 |
|
---|
329 | where
|
---|
330 |
|
---|
331 | \begin{equation}
|
---|
332 | \xi_{rs} = det\left(
|
---|
333 | \begin{array}{cc}
|
---|
334 | u_{r} & u_{s} \\
|
---|
335 | v_{r} & v_{s}
|
---|
336 | \end{array}
|
---|
337 | \right).
|
---|
338 | \end{equation}
|
---|
339 |
|
---|
340 | Substituting $u_w=1$ and $v_w=1$ into Eq.~\ref{eq:plucker_coords_def}
|
---|
341 | enumerates to:
|
---|
342 |
|
---|
343 | \begin{equation}
|
---|
344 | \begin{array}{l}
|
---|
345 | \pi_{l0} = v_x - u_x\\
|
---|
346 | \pi_{l1} = v_y - u_y\\
|
---|
347 | \pi_{l2} = v_z - u_z\\
|
---|
348 | \pi_{l3} = u_{y}v_{z} - u_{z}v_{y}\\
|
---|
349 | \pi_{l4} = u_{z}v_{x} - u_{x}v_{z}\\
|
---|
350 | \pi_{l5} = u_{x}v_{y} - u_{y}v_{x}
|
---|
351 | \end{array}
|
---|
352 | \label{eq:plucker_coords}
|
---|
353 | \end{equation}
|
---|
354 |
|
---|
355 | The \plucker coordinates $\bpi_l$ can be seen as homogeneous
|
---|
356 | coordinates of a point in a projective five-dimensional space ${\cal
|
---|
357 | P}^5$. We call this point a {\em \plucker point} $\ppoint_l$ of
|
---|
358 | $l$. For a given oriented line $l$ the \plucker coordinates $\bpi_l$
|
---|
359 | are unique and they do not depend on the choice of points $p$ and $q$.
|
---|
360 | We will use the notation of a \plucker point $\ppoint_l$ in the case
|
---|
361 | when we want to stress that the corresponding \plucker coordinates
|
---|
362 | $\bpi_l$ are interpreted as a point in ${\cal P}^5$.
|
---|
363 |
|
---|
364 | Using the projective duality the \plucker coordinates can be
|
---|
365 | interpreted as coefficients of a hyperplane. The {\em \plucker
|
---|
366 | coefficients} $\bomega_l$ of line $l$ are given as:
|
---|
367 |
|
---|
368 |
|
---|
369 | \begin{equation}
|
---|
370 | \begin{array}{ll}
|
---|
371 | \bomega_l
|
---|
372 | & = (\omega_{l0}, \omega_{l1}, \omega_{l2}, \omega_{l3}, \omega_{l4}, \omega_{l5}) = \\
|
---|
373 | & = (\xi_{yz},\xi_{zx},\xi_{xy},\xi_{wx},\xi_{wy},\xi_{wz})
|
---|
374 | \end{array}
|
---|
375 | \label{eq:plucker_coef_def}
|
---|
376 | \end{equation}
|
---|
377 |
|
---|
378 | Substituting Eq.~\ref{eq:plucker_coords} into Eq.~\ref{eq:plucker_coef_def}
|
---|
379 | we get:
|
---|
380 |
|
---|
381 | \begin{equation}
|
---|
382 | \begin{array}{l}
|
---|
383 | \omega_{l0} = \pi_{l3} \\
|
---|
384 | \omega_{l1} = \pi_{l4}\\
|
---|
385 | \omega_{l2} = \pi_{l5}\\
|
---|
386 | \omega_{l3} = \pi_{l0}\\
|
---|
387 | \omega_{l4} = \pi_{l1}\\
|
---|
388 | \omega_{l5} = \pi_{l2}
|
---|
389 | \end{array}
|
---|
390 | \label{eq:plucker_coef}
|
---|
391 | \end{equation}
|
---|
392 |
|
---|
393 |
|
---|
394 | The \plucker coefficients $\bomega_l$ define a {\em \plucker
|
---|
395 | hyperplane} $\pplane_l$. We will use the notation of a \plucker
|
---|
396 | hyperplane $\pplane_l$ when we want to stress that the
|
---|
397 | corresponding \plucker coefficients $\bomega_l$ are interpreted as a
|
---|
398 | hyperplane in ${\cal P}^5$. In terms of \plucker points the \plucker
|
---|
399 | hyperplane can be expressed as:
|
---|
400 |
|
---|
401 | \begin{equation}
|
---|
402 | \label{hyperplane}
|
---|
403 | \begin{array}{l}
|
---|
404 | \pplane_l = \{\ppoint | \ppoint \in {\cal P}^5, \bomega_l \odot \bpi = 0\}
|
---|
405 | \end{array}
|
---|
406 | \end{equation}
|
---|
407 |
|
---|
408 | The \plucker hyperplane induces closed positive and negative halfspaces
|
---|
409 | given as:
|
---|
410 |
|
---|
411 | \begin{equation}
|
---|
412 | \begin{array}{l}
|
---|
413 | \pplane^{+}_l = \{\ppoint | \ppoint \in {\cal P}^{5}, \bomega_l \odot \bpi \geq 0\} \\
|
---|
414 | \pplane^{-}_l = \{\ppoint | \ppoint \in {\cal P}^{5}, \bomega_l \odot \bpi \leq 0\} \\
|
---|
415 | \end{array}
|
---|
416 | \label{eq:def_halfspaces}
|
---|
417 | \end{equation}
|
---|
418 |
|
---|
419 | These definitions of \plucker coordinates and coefficients follow the
|
---|
420 | ``traditional'' convention~\cite{Pu98-DSGIV}. They differ from the
|
---|
421 | definitions used by Teller~\cite{Teller92phd} who used a permuted
|
---|
422 | order of the coordinates. The traditional convention provides an
|
---|
423 | elegant interpretation of \plucker coordinates that will be discussed
|
---|
424 | in Section~\ref{sec:plucker_interp}.
|
---|
425 |
|
---|
426 | If $a$ and $b$ are two directed lines, the relation $side(a,b)$ is
|
---|
427 | defined as an inner product $\bomega_a \odot \bpi_b$ or permuted inner
|
---|
428 | product $\bpi_a \times \bpi_b$:
|
---|
429 |
|
---|
430 | \begin{equation}
|
---|
431 | \begin{array}{ll}
|
---|
432 | side(a,b) & = \bomega_a \odot \bpi_b = \\
|
---|
433 | & = \omega_{a0}\pi_{b0} + \omega_{a1}\pi_{b1} + \omega_{a2}\pi_{b2} +
|
---|
434 | \omega_{a3}\pi_{b3} + \omega_{a4}\pi_{b4} + \omega_{a5}\pi_{b5} = \\
|
---|
435 | & = \bpi_a \times \bpi_b = \\
|
---|
436 | & = \pi_{a0}\pi_{b3} + \pi_{a1}\pi_{b4} + \pi_{a2}\pi_{b5} +
|
---|
437 | \pi_{a3}\pi_{b0} + \pi_{a4}\pi_{b1} + \pi_{a5}\pi_{b2}
|
---|
438 | \end{array}
|
---|
439 | \label{eq:side}
|
---|
440 | \end{equation}
|
---|
441 |
|
---|
442 |
|
---|
443 | This relation can be interpreted with the right-hand rule
|
---|
444 | (Figure~\ref{sidepict}). If the thumb of the right hand is directed
|
---|
445 | along line $a$, then:
|
---|
446 |
|
---|
447 | \begin{itemize}
|
---|
448 | \item $side(a,b)> 0$, if line $b$ is oriented in the direction of the fingers,
|
---|
449 |
|
---|
450 | \item $side(a,b) = 0$, if lines $a$ and $b$ intersect or are parallel,
|
---|
451 |
|
---|
452 | \item $side(a,b) < 0$, if line $b$ points against the direction of the fingers.
|
---|
453 | \end{itemize}
|
---|
454 |
|
---|
455 | \begin{figure}[htb]
|
---|
456 | \centerline{
|
---|
457 | \includegraphics[width=0.8\textwidth,draft=\DRAFTFIGS]{figs/pldual}}
|
---|
458 | \caption{The $side(a,b)$, interpreted as the right-hand rule.}
|
---|
459 | \label{sidepict}
|
---|
460 | \end{figure}
|
---|
461 |
|
---|
462 |
|
---|
463 | \plucker coordinates have an important property: Although every
|
---|
464 | oriented line in ${\cal R}^3$ maps to a point in \plucker coordinates,
|
---|
465 | not every tuple of six real numbers corresponds to a real line. Only
|
---|
466 | the points $\ppoint \in {\cal P}^5$ \plucker coordinates of which
|
---|
467 | satisfy the condition
|
---|
468 |
|
---|
469 | \begin{equation}
|
---|
470 | \bpi \odot \bpi = 0 \qquad \equiv \qquad \pi_{0}\pi_{3} + \pi_{1}\pi_{4} + \pi_{2}\pi_{5} = 0,
|
---|
471 | \label{eq:plucker_quadric}
|
---|
472 | \end{equation}
|
---|
473 |
|
---|
474 | represent real lines in ${\cal R}^3$. All other points correspond to
|
---|
475 | lines which are said to be {\em imaginary}. The set of points in
|
---|
476 | ${\cal P}^5$ satisfying Eq.~\ref{eq:plucker_quadric} forms a 4D
|
---|
477 | hyperboloid of one sheet called the {\em \plucker quadric}, also known
|
---|
478 | as the {\em Klein quadric} or the {\em Grassman manifold}
|
---|
479 | (see Figure~\ref{quadric}).
|
---|
480 |
|
---|
481 |
|
---|
482 | \begin{figure}[htb]
|
---|
483 | \medskip
|
---|
484 | \centerline{
|
---|
485 | \includegraphics[width=0.65\textwidth,draft=\DRAFTFIGS]{figs/reallin}}
|
---|
486 | \caption{Real lines map on points on the Pl\"{u}cker quadric.}
|
---|
487 | \label{quadric}
|
---|
488 | \end{figure}
|
---|
489 |
|
---|
490 | The six \plucker coordinates of a real line are not
|
---|
491 | independent. Firstly, they describe an oriented projective space,
|
---|
492 | secondly, they must satisfy the
|
---|
493 | equation~\ref{eq:plucker_quadric}. Thus there are four degrees of
|
---|
494 | freedom in the description of a 3D line, which conforms with the
|
---|
495 | classification from Chapter~\ref{chap:overview}.
|
---|
496 |
|
---|
497 | \plucker coordinates allow to detect an incidence of two lines by
|
---|
498 | computing an inner product of a homogeneous point (mapping of one
|
---|
499 | line) with a hyperplane (mapping of the other). Lines $l$ and $l'$
|
---|
500 | intersect or are parallel (i.e. meet at infinity) if and only if
|
---|
501 | $\ppoint_l \in \pplane_{l'}$, i.e. $side(l, l') = 0$. Note that according
|
---|
502 | to ~\ref{eq:plucker_quadric} any line always meets itself.
|
---|
503 |
|
---|
504 |
|
---|
505 | \subsection{Geometric interpretation of \plucker coordinates}
|
---|
506 | \label{sec:plucker_interp}
|
---|
507 |
|
---|
508 | For a better understanding of \plucker coordinates it is natural to
|
---|
509 | ask how each individual \plucker coordinate is related to the geometry
|
---|
510 | of the corresponding line. The \plucker coordinates of a given line
|
---|
511 | can be divided to the {\em directional} and the {\em locational}
|
---|
512 | parts. The directional part encodes the direction of the line, the
|
---|
513 | locational part encodes the position of the line. Given \plucker
|
---|
514 | coordinates $\bpi_l$ of a line $l$ we can write:
|
---|
515 |
|
---|
516 | \begin{equation}
|
---|
517 | \begin{array}{lll}
|
---|
518 | \mbi{d}_l & = (\pi_{l0}, \pi_{l1}, \pi_{l2}), \\
|
---|
519 | \mbi{l}_l & = (\pi_{l3}, \pi_{l4}, \pi_{l5}), \\
|
---|
520 | \end{array}
|
---|
521 | \end{equation}
|
---|
522 |
|
---|
523 | where $\mbi{d}_l$ is the {\em directional vector} of $l$ and $\mbi{l}_l$
|
---|
524 | is the {\em locational vector} of $l$. The \plucker coordinates
|
---|
525 | $\bpi_l$ and the \plucker coefficients $\bomega_l$ can be expressed as:
|
---|
526 |
|
---|
527 |
|
---|
528 | \begin{equation}
|
---|
529 | \begin{array}{ll}
|
---|
530 | \bpi_l &= [\mbi{d}_l; \mbi{l}_l],\\
|
---|
531 | \bomega_l &= [\mbi{l}_l; \mbi{d}_l].
|
---|
532 | \end{array}
|
---|
533 | \label{eq:rot3_locdir}
|
---|
534 | \end{equation}
|
---|
535 |
|
---|
536 |
|
---|
537 | \subsubsection{Extracting a point}
|
---|
538 |
|
---|
539 | Often we need to describe a line using a parametric representation by
|
---|
540 | means of an {\em anchor point} and a directional vector. Given a line
|
---|
541 | $l$ the directional vector $\mbi{d}_l$ is embedded in the \plucker
|
---|
542 | coordinates of $l$ (see Eq.~\ref{eq:rot3_locdir}). The anchor point
|
---|
543 | $\mbi{a}_l$ can be computed as:
|
---|
544 |
|
---|
545 | \begin{equation}
|
---|
546 | \mbi{a}_l = (a_x, a_y, a_z) = \frac{\mbi{d}_l \times \mbi{l}_l}{\parallel \mbi{d}_l \parallel ^2}.
|
---|
547 | \end{equation}
|
---|
548 |
|
---|
549 |
|
---|
550 | \subsubsection{Computing the distance}
|
---|
551 |
|
---|
552 | The distance between two lines $l$ and $l'$ can be expressed
|
---|
553 | using their anchor points and the directional vectors:
|
---|
554 |
|
---|
555 | \begin{equation}
|
---|
556 | dist(l, l') = { | (\mbi{a}_l - \mbi{a}_{l'}) \cdot (\mbi{d}_l \times
|
---|
557 | \mbi{d}_{l'}) | \over \parallel \mbi{d}_l \times \mbi{d}_{l'} \parallel }.
|
---|
558 | \end{equation}
|
---|
559 |
|
---|
560 |
|
---|
561 | The distance is the length of the projection of the line segment
|
---|
562 | $\mbi{a}_l,\mbi{a}_{l'}$ onto the direction $\mbi{d}_l \times
|
---|
563 | \mbi{d}_{l'}$.
|
---|
564 |
|
---|
565 |
|
---|
566 |
|
---|
567 | %%%%%%%%%%%%%%%%%%%%%%
|
---|
568 |
|
---|
569 | \section{Visual events}
|
---|
570 |
|
---|
571 | \label{sec:events}
|
---|
572 |
|
---|
573 | This section discusses visual events occurring in polygonal
|
---|
574 | scenes~\cite{Gigus90}. We will focus on the boundaries of visual
|
---|
575 | events and their relation to \plucker coordinates. The understanding
|
---|
576 | of the visual events helps to comprehend the complexity of the
|
---|
577 | from-region visibility in 3D.
|
---|
578 |
|
---|
579 | Any scene can be decomposed into regions from which the scene has a
|
---|
580 | topologically equivalent view~\cite{Gigus90}. Boundaries of such
|
---|
581 | regions correspond to {\em event surfaces}. Crossing an event surface
|
---|
582 | causes a {\em visual event}, i.e. a change in the topology of the view
|
---|
583 | (visibility map). In polygonal scenes there are three types of event
|
---|
584 | surfaces~\cite{Gigus90}:
|
---|
585 |
|
---|
586 | \begin{itemize}
|
---|
587 | \item {\em vertex-edge} (VE) events involving an edge and a vertex
|
---|
588 | of two distinct polygons.
|
---|
589 | \item {\em edge-edge-edge} (EEE) events involving three edges of
|
---|
590 | three distinct polygons.
|
---|
591 | \item {\em supporting} events corresponding to supporting planes of
|
---|
592 | scene polygons. The supporting event can be seen as a degenerated
|
---|
593 | case of VE or EEE events.
|
---|
594 | \end{itemize}
|
---|
595 |
|
---|
596 | The VE events correspond to planes, the EEE events in general form
|
---|
597 | quadratic surfaces. The definitions assume that the scene polygons are
|
---|
598 | in general non-degenerate position. In real world scenes the polygons
|
---|
599 | or their edges polygons can be variously aligned. In such a case these
|
---|
600 | definitions of visibility events form minimal sets of edges and
|
---|
601 | vertices defining an event. For example a VE event can involve a
|
---|
602 | vertex and several edges of scene polygons (see
|
---|
603 | Figure~\ref{fig:degen_event}).
|
---|
604 |
|
---|
605 | \begin{figure}[htb]
|
---|
606 | \centerline{
|
---|
607 | \includegraphics[width=0.45\textwidth,draft=\DRAFTFIGS]{figs/ve_degen}}
|
---|
608 | \caption{Degenerated VE event. The VE event is induced by a vertex and
|
---|
609 | three edges of scene polygons.}
|
---|
610 | \label{fig:degen_event}
|
---|
611 | \end{figure}
|
---|
612 |
|
---|
613 |
|
---|
614 | The intersections of event surfaces correspond to {\em extremal
|
---|
615 | lines}~\cite{Teller92phd}. An extremal line intersects four edges of
|
---|
616 | some scene polygons. There are four types of extremal lines:
|
---|
617 | vertex-vertex (VV) lines, vertex-edge-edge (VEE) lines,
|
---|
618 | edge-vertex-edge (EVE) and quadruple edge (4E) lines. Imagine
|
---|
619 | ``sliding'' an extremal line (of any type) away from its initial
|
---|
620 | position by relaxing exactly one of the four edge constraints
|
---|
621 | determining the line. The section of the event surface swept out by
|
---|
622 | the sliding line is called the {\em swath}. A swath is either planar
|
---|
623 | if it corresponds to a VE event surface or a regulus if it is embedded
|
---|
624 | in an EEE event surface.
|
---|
625 |
|
---|
626 | Figure~\ref{swaths}-(a) shows an extremal VV line tight on four edges
|
---|
627 | A,B,C, and D. Relaxing constraint C yields a VE (planar) swath defined
|
---|
628 | by A,B, and D. When the sliding line encounters an obstacle (edge E) it
|
---|
629 | terminates at a VV extremal line defined by A,B,D, and
|
---|
630 | E. Figure~\ref{swaths}-(b) depicts an extremal 4E line tight on the
|
---|
631 | mutually skew edges A,B,C, and D. Relaxing constraint A produces an EEE
|
---|
632 | event surface that is a regulus intersecting B,C, and D. When the
|
---|
633 | sliding line encounters edge E the swath terminates at an VEE extremal
|
---|
634 | line.
|
---|
635 |
|
---|
636 | \begin{figure}[htb]
|
---|
637 | \centerline{
|
---|
638 | \includegraphics[width=0.75\textwidth,draft=\DRAFTFIGS]{figs/swaths}}
|
---|
639 | \centerline{\small
|
---|
640 | {\bf (a)}\hspace{0.3\textwidth} {\bf (b)}
|
---|
641 | \hspace{0.2\textwidth}}
|
---|
642 | \caption{Swaths of event surfaces. (a) VE swath. (b) EEE swath. }
|
---|
643 | \label{swaths}
|
---|
644 | \end{figure}
|
---|
645 |
|
---|
646 |
|
---|
647 | \subsection{Visual events and \plucker coordinates}
|
---|
648 |
|
---|
649 | \plucker coordinates allow an elegant description of event surfaces.
|
---|
650 | An event surface can be expressed as an intersection of three \plucker
|
---|
651 | hyperplanes, and thus avoiding explicit treatment of quadratic
|
---|
652 | surfaces. The non-linear EEE surfaces correspond to curves embedded in
|
---|
653 | the intersection of the \plucker hyperplanes.
|
---|
654 |
|
---|
655 | Let ${\cal H}$ be an arrangement~\cite{dcg-handbook} of hyperplanes in
|
---|
656 | ${\cal P}^5$ that correspond to \plucker coefficients of edges of the
|
---|
657 | scene polygons. The intersection of the arrangement ${\cal H}$ and the
|
---|
658 | \plucker quadric yields all visual
|
---|
659 | events~\cite{Teller92phd,p-rsls-97,Pu98-DSGIV}.
|
---|
660 |
|
---|
661 | An extremal line $l$ intersects four generator edges. Consequently,
|
---|
662 | the corresponding \plucker point $\ppoint_l$ lies on four \plucker
|
---|
663 | hyperplanes. In 5D the four hyperplanes define an edge of the
|
---|
664 | arrangement ${\cal H}$. Thus, we can find all extremal lines of a
|
---|
665 | given set of polygons by examining the edges of ${\cal H}$ for
|
---|
666 | intersections with the \plucker quadric~\cite{Pu98-DSGIV}.
|
---|
667 |
|
---|
668 |
|
---|
669 | Consider the situation depicted in Figure~\ref{swaths}. In line space
|
---|
670 | the event surfaces correspond to curves embedded in the \plucker
|
---|
671 | quadric. In general these curves are conics defined by an intersection
|
---|
672 | of the 2D-faces of ${\cal H}$ with the \plucker quadric (see
|
---|
673 | Figure~\ref{5Dswaths}).
|
---|
674 |
|
---|
675 | \begin{figure}[htb]
|
---|
676 | \centerline{
|
---|
677 | \includegraphics[width=0.6\textwidth,draft=\DRAFTFIGS]{figs/ipswaths}}
|
---|
678 | \caption{3D swaths correspond to conics on the Pl\"ucker quadric.}
|
---|
679 | \label{5Dswaths}
|
---|
680 | \end{figure}
|
---|
681 |
|
---|
682 |
|
---|
683 |
|
---|
684 | \section{Lines intersecting a polygon}
|
---|
685 |
|
---|
686 | \label{sec:rot3d_singlepoly}
|
---|
687 |
|
---|
688 | \plucker coordinates provide a tool to map lines from primal space to
|
---|
689 | points in line space. This mapping allows to perform operations of
|
---|
690 | sets of lines using set theoretical operations on the corresponding
|
---|
691 | sets of points. In polygonal scenes the {\em elementary set of lines}
|
---|
692 | is formed by lines intersecting a given polygon.
|
---|
693 |
|
---|
694 |
|
---|
695 | Assume that a convex polygon $P$ is defined by edges $e_i, 0\leq i <
|
---|
696 | n$ that are oriented counterclockwise. The set of lines ${\cal L}_P$
|
---|
697 | intersecting the polygon that are oriented in the direction of the
|
---|
698 | polygon's normal satisfies:
|
---|
699 |
|
---|
700 |
|
---|
701 | \begin{equation}
|
---|
702 | {\cal L}_P = \{ l | l \in (R^3, R^3), side(\bpi_l, \bpi_{e_i}) \leq 0, \forall i \in \langle 0,n) \},
|
---|
703 | \label{eq:halfspaces}
|
---|
704 | \end{equation}
|
---|
705 |
|
---|
706 | where $\bpi_l$ are \plucker coordinates of line $l$ and $\bpi_{e_i}$ are
|
---|
707 | \plucker coordinates of $i$-th edge of the polygon. Substituting the
|
---|
708 | Eq.~\ref{eq:side} and rewriting the equation in terms of a set of
|
---|
709 | \plucker points we get:
|
---|
710 |
|
---|
711 | \begin{equation}
|
---|
712 | \begin{array}{ll}
|
---|
713 | {\cal F}_P & = \{ \ppoint | \ppoint \in {\cal P}^5, \bpi \times \bpi_{e_i} \leq 0, \forall i \in \langle 0,n) \} = \\
|
---|
714 | & = \{ \ppoint | \ppoint \in {\cal P}^5, \bpi \odot \bomega_{e_i} \leq 0, \forall i \in \langle 0,n) \},
|
---|
715 | \end{array}
|
---|
716 | \label{eq:feasible}
|
---|
717 | \end{equation}
|
---|
718 |
|
---|
719 | where ${\cal F}_P$ is a set of {\em feasible \plucker points} for
|
---|
720 | polygon $P$. Substituting Eq.~\ref{eq:def_halfspaces}
|
---|
721 | into~\ref{eq:feasible} we obtain:
|
---|
722 |
|
---|
723 | \begin{equation}
|
---|
724 | \begin{array}{ll}
|
---|
725 | {\cal F}_P & = \{ \ppoint | \ppoint \in {\cal P}^5, \bpi \in \pplane^-_{e_i}, \forall i \in \langle 0,n) \}
|
---|
726 | \end{array}
|
---|
727 | \label{eq:intersection}
|
---|
728 | \end{equation}
|
---|
729 |
|
---|
730 | Thus the set of feasible \plucker points is defined by an intersection
|
---|
731 | of halfspaces defined by the \plucker hyperplanes corresponding to edges of the
|
---|
732 | polygon. The set of {\em stabbers} ${\cal S}_P$ is then defined as an
|
---|
733 | intersection of ${\cal F}_P$ with the \plucker quadric:
|
---|
734 |
|
---|
735 | \begin{equation}
|
---|
736 | {\cal S}_P = \{ \ppoint | \ppoint \in {\cal F}_P, \bpi \odot \bpi = 0 \}.
|
---|
737 | \end{equation}
|
---|
738 |
|
---|
739 | The stabbers are \plucker points corresponding to the real lines
|
---|
740 | intersecting the polygon that are oriented in the direction of the
|
---|
741 | normal. Similarly we can define the sets of {\em reverse feasible
|
---|
742 | \plucker points} ${\cal F}^-_P$ and {\em reverse stabbers} ${\cal
|
---|
743 | S}^-_P$ that correspond to opposite oriented lines intersecting the
|
---|
744 | polygon:
|
---|
745 |
|
---|
746 | \begin{equation}
|
---|
747 | \begin{array}{ll}
|
---|
748 | {\cal F}^-_P & = \{ \ppoint | \ppoint \in {\cal P}^5, \ppoint \in \pplane^+_{e_i}, \forall i \in \langle 0,n) \} \\
|
---|
749 | {\cal S}^-_P & = \{ \ppoint | \ppoint \in {\cal F}^-_P, \bpi \odot \bpi = 0 \}.
|
---|
750 | \end{array}
|
---|
751 | \end{equation}
|
---|
752 |
|
---|
753 |
|
---|
754 |
|
---|
755 |
|
---|
756 | \section{Lines between two polygons}
|
---|
757 | \label{sec:rot3d_twopoly}
|
---|
758 |
|
---|
759 | The above presented definitions of elementary line sets allow to
|
---|
760 | handle visibility computations by means of set operations on the sets
|
---|
761 | of feasible \plucker points. Visibility between two polygons $P_j$
|
---|
762 | and $P_k$ can be determined by constructing an intersection of
|
---|
763 | feasible sets of the two polygons ${\cal F}_{P_j}$ and ${\cal
|
---|
764 | F}_{P_k}$ and subtracting all feasible sets of polygons lying between
|
---|
765 | $P_j$ and $P_k$. To obtain the set of unoccluded stabbers we intersect
|
---|
766 | the resulting feasible set with the \plucker quadric.
|
---|
767 |
|
---|
768 | Further in this chapter we restrict our discussion to visibility from
|
---|
769 | a given {\em source polygon} $P_S$. Given any {\em occluder polygon}
|
---|
770 | $P_j$ we first describe lines intersecting both $P_S$ and $P_j$. Lines
|
---|
771 | between $P_S$ and $P_j$ can be described by an intersection of their
|
---|
772 | feasible line sets:
|
---|
773 |
|
---|
774 | \begin{equation}
|
---|
775 | {\cal F}_{P_SP_j} = {\cal F}_{P_S} \cap {\cal F}_{P_j}
|
---|
776 | \end{equation}
|
---|
777 |
|
---|
778 | and thus
|
---|
779 |
|
---|
780 | \begin{equation}
|
---|
781 | {\cal S}_{P_SP_j} = {\cal S}_{P_S} \cap {\cal S}_{P_j}.
|
---|
782 | \end{equation}
|
---|
783 |
|
---|
784 | The feasible \plucker points are defined by an intersection of
|
---|
785 | halfspaces corresponding to edges of $P_S$ and $P_j$. These halfspaces
|
---|
786 | define a {\em blocker polyhedron} $B_{P_SP_j}$ that is described in
|
---|
787 | the next section.
|
---|
788 |
|
---|
789 |
|
---|
790 | \subsubsection{Blocker polyhedron}
|
---|
791 |
|
---|
792 | The blocker polyhedron describes lines intersecting the source
|
---|
793 | polygon and the given occluder. The blocker polyhedron can be seen
|
---|
794 | as an extension of the blocker polygon discussed in
|
---|
795 | Chapters~\ref{chap:rot2d} and~\ref{chap:rot3d} for the from-region
|
---|
796 | visibility in 3D scenes. The blocker polyhedron is a 5D polyhedron in
|
---|
797 | a 5D projective space. To avoid singularities in the projection from
|
---|
798 | ${\cal P}^5$ to ${\cal R}^5$ the polyhedron can be embedded in ${\cal
|
---|
799 | R}^6$ similarly to the embedding of blocker polygon in ${\cal R}^3$
|
---|
800 | (see Section~\ref{sec:blocker_polygon}). Then the polyhedron actually
|
---|
801 | represents a 6D pyramid with an apex at the origin of ${\cal R}^6$.
|
---|
802 |
|
---|
803 |
|
---|
804 | \subsubsection{Cap planes}
|
---|
805 |
|
---|
806 | The blocker polyhedron is defined by an intersection of halfspaces
|
---|
807 | defined by \plucker planes that are mappings of edges of the source
|
---|
808 | polygon and the occluder. As stated above the blocker polyhedron
|
---|
809 | represents the set of feasible \plucker points ${\cal F}_{P_SP_j}$
|
---|
810 | including points not intersecting the \plucker quadric that correspond
|
---|
811 | to imaginary lines. We bound the polyhedron by {\em cap planes}
|
---|
812 | aligned with the \plucker quadric so that the resulting polyhedron is
|
---|
813 | a tighter representation of the stabbers ${\cal S}_{P_SP_j}$. We need
|
---|
814 | to ensure that the resulting polyhedron fully contains the stabbers
|
---|
815 | ${\cal S}_{P_SP_j}$, i.e. contains the cross-section of the \plucker
|
---|
816 | quadric and ${\cal F}_{P_SP_j}$.
|
---|
817 |
|
---|
818 | The cap planes provide the following benefits:
|
---|
819 |
|
---|
820 | \begin{itemize}
|
---|
821 | \item The computation is localized to the proximity of the \plucker
|
---|
822 | quadric. This reduces the combinatorial complexity of data structure
|
---|
823 | representing an arrangement of the blocker polyhedra.
|
---|
824 |
|
---|
825 | \item The blocker polyhedron is always bounded. Although the set of
|
---|
826 | lines between two convex polygons is bounded, the set of feasible
|
---|
827 | \plucker points can be unbounded at the ``direction'' of imaginary
|
---|
828 | lines. Adding the cap planes we make sure that the polyhedron is
|
---|
829 | bounded, which allows its easier treatment. By using the cap planes
|
---|
830 | we avoid the handling of very oblong, almost unbounded polyhedra,
|
---|
831 | which improves numerical stability of a floating point
|
---|
832 | implementation of the algorithm.
|
---|
833 | \end{itemize}
|
---|
834 |
|
---|
835 |
|
---|
836 | We used two cap planes to bound the polyhedron, one for each side of
|
---|
837 | the \plucker quadric (a side is given by the sign of $\bpi \odot
|
---|
838 | \bpi$). The cap planes are computed as tangents to the \plucker
|
---|
839 | quadric at the center of the set of stabbers ${\cal S}_{P_SP_j}$. The
|
---|
840 | planes are translated each at the opposite direction making sure that
|
---|
841 | they include the whole set ${\cal S}_{P_SP_j}$.
|
---|
842 |
|
---|
843 |
|
---|
844 |
|
---|
845 | \subsection{Intersection with the \plucker quadric}
|
---|
846 | \label{sec:stabbers}
|
---|
847 |
|
---|
848 | Given a blocker polyhedron representing the set of feasible lines
|
---|
849 | ${\cal F}_{P_SP_j}$ we can compute an intersection of the edges of the
|
---|
850 | polyhedron with the \plucker quadric to determine the set of extremal
|
---|
851 | lines bounding the set of stabbers ${\cal S}_{P_SP_j}$. An
|
---|
852 | intersection of an edge of the blocker polyhedron with the \plucker
|
---|
853 | quadric results in at most two {\em extremal \plucker points} that
|
---|
854 | correspond extremal lines\footnote{Neglecting the case that the whole
|
---|
855 | edge is embedded in the \plucker quadric, which results in infinite
|
---|
856 | number of extremal lines.}. Given an edge of the blocker polyhedron
|
---|
857 | the intersection with the \plucker quadric is computed by solving the
|
---|
858 | quadratic equation (Eq.~\ref{eq:plucker_quadric}). A robust algorithm
|
---|
859 | for computing this intersection was developed by
|
---|
860 | Teller~\cite{TH83}.
|
---|
861 |
|
---|
862 |
|
---|
863 | Intersecting all edges of the blocker polyhedron with the \plucker
|
---|
864 | quadric yields all extremal lines of ${\cal
|
---|
865 | S}_{P_SP_j}$~\cite{Teller:1992:CAA,Pu98-DSGIV}. See
|
---|
866 | Figure~\ref{fig:rot3_visrays} for an example of extremal lines
|
---|
867 | computed for the given source polygon and a set of three occluders.
|
---|
868 |
|
---|
869 |
|
---|
870 | \begin{figure}[htb]
|
---|
871 | \centerline{
|
---|
872 | \includegraphics[width=0.5\textwidth,draft=\DRAFTIMAGES]{images/rot3_visrays}}
|
---|
873 | \caption{Extremal lines for the given source polygon (yellow) and three occluders.}
|
---|
874 | \label{fig:rot3_visrays}
|
---|
875 | \end{figure}
|
---|
876 |
|
---|
877 | The intersection of the 2D faces of the blocker polyhedron with the
|
---|
878 | \plucker quadric yields swaths of event surfaces of the set of
|
---|
879 | stabbers ${\cal S}_{P_SP_j}$~\cite{Teller92phd}. In general the
|
---|
880 | intersection results in 1D conics.
|
---|
881 |
|
---|
882 | We can avoid the explicit treatment of conics in 5D by computing the
|
---|
883 | local topology of the edges of the blocker polyhedron and constructing
|
---|
884 | the swaths in primal space between the topologically connected
|
---|
885 | extremal lines~\cite{Teller92phd}. The local topology of an extremal
|
---|
886 | \plucker point is given by connections with extremal \plucker points
|
---|
887 | embedded in the same 2D face of the blocker polyhedron. A 2D face of
|
---|
888 | the blocker polyhedron is given by three \plucker hyperplanes. Thus
|
---|
889 | the pairs of extremal \plucker points defined by the subset of the
|
---|
890 | same three \plucker hyperplanes define a swath.
|
---|
891 |
|
---|
892 |
|
---|
893 |
|
---|
894 | For solution of some from-region visibility problems (e.g. PVS
|
---|
895 | computation, region-to-region visibility) the event swaths need not be
|
---|
896 | reconstructed. For example the visibility culling algorithm that will
|
---|
897 | be discussed in Section~\ref{sec:rot3pvs} only computes extremal
|
---|
898 | \plucker points and uses them to test an existence of a set of
|
---|
899 | stabbers of a given size.
|
---|
900 |
|
---|
901 |
|
---|
902 | \subsection{Size of the set of lines}
|
---|
903 |
|
---|
904 | \label{sec:size_measure}
|
---|
905 |
|
---|
906 | Computing a size measure of a given set of lines is useful for most
|
---|
907 | visibility algorithms. The computed size measure can be used to drive
|
---|
908 | the subdivision of the given set of lines or to bound the maximal
|
---|
909 | error of the algorithm. An analytic algorithm can use the computed
|
---|
910 | size measure for thresholding by a given $\epsilon$-size to discard
|
---|
911 | very small line sets. A discrete algorithm can use the size measure
|
---|
912 | to determine the required density of sampling.
|
---|
913 |
|
---|
914 | The size of a set of lines for the from-point visibility can be
|
---|
915 | formulated easily: the size is given by the area of the intersection
|
---|
916 | of the line set with a plane. This corresponds to quantifying
|
---|
917 | visibility of an object according to its projected area. Such a size
|
---|
918 | is determined in the solution space (viewport). Alternatively we could
|
---|
919 | use a ``viewport independent measure'' given by a solid angle formed by
|
---|
920 | the visible part of an object. The size measure for the from-region
|
---|
921 | visibility problems is more complicated for the following reasons:
|
---|
922 |
|
---|
923 | \begin{itemize}
|
---|
924 | \item The domain of the solution space is four-dimensional.
|
---|
925 | \item The solution space of the from-region visibility algorithm
|
---|
926 | generally does not correspond to the solution space of the
|
---|
927 | application. For example, a visible surface algorithm using a
|
---|
928 | precomputed PVS works in a 2D domain induced by the given viewport.
|
---|
929 | \end{itemize}
|
---|
930 |
|
---|
931 |
|
---|
932 | \subsubsection{General size measure}
|
---|
933 |
|
---|
934 | A size of a set of lines for the from-region visibility can be
|
---|
935 | computed by evaluating a 4D integral. Using \plucker coordinates we
|
---|
936 | can compute a volume of the 4D hyper-surface corresponding to the
|
---|
937 | given set of lines. The volume however depends on a way of projecting
|
---|
938 | the blocker polyhedron from ${\cal P}^5$ to ${\cal R}^5$. This
|
---|
939 | projection has a similar role as the selection of the viewport for the
|
---|
940 | from-point visibility problem. We can project the blocker polyhedron
|
---|
941 | from ${\cal P}^5$ to ${\cal R}^5$ by projecting it to a 5D hyperplane
|
---|
942 | defined by certain reference direction, e.g. the ``center-line'' of
|
---|
943 | the given set of lines. Pu proposed a different size measure based on
|
---|
944 | measuring the {\em angular spread} and the {\em distance} between
|
---|
945 | lines~\cite{Pu98-DSGIV}. Both these quantities can be evaluated in
|
---|
946 | terms of \plucker coordinates of the set of extremal lines of the
|
---|
947 | given line set.
|
---|
948 |
|
---|
949 |
|
---|
950 | \subsubsection{Size measure for the PVS computation}
|
---|
951 |
|
---|
952 | It can be difficult to relate the size measures described above to
|
---|
953 | the domain of the result of a subsequently applied visibility
|
---|
954 | algorithm. We need a simple scheme that fits to the context of the
|
---|
955 | target application. In this section we suggest a size measure
|
---|
956 | designed for the PVS computation. When computing a PVS we are
|
---|
957 | interested in measuring the size of the set of unoccluded lines
|
---|
958 | (stabbers) between the source polygon $P_S$ and a given scene
|
---|
959 | polygon. If this size is below an $\epsilon$-threshold, we can
|
---|
960 | possibly exclude the polygon from the PVS. We suggest to use an
|
---|
961 | estimate of the minimal angle between the stabbers at a point inside
|
---|
962 | $P_S$. The idea is to estimate the minimal projected diameter of a
|
---|
963 | polygon visible through the given set of lines from any point inside
|
---|
964 | $P_S$. This estimate can be used to bound a maximal error of an image
|
---|
965 | synthesized with respect to any viewpoint inside $P_S$ for the case that
|
---|
966 | the corresponding set of lines is neglected.
|
---|
967 |
|
---|
968 | %% The size measure approximates the minimal spatial angle given by a
|
---|
969 | %% cross-section of the given set of lines parallel to the source polygon
|
---|
970 | %% $P_S$ and the center of $P_S$.
|
---|
971 |
|
---|
972 | Given a blocker polyhedron ${\cal F}_{P_SP_j}$ the proposed size
|
---|
973 | measure can be evaluated as follows:
|
---|
974 |
|
---|
975 | \begin{enumerate}
|
---|
976 |
|
---|
977 | \item
|
---|
978 | Compute the extremal lines of the corresponding set of stabbers ${\cal
|
---|
979 | S}_{P_SP_j}$ as described in Section~\ref{sec:stabbers}.
|
---|
980 |
|
---|
981 | \item For each polygon edge $e_i$ bounding the stabbers
|
---|
982 | determine an extremal line $l_{mi}$ with a maximal distance from the
|
---|
983 | edge.
|
---|
984 |
|
---|
985 | \item For each edge $e_i$ compute a shortest line segment $z_i$
|
---|
986 | connecting $e_i$ and $l_{mi}$. The length of this line segment is
|
---|
987 | then scaled according to its distance from the source polygon,
|
---|
988 | i.e. we compute an angle $\alpha_i$ between the lines connecting the
|
---|
989 | center of the source polygon and the endpoints of $z_i$.
|
---|
990 |
|
---|
991 | \item Select a minimal angle $\alpha_m$ of all $\alpha_i$ as the
|
---|
992 | estimate of the size of the given line set.
|
---|
993 |
|
---|
994 | \end{enumerate}
|
---|
995 |
|
---|
996 | The evaluation of the size measure is depicted in
|
---|
997 | Figure~\ref{fig:linesize}.
|
---|
998 |
|
---|
999 | \begin{figure}[htb]
|
---|
1000 | \centerline{
|
---|
1001 | \includegraphics[width=0.4\textwidth,draft=\DRAFTFIGS]{figs/linesize}}
|
---|
1002 | \caption{A 2D example of evaluation of the size of a set of lines. The three
|
---|
1003 | line segments
|
---|
1004 | $z_1$, $z_2$ and $z_3$ maximize the distance of the corresponding
|
---|
1005 | occluder edges from the extremal lines. The line segment $z_3$ spans
|
---|
1006 | a minimal angle $\alpha_m$ with respect to the center of the source
|
---|
1007 | polygon $P_S$.}
|
---|
1008 | \label{fig:linesize}
|
---|
1009 | \end{figure}
|
---|
1010 |
|
---|
1011 | The angle $\alpha_m$ can be related to the angular resolution of the
|
---|
1012 | synthesized image. Given the resolution of the image we can threshold
|
---|
1013 | ``small'' line sets with $\alpha_m$ below the corresponding angular
|
---|
1014 | threshold to achieve a sub-pixel precision of the rendering algorithm.
|
---|
1015 | This measure can also be applied to deal with the finite precision of
|
---|
1016 | the floating point arithmetics by using a small $\epsilon$-threshold
|
---|
1017 | to handle numerical inaccuracies.
|
---|
1018 |
|
---|