Journal of Information & Computational Science 4: 2 (2007) 879–887

advertisement
Journal of Information & Computational Science 4: 2 (2007) 879–887
Available at http://www.joics.com
A New Approach for Designing Rational Bézier
Surfaces from a Given Geodesic ?
Hongyan Zhao a,b ,
a Department
b State
Guojin Wang a,b,∗
of Mathematics, Zhejiang University, Hangzhou 310027, China
Key Laboratory of CAD & CG, Zhejiang University, Hangzhou 310027, China
Received 21 November 2006; revised 6 March 2007
Abstract
This paper proposes an approach to design the surface pencil with specified parametric representations
from a given geodesic. The surface was considered as a combination of the marching-scale functions
and the Frenet trihedron frame, for which some necessary and sufficient conditions must be met. This
paper simplifies those conditions, and represents the surface by combination of control points and basis
functions, which are more practical for applications. The paper provides the formulae to construct the
rational Bézier surface pencil, and the algorithm to compute the control points of cubic rational Bézier
surfaces. The method is useful in practical applications of the garment and shoe industry and so on.
Keywords: Geodesic; Frenet trihedron frame; Bézier Surface; Marching-scale functions
1
Introduction
A geodesic on a surface is an embedded simple curve on the surface such that for any two points on
the curve the portion of the curve connecting them is also the shortest path between them on the
surface. Geodesic also has been widely applied in various industries, such as tent manufacturing,
cutting and painting path, fiberglass tape windings in pipe manufacturing, textile manufacturing
([2, 3, 6, 7]). Generally, the research in geodesic focused on how to find and characterize geodesic
on the given surfaces ([9]), and there were a lots of papers working on such a problem ([1, 4, 5, 8]).
In the designing industry of shoes, garments and so on, it is often required for designers
to construct a family of surfaces from a given spatial geodesic curve, among which they can
select those satisfying the fashion tastes of customers. This may be regarded as the reverse
problem of the above-mentioned. Wang et al. ([10]) studied such a problem. The basic idea is
?
Supported by the National Grand Fundamental Research 973 Program of China (No. 2004CB719400), the
National Natural Science Foundation of China (No. 60673031, No. 60333010) and the National Natural Science
Foundation for Innovative Research Groups (No. 60021201).
∗
Corresponding author.
Email address: wanggj@zju.edu.cn (Guojin Wang).
c 2007 Binary Information Press
1548–7741/ Copyright °
June 2007
880
H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 879–887
to regard the wanted surface as an extension from the given geodesic curve, and represent it as a
linear combination of the marching-scale functions u(r, t), v(r, t) and w(r, t) and the three vector
functions T(r), N(r), B(r), which are the unit tangent, the principal normal and the binormal
vector of the geodesic respectively. With the geodesic and isoparametric constraints, they derived
the necessary and sufficient conditions for the correct parametric representation of the surface
pencil.
Wang et al. proposed a principle for constructing a surface pencil with a common isogeodesic
curve. However, the research is still a little far from practice. First, they did not provide
algorithms of designing the marching-scale functions for some specified surfaces. Secondly, they
assumed u(r, t), v(r, t) and w(r, t) in polynomial or C-Bézier representations independent of r.
The constructed surface could not be represented by Bézier or rational Bézier representation due
to the radical expressions in T(r), N(r) and B(r), which are widely applied in CAD and CAM
system. This paper studies the above problems. The basic idea is to design proper marching-scale
functions so that the resultant surface is represented by the combination of control points and
basis functions. The basis functions could be chosen as Bernstein polynomials or so. Thus we
derive Bézier or rational Bézier surfaces for engineering application.
The paper is arranged as the follows. Section 1 mainly introduces the background and the
related work. Section 2 describes the algorithm to design a rational Bézier surface with the given
curve as a geodesic. It also provides the formulae to compute control points of cubic rational
Bézier surfaces. Finally some examples and figures will be given to illustrate our conclusion.
2
Surface Pencil with Common Geodesic
Given a spatial parametric curve R(r) (0 ≤ r ≤ H) on a surface P, if R(r) and P share a same
parameter, we say that they are isoparametric. If at the same time R(r) is also a geodesic of P,
we say that they are isogeodesic.
The Frenet trihedron frame of R(r) can be represented as {T(r), N(r), B(r)}, where T(r),
N(r) and B(r) are the unit tangent, the principal normal and the binormal vector, respectively.
The isogeodesic surface P of R(r) could be seen as an extension from R(r) along the three
directions of its Frenet trihedron frame. That is, the surface P = P(r, t) could be represented
with the combination of the curve and the local coordinate frame as


