C.-L. Yang et al. / Journal of Computational and Applied Mathematics 256 (2014) 1–15 3
Fig. 2. Weak visibility polygons of a primitive triangular curve γ and its triangular hull ∆abc inside a simple polygon P. (For interpretation of the references
to colour in this figure legend, the reader is referred to the web version of this article.)
where D
k
are the control points, ω
k
are the weights and N
d
k
are the dth-degree B-spline basis functions defined on the knot
vector
T = {0, . . . , 0
d+1
, t
d+1
, . . . , t
n
d
−1
, 1, . . . , 1
d+1
}.
Definition 2 (Visibility Polygon). Two points p and q in a polygon P are visible to each other if the line segment pq contains
no points outside P. The visibility polygon VP(q) of a point q in P is the set of all points in P that are visible from q.
Definition 3 (Weak Visibility Polygon). For a curve or region γ and a point q in a polygon P, if there exists a point p in γ such
that p and q are visible, we say q is weakly visible from γ , and the set of points inside P that are weakly visible from γ is the
weak visibility polygon of γ , denoted by WVP(P, γ ).
Fig. 2 shows the WVPs of a curve segment γ and its triangular hull ∆abc (see Definition 4) inside a simple polygon P.
The polygon with yellow edges is the weak visibility polygon of ∆abc while the polygon with purple edges is the weak
visibility polygon of γ . In fact, the vertices of the yellow and purple polygons are on the boundary of P. To better illustrate
the difference, the polygons are offset in Figs. 2, 8–10 and 17.
In this paper, we focus on how to compute the weak visibility polygon of NURBS curves inside simple polygons. The WVPs
of any curve inside a triangle is a subset of the WVP of the triangle (see Fig. 2). Also the WVP of a triangle is the union of
the WVPs of its three edges. Since it is relatively easy to compute the WVPs of line segments, we first subdivide the NURBS
curve into triangular curves (see Definition 5), and compute the WVPs
P of their triangular hulls. Finally, the WVP of the
NURBS curve is obtained by refining
P. Here, the triangular hulls are used to obtain an intermediate result and serve as a
bridge between them.
Definition 4 (Triangular Hull). Let a and b be the two endpoints of a C
11
continuous NURBS curve γ , ac and bc be vectors
tangent to γ at the endpoints a and b, respectively, and c be the intersection point of ac and bc. If γ lies entirely inside ∆abc,
we say ∆abc the triangular hull of γ .
Definition 5 (Triangular Curve). A NURBS curve γ is called a triangular curve if it satisfies
(1) γ is C
1
continuous;
(2) γ is contained in the boundary of its convex hull;
(3) γ has a triangular hull.
In Fig. 3(a), the curve γ is C
1
continuous and divided into three sub-curves γ
1
, γ
2
and γ
3
by the points b and c. The
boundary of γ ’s convex hull is composed of ad (dotted line), γ
1
, bc (dotted line) and γ
3
. The curve γ in Fig. 3(a) is not a
triangular curve as it is only partly contained in the boundary of its convex hull while the curve γ in Fig. 3(b) is a triangular
curve as it is completely contained in the boundary of its convex hull.
1
A curve is called C
1
continuous if its first derivative is continuous at all points of the curve.