Game Development Reference
In-Depth Information
function is then defined by the following recurrence formula:
1if u i
u
u i + 1
N i , o ( u )
=
0 else
(14.6)
u i
u i + p
u
u i + p + 1
u
N i , p ( u )
=
N i , p 1 ( u )
+
N i + 1, p 1 ( u )
u i
u i + p + 1
u i + 1
Equation (14.6) can give a 0/0 quotient, which is then defined at 0. The knot vector
of a non-uniform B-spline curve is thus a non-periodic and non-uniform vector of the
shape:
U
=
( a , . .. , a ,
p
u p + 1 , ...u m p + 1 , b , .. .b
)
(14.7)
p
+
1
+
1
The polygon obtained by joining all control points P i is called the control polygon of
a B-spline curve.
We generalise the result obtained to rational curves and define the rational and
non-uniform B-spline curves, i.e. the NURBS curves:
i = 0 N i , p ( u ) w i P i
i = 0 N i , p ( u ) w i
C( u )
=
a
u
b
(14.8)
where P i are control points, w i are weights and N i are basic B-spline functions defined
on the non-periodic and non-uniform knot vector U of the equation (14.7). We can rep-
resent a rational curve with n dimensions as a polynomial curve with n
1 dimensions
using homogenous coordinates. The control points in homogenous coordinates are
written as P i
+
0. This
operation is equivalent to a perspective projection on the origin. We can then rewrite
the equation (14.8)
=
( w i x i , w i y i , w i z i , w i ) in a four-dimensional space where w i
=
n
C w ( u )
N i , p ( u ) P i
=
(14.9)
i
=
0
It is this equation that we will use to define the NURBS surfaces in homogenous
coordinates:
n
S w ( u , v )
=
N i , p ( u ) N j , q ( v ) P i , j
(14.10)
i
=
0
j
=
0
Search Nedrilad ::




Custom Search