T(r)
P(r, t) = R(r) + (u(r, t), v(r, t), w(r, t))  N(r)  ,
B(r)
0 ≤ r ≤ H, 0 ≤ t ≤ T,
(1)
where u(r, t), v(r, t), and w(r, t) are the expansion length, called marching-scale functions along
the directions T(r), N(r) and B(r) respectively. The necessary and sufficient conditions for P(r, t)
H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 879–887
881
to have R(r) as an isogeodesic curve are [10]: there exists t0 ∈ [0, T ] so that for any 0 ≤ r ≤ H,
u(r, t0 ) = v(r, t0 ) = w(r, t0 ) = 0,
∂v(r, t0 ) ∂w(r, t0 ) ∂w(r, t0 ) ∂v(r, t0 )
−
= 0,
∂t ¶
∂r
∂t
µ∂r
∂u(r, t0 ) ∂w(r, t0 ) ∂w(r, t0 ) ∂u(r, t0 )
+
6= 0,
− 1+
∂r ¶
∂t
∂r
∂t
µ
∂u(r, t0 ) ∂v(r, t0 ) ∂v(r, t0 ) ∂u(r, t0 )
1+
−
= 0.
∂r
∂t
∂r
∂t
(2)
The surfaces satisfying Eq. (2) are called isogeodesic surfaces, which share R(r) as a common
isogeodesic curve.
In fact, the conditions Eq. (2) could be simplified. Since
u(r, t0 ) = v(r, t0 ) = w(r, t0 ) = 0,
we have
∂u(r, t0 )
∂v(r, t0 )
∂w(r, t0 )
=
=
= 0,
0 ≤ r ≤ H.
∂r
∂r
∂r
So Eq. (2) is rewritten as
u(r, t0 ) = v(r, t0 ) = w(r, t0 ) = 0,
∂v(r, t0 )
= 0,
∂t
∂w(r, t0 )
6= 0.
∂t
Obviously, Eq. (3) is more convenient for applications.
(3)
As we have described, the representations of T(r), N(r) and B(r) usually have radical expressions which are not perfect roots in the denominators. So the marching-scale functions should
be specifically designed to derive certain surface representations, such as rational Bézier surfaces,
NURBS surfaces. Next we study the case when u(r, t), v(r, t), and w(r, t) can be decomposed into
two factors dependent on r and t respectively:
|Ṙ(r)|
u(r, t) =
mu P
nu
P
i=0 j=0
β
α P
P
i=0 j=0
Fimu (r)Gjnu (t)uij
,
Fiα (r)Gβj (t)eij
|Ṙ(r)| · |Ṙ(r) × R̈(r)|
v(r, t) =
i=0 j=0
β
α P
P
|Ṙ(r) × R̈(r)|
i=0 j=0
β
α P
P
i=0 j=0
Fimv (r)Gnj v (t)vij
,
Fiα (r)Gβj (t)eij
i=0 j=0
m
nw
Pw P
w(r, t) =
mv P
nv
P
Fimw (r)Gnj w (t)wij
,
Fiα (r)Gβj (t)eij
where Fimδ (r) and Gnj δ (t) (δ = u, v, w) are basis functions on r and t respectively, δij (i =
0, 1, . . . , mδ ; j = 0, 1, . . . , nδ ) (δ = u, v, w) are all real number constants, and eij (i = 0, 1, . . . , α; j =
0, 1, . . . , β) are weights.
882
H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 879–887
The corresponding surface pencil represented by Eq. (1) can be expressed as algebraic polynomials, or trigonometric polynomials, or any other forms according to the selection of basis
functions.
Assume the basis functions Gkj are algebraic polynomials. The isogeodesic surface pencil can
be specified from Eq. (3). Take v(r, t) as an example, and there is
|Ṙ(r)| · |Ṙ(r) × R̈(r)|
mv
P
i=0
v(r, t) =
β
α P
P
i=0 j=0
Fimv (r)
nv
P
bis (t − t0 )s
s=2
,
(4)
Fiα (r)Gβj (t)eij
where bis (i = 0, 1, . . . , mv ; s = 2, 3, . . . , nv ) are arbitrary real number constants. And u(r, t) and
w(r, t) could also be computed as
|Ṙ(r)|
mu
P
i=0
u(r, t) =
Fimu (r)
β
α P
P
i=0 j=0
nu
P
s=1
,
Fiα (r)Gβj (t)eij
|Ṙ(r) × R̈(r)|
m
Pw
i=0
β
α
PP
w(r, t) =
ais (t − t0 )s
i=0 j=0
Fimw (r)
nw
P
s=1
(5)
cis (t − t0 )s
,
Fiα (r)Gβj (t)eij
where ais (i = 0, 1, . . . , mu ; s = 1, 2, . . . , nu ), bis (i = 0, 1, . . . , mv ; s = 2, 3, . . . , nv ) and cis (i =
m
Pw 2
0, 1, . . . , mw ; s = 1, 2, . . . , nw ) are arbitrary real number constants while
ci1 6= 0. We call those
i=0
constants marching-scale coefficients.
3
Rational Bézier Surface Pencil with Common Geodesic
Given an mth Bézier curve R(r) =
m
P
i=0
Bim (r)Ri (0 ≤ r ≤ 1), now we could design a rational
Bézier surface pencil which has it as a common geodesic. Assume the basis functions in Eqs. (4)
and (5) are Bernstein basis. Using the conversion formula between Bernstein basis and monomial
basis
(1, t, . 
. . , tn ) = (B0n (t), B1n (t), . . . , Bnn (t))(fijB )(n+1)×(n+1) ,
i < j,
 µ
