Game Development Reference

In-Depth Information

Figure 11.13 shows the same B-spline curve again, but this time with one of

its interior points replicated three times. The curve interpolates the replicated

control point, but only exhibits
C
continuity at that point. This is equivalent to

two separate B-spline curves for which the last control point of the first curve is

equal to the first control point of the second curve and each is replicated three

times.

11.6.2 B-Spline Globalization

()

Each piece

i
t

of a uniform B-spline is defined over the range of parameter

Q

)

values

control points, we can define each piece

in terms of a global parameter
u
by assigning
i

∈

0,1

. For a curve having

n

+

1

t

[

=

i

and writing

t

()

(

)

Q

u

=

Q

u

−

t

.

(11.74)

i

i

i

()

The pieces

i
u

compose the same curve using the range of parameter values

)

. We can write Equation (11.74) in terms of the B-spline basis func-

tions as follows.

∈−

1,

n

1

u

[

3

()

(

)

Q

u

=

B

u

−

t

P

(11.75)

i

k

i

i

+−

k

1

k

=

0

Any one of the control points
P
affects at most four pieces of the curve, and few-

er than four only if it occurs near the beginning or end of the sequence of control

points. For the piece

, the point
P
is weighted by the blending function
B
.

The same point is weighted by the blending function

i
u

()

()

B
for the piece

u

, the

i

+

1

()

u

blending function

B
for the piece

, and the blending function

B
for the

i

−

1

. Since the point
P
does not contribute to any other piece of the

curve, we can say that its weight is zero for any piece

()

u

piece

i

−

2

()

<−

i

2

u

where

or

j

j

>+

i

1

()

i
N u
that is al-

ways used as the weight for the point
P
for every piece of the curve. Since each

piece

. It is possible for us to construct a weighting function

j

()

)

()

i
u

is defined over the parameter range

u

∈

[

tt
+

,

, we define

N

u
as

i

i

1

i

(

)

)

B

ut

−

, f

u t t

∈

[

,

;

0

i

+

1

i

+

1

i

+

2

(

)

[

)

Bu t

−

,

if

u tt

∈

,

;

1

i

i

i

+

1

()

(

)

[

)

Nu

=

But

−

, f

u t t

∈

, ;

(11.76)

i

2

i

−

1

i

−

1

i

(

)

[

)

B

ut

−

, f

u t t

∈

,

;

3

i

−

2

i

−

2

i

−

1

0,

otherwise.

Search Nedrilad ::

Custom Search