¶0,. µ ¶
B
n−j
n
i, j = 0, 1, . . . , n,
fij =
,
i ≥ j,

i−j
i
and the binomial expansion
¶
s µ
X
s
(t − t0 ) =
(−t0 )s−k tk ,
k
s
k=0
H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 879–887
883
the marching-scale functions in Eqs. (4) and (5) could be represented as
|Ṙ(r)|
mu P
nu
P
i=0 j=0
u(r, t) =
β
α P
P
i=0 j=0
Bimu (r)Bjnu (t)Uij
,
Biα (r)Bjβ (t)eij
|Ṙ(r)| · |Ṙ(r) × R̈(r)|
i=0 j=0
v(r, t) =
β
α P
P
|Ṙ(r) × R̈(r)|
i=0 j=0
w(r, t) =
β
α P
P
i=0 j=0
Bimv (r)Bjnv (t)Vij
,
Biα (r)Bjβ (t)eij
i=0 j=0
m
nw
Pw P
where
mv P
nv
P
Bimw (r)Bjnw (t)Wij
,
Biα (r)Bjβ (t)eij
¶µ ¶
.µ n ¶
j
s
u
s−k
,
ais (−t0 )
Uij =
k
k
k
s=1 k=0
¶
µ
¶
µ
¶
µ
. n
(j,s)
nv min
P
P
s
j
v
s−k
,
bis (−t0 )
Vij =
k
k
k
s=2 k=0
¶
µ
¶
µ
¶
µ
. n
(j,s)
nw min
P
P
j
s
w
.
cis (−t0 )s−k
Wij =
k
k
k
s=1 k=0
(j,s)
nu min
P
P
µ
Compute T(r), N(r) and B(r), and we get
m−1
P
Bim−1 (r)Ti
i=0
¯,
T(r) = ¯m−1
¯ P m−1
¯
¯
Bi (r)Ti ¯¯
¯
i=0
2m−3
P 2m−3
Bi
(r)Bi
i=0
¯
¯,
B(r) = 2m−3
¯ P 2m−3
¯
¯
¯
B
(r)B
i
i
¯
¯
i=0
(6)
3m−4
P
Bi3m−4 (r)Ni
¯,
¯ ¯2m−3
N(r) = ¯m−1
¯
¯ ¯ P 2m−3
¯ P m−1
¯
¯
¯
¯
B
(r)B
B
(r)T
·
i
i
i
i
¯
¯ ¯
¯
i=0
i=0
where
Ti = Ri+1 − Ri ,
min (m−1,i)
X
Bi =
µ
j=max (0,i−m+2)
min (m−1,i)
Ni =
i=0
X
j=max (0,i−2m+3)
¶µ ¶
2m − 3 − i
i
[Tj × (Ti−j+1 − Ti−j )] ,
m−1−j
j
µ
¶µ ¶
3m − 4 − j
i
(Bi−j × Tj ).
m−1−j
j
(7)
884
H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 879–887
Then the products of u(r, t), v(r, t), w(r, t) and T(r), N(r), B(r) are respectively
mu P
+m−1 P
nu
u(r, t)T(r) =
i=0
j=0
Bimu +m−1 (r)Bjnu (t)
minP
(mu ,i)
µ
k=max (0,i−m+1)
mu + m − 1 − i
mu − k
¶µ ¶
i
Ukj Ti−k
k
,
¶α β
P α
mu + m − 1 P
β
Bi (r)Bj (t)eij
mu
i=0 j=0
µ
¶µ ¶
minP
(mv ,i)
mv +3m−4
nv
P P
mv + 3m − 4 − i
i
mv +3m−4
nv
Bi
(r)Bj (t)
Vkj Ni−k
mv − k
k
i=0
j=0
k=max (0,i−3m+4)
,
v(r, t)N(r) =
µ
¶α β
P α
mv + 3m − 4 P
β
Bi (r)Bj (t)eij
mv
i=0 j=0
µ
¶µ ¶
minP
(mw ,i)
mw +2m−3
nw
P
P
mw + 2m − 3 − i
i
mw +2m−3
nw
Bi
(r)Bj (t)
Wkj Bi−k
mw − k
k
i=0
j=0
k=max (0,i−2m+3)
w(r, t)B(r) =
.
µ
¶α β
P α
mw + 2m − 3 P
β
Bi (r)Bj (t)eij
mw
i=0 j=0
(8)
Finally, we derive the rational Bézier surface pencil represented by Eq. (1) with R(r) as a isogeodesic. There are
µ
(mu + 1) × nu + (mv + 1) × (nv − 1) + (mw + 1) × nw
arbitrary real number constants, ais , bis and cis with
m
Pw
i=0
c2i1 6= 0. The lowest degree of the member
surfaces is 3m − 4, when setting mu ≤ 2m − 3, mv ≤ m − 1 and mw = 0.
In the following, we will take the cubic Bézier curve for example, and give the algorithm to
design its isogeodesic cubic rational Bézier surface pencil. Suppose R(r) is a cubic Bézier curve,
so m = 3. To derive a cubic rational Bézier curve P(r, t), we can choose mu = 1, mv = mw = 0,
α = 0 and nu = nv = nw = β = 3. Then the expressions of u(r, t)T(r) and w(r, t)B(r) in Eq. (8)
are at most of the degree 3 while that of v(r, t)N(r) of the degree 5. So the only condition for
P(r, t) to be a cubic rational surface is that v(r, t)N(r) is degenerated to a cubic rational curve,
that is,
µ ¶
µ ¶
4
5
X
X
4
5
4−i
5−i
Ni = 0,
(9)
Ni =
(−1)
(−1)
i
i
i=0
i=0
or
V0j = 0,
j = 0, 1, 2, 3.
(10)
Eq. (9) indicates that the degree of N(r) in Eq. (6) degenerates to 3. If it holds for R(r), the
resultant surface is always a cubic surface with the freedom of the fifteen arbitrary real number
3
P
constants ais (i = 0, 1; s = 1, 2, 3), b0s (s = 2, 3), c0s (s = 1, 2, 3) ( c20s 6= 0) and e0j (j = 0, 1, 2, 3),
s=1
that is,
3 P
3
P
P(r, t) =
i=0 j=0
Bi3 Bj3 (t)Pij
3
P
j=0
,
e0j
H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 879–887
885
where
Pij = e0j Ri
¶µ ¶
i
Ukj Ti−k
k
k=max (0,i−2)
µ ¶µ
¶µ
¶
i
k
1 XX
5−l
3−k
k−l 5
+ µ ¶
(−1)
V0j Nl + W0j Bi ,
3
l
5
−
k
i
−
k
k=0 l=0
i
i = 0, 1, 2, 3; j = 0, 1, 2, 3.
1
+
3
min (1,i)
X
µ
3−i
1−k
(11)
The condition Eq. (10) is equivalent to v(r, t) = 0 and so v(r, t)N(r, t) = 0. Then the control
points Pij of the resulted surface are represented as
1
Pij = e0j Ri +
3
min (1,i)
X
µ
k=max (0,i−2)
3−i
1−k
¶µ ¶
i
Ukj Ti−k + W0j Bi ,
k
(12)
i = 0, 1, 2, 3; j = 0, 1, 2, 3.
There are thirteen arbitrary real number constants.
Given a cubic Bézier curve, the algorithm to design its isogeodesic cubic rational Bézier surfaces
is as the following
Step 1 Compute Ti , Ni and Bi using Eq. (7).
Step 2 If Eq. (9) holds, the control points of the desired surface is expressed by Eq. (11) of which
3
P
the marching-scale coefficients ais , bos , cos ( c20s 6= 0) and e0j could be specified arbitrarily by
s=1
users.
Step 3 If Eq. (9) does not hold, the control points is expressed by Eq. (12) of which ais ,
3
P
cos ( c20s 6= 0) and e0j are arbitrary number constants.
s=1
We can also construct Bézier surfaces following the above steps while setting e0j = 1 (j =
0, 1, . . . , β).
4
Examples
In this section, we shall give some examples to illustrate our algorithm. Using the algorithm
described in Section 3, we could construct rational Bézier surfaces of different shapes conveniently.
The given curve of Fig. 1 is a space cubic Bézier curve (in red) with three control points: (0, 1, 1),
(2, 3, 2), (3, 2, 4), (5, 0, 1). Firstly we set e0j = 1 (j = 0, 1, . . . , β). Then suppose ais = cjs =
K (i = 0, 1; j = 0; s = 1, 2, 3), where K is a number constant. Fig. 1 shows the resultant cubic
Bézier surfaces with different K. In Fig. 1(a), K = 1/40. In Fig. 1(b), K = 1/20. And in
Fig. 1(c), K = 1/10. It indicates that values of ais and cjs are related to the directed marching
886
H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 879–887
(a)
(b)
(c)
Fig. 1: Cubic Bézier surfaces.
distances of a point on R(r) along the direction T(r) and B(r). The bigger their values are, the
broader the resultant surface is.
As is introduced, the concept of isogeodesic surface pencil could be applied to the design of a
dress or shoes. Wang et al. ([10]) assumed the marching-scale functions are cubic polynomials, and
employed the least square fitting method to determine the variables. However, the representation
of the resultant surface usually contains radical expressions. So it is hard to be used in CAD
or CAM system. Using our method, we can derive surfaces represented with polynomials, which
could refine the shortcomings in Wang et al. ([10]). The variables in the representation could
also be computed by least square fitting algorithm.
5
Conclusion
In this paper, we propose an approach to design the surface pencil with specified representation
from a given geodesic. The surfaces are represented by basis-based parametric expressions. We
mainly discuss the way to construct the rational isogeodesic Bézier surface pencil through the
given curve. We also provide the algorithm to compute the control points of cubic rational Bézier
surfaces. The method is convenient for applications and could be used in garment and shoe
industry and so on.
References
[1]
P. K. Agarwal, S. Har-Peled, M. Sharir and K. R. Varadarajan, Approximating shortest paths on
a convex polytope in three dimensions, J. ACM 44 (1997) 567-584.
[2]
R. Brond, D. Jeulin, P. Gateau, J. Jarrin and G. Serpe, Estimation of the transport properties of
polymer composites by geodesic propagation, J. Microsc 176 (1994) 167-177.
[3]
S. Bryson, Virtual spacetime: an environment for the visualization of curved spacetimes via
geodesic flows, IEEE Visualization (1992) 291-298.
[4]
R. Goldenberg, R. Kimmel, E. Rivlin and M. Rudzsky, Fast geodesic active contours, IEEE Trans.
Image Process 10 (2001) 1467-1475.
[5]
S. Har-Peled, Approximate shortest-path and geodesic diameter on convex polytopes in three
dimensions, Discrete & Computational Geometry 21 (1999) 217-231.
[6]
R. J. Haw, An application of geodesic curves to sail design, Comput. Graphics Forum 4 (1985)
137-139.
H. Zhao et al. /Journal of Information & Computational Science 4: 2 (2007) 879–887
887
[7]
R. J. Haw and R. C. Munchmeyer, Geodesic curves on patched polynomial surfaces, Comput.
Graphics Forum 2 (1983) 225-232.
[8]
M. Novotni and R. Klein, Computing geodesic paths on triangular meshes, in: Proc. WSCG ’2002,
2002, pp. 341-347.
[9]
M. Spivak, A Comprehensive Introduction to Differential Geometry, 2nd Ed., Publish or Perish,
Houston, 1979.
[10] G. J. Wang, K. Tang and C. L. Tai, Parametric representation of a surface pencil with a common
spatial geodesic, Computer-Aided Design 36 (2004) 447-459.
Download