As mentioned in the discussion of B-rep, the edges and faces of a solid can
be curve segments and surface patches rather than line segments and
polygons. However, this may create some problems. In the figure shown
below, we have three curvilinear patches of a B-rep joining together.
Two boundary curve segments are shown in yellow and white meeting at a
vertex ** X**. Let these two curves be described as

Consider the "right-end" of curve **f**(*b*) and the "left-end" of
curve **g**(*m*). If **f**(*b*) and **g**(*m*) are
equal as shown in the above figure, we shall say curves **f**() and
**g**() are
*C*^{0} *continuous* at
**f**(*b*)=**g**(*m*).
If for all *i* <= *k*, the *i*-th derivatives
at **f**(*b*) and **g**(*m*) are equal, we shall say that the
curves are
*C ^{k}*

It is clear from the definition that if two curve segments are
*C ^{k} continuous* at

Let us take a look at a simple example. The following curve consists of two parabolas:

wheref(u) = (u, -u^{2}, 0 )

g(v) = (v,v^{2}, 0 )

The following are necessary information for this checking:

Sincef'(u) = ( 1, -2u, 0 )

f''(u) = ( 0, -2, 0 )

g'(u) = ( 1, 2v, 0 )

g''(v) = ( 0, 2, 0 )

Let us computes their curvatures:

Curvature ofThey have the same forms, althoughf(u) = 2/(1 + 4u^{2})^{1.5}

Curvature ofg(v) = 2/(1 + 4v^{2})^{1.5}

wheref(u) =A+u(B-A)

g(v) =B+v(C-B)

As *u* (*resp.*, *v*) changes from 0 to 1, **f**(*u*)
(*resp.*, **g**(*v*)) runs from **A** to **B**
(*resp.*, **B** to **C**). Line segments **f**(*u*)
and **g**(*v*) are obviously *C*^{0} *continuous*
at the joining point **B**. Is it *C*^{1} *continuous*?

Thus,f'(u) =B-A

g'(v) =C-B

Is it strange? Yes, in fact, this is a problem of parameterization.
If we replace the
direction vectors **B** - **A** and **C** - **B** with
unit-length vectors and change the domain of parameters *u* and
*v*, this problem will disappear. That is, the above equations are
changed to the following:

whereF(u) =A+u(B-A)/ |B-A|

G(v) =B+v(C-B)/ |C-B|

Let us look at another example, where PI is for 3.1415926 and *u* and
*v* are in the range of [0,1].

f(u) = ( -cos(u^{2}PI/2), sin(u^{2}PI/2), 0 )

g(v) = ( sin(v^{2}PI/2), cos(v^{2}PI/2), 0 )

As *u* moves from 0 to 1, **f**(*u*) traces out the left
part of the semi-circle. Similarly, as *v* moves from 0 to 1,
**g**(*u*) traces out the right part of the semi-circle. These
two have a joining point, shown in red, at
(0,1,0) = **f**(1) = **g**(0). We have the following:

Note that bothf'(u) = ( PIusin(u^{2}PI/2), PIucos(u^{2}PI/2), 0 )

f''(u) = ( PI^{2}u^{2}cos(u^{2}PI/2), -PI^{2}u^{2}sin(u^{2}PI/2), 0 )

f'(u) ×f''(u) = ( 0, 0, -PI^{3}u^{3})

|f'(u) | = PIu

|f'(u) ×f''(u) | = PI^{3}u^{3}

(ku) = 1

g'(v) = ( PIvcos(v^{2}PI/2), -PIvsin(v^{2}PI/2), 0 )

g''(v) = ( -PI^{2}v^{2}cos(v^{2}PI/2), -PI^{2}v^{2}cos(v^{2}PI/2), 0 )

g'(v) ×g''(v) = ( 0, 0, -PI^{3}u^{3})

|g'(v) | = PIv

|g'(v) ×g''(v) | = PI^{3}v^{3}

(kv) = 1

Let us reparameterize these curves (*i.e.*, change their parametric
equations without changing their shapes). Let *u*^{2} =
*p* in **f**(*u*) and let *v*^{2} = *q* in
**g**(*v*). The new equations are:

Their derivatives aref(p) = ( -cos(pPI/2), sin(pPI/2), 0 )

g(q) = ( sin(qPI/2), cos(qPI/2), 0)

Therefore, after changing variables, bothf'(p) = ( (PI/2) sin(pPI/2), (PI/2) cos(pPI/2), 0 )

f''(p) = ( (PI/2)^{2}cos(pPI/2), -(PI/2)^{2}sin(pPI/2), 0 )

g'(q) = ( (PI/2) cos(qPI/2), -(PI/2) sin(qPI/2), 0 )

g''(q) = ( -(PI/2)^{2}sin(qPI/2), -(PI/2)^{2}cos(qPI/2), 0 )

f'(p) ×f''(p) =g'(q) ×g''(q) = ( 0, 0, -(PI/2)^{3})

|f'(p) ×f''(p) | = |g'(q) ×g''(q) | = (PI/2)^{3}

|f'(p) | = |g'(q) | = PI/2

(kp) =(kq) = 1

Let a curve segment have length *s*. One can parameterize this curve
such that **f**(*u*) is the point having a distance *u* from the
initial point **f**(0), where *u* is in the range of 0 and *s*.
With this arc length parameterization, as *u* moves from 0 to *s*,
**f**(*u*) moves on the curve from **f**(0) to **f**(*s*)
in the same speed. Therefore, the tangent vector which measures speed is of
unit-length. Not only this, many formulas shown on this and previous pages
can be simplified.

Why don't we use arc length parameterization to simplify our computation? The answer is quite simple. While arc length parameterization is simple and elegant in theory, it is tedious in computation and impractical. One can easily design a curve in some handy parameterization; but, reparameterizing it with arc length sometime is extremely difficult. That is, finding arc length is not an easy task, since it requires to integrate a function involving the use of square root.

Therefore, even though non-arc length parameterization could cause problems, we will not use the arc length parameterization.

Oops, we use arc length in the definition! But, don't worry, since arc length parameterization is not required as shown by the following equivalent definition:Two curve segments are saidGat the joining point if and only if all^{k}geometric continuousi-th derivatives,iless than or equal tok, computed with arc length parameters agree at the joining point.

This is better but not good enough because we really do not know how to find such parameterizations. Fortunately, the cases ofTwo curve segments are saidGat the joining point if and only if there exists two parameterizations, one for each curve segment, such that all^{k}geometric continuousi-th derivatives,iless than or equal tok, computed with these new parameterizations agree at the joining point.

Since the tangent vectors at the joining point have the same direction, both curves have the same tangent line at the joining point. However, the converse does not hold. More precisely, two curve segments having the same tangent lineTwoC^{0}curve segments are saidG^{1}geometric continuousat the joining point if and only if vectorsf'(u) andg'(v) are in thesamedirection at the joining point. Note thatf'(u) andg'(v) are evaluated at the joining point.

G. Neilson has found a very simple formula for *G*^{2}
continuity as follows:

The beauty of this characterization forTwoC^{1}curve segments are saidG^{2}geometric continuousat the joining point if and only if vectorf''(u) -g''(v) is parallel to the tangent vector at the joining point. Note thatf''(u) andg''(v) are evaluated at the joining point.

Let us use an example to illustrate Nielson's result. Consider the following two parabola segments with joining point at ( 0, 1, 0):

Both segments have domain [0, 1]. The joining point isf(u) = ( -1 +u^{2}, 2u-u^{2}, 0 )

g(v) = ( 2u-u^{2}, 1 -u^{2}, 0 )

The following are essential calculations:

Fromf'(u) = ( 2u, 2 - 2u, 0 )

f''(u) = ( 2, -2, 0 )

f'(u) ×f''(u) = ( 0, 0, -4 )

|f'(u) | = 2SQRT(1 - 2u+ 2u^{2})

|f'(u) ×f''(u) | = 4

(ku) = 1/(2(1 - 2u+ 2u^{2})^{1.5})

g'(v) = ( 2 - 2v, -2v, 0 )

g''(v) = ( -2, -2, 0 )

g'(v) ×g''(v) = ( 0, 0, -4 )

|g'(v) | = 2SQRT(1 - 2v+ 2v^{2})

|g'(v) ×g''(v) | = 4

(kv) = 1/(2(1 - 2v+ 2v^{2})^{1.5})

Let us check for *G*^{2}. Since the curves are
*C*^{1}, checking for *G*^{2} is meaningful. Since
**f**''(1) - **g**''(0) = ( 4, 0, 0 ) is parallel to the tangent vector
( 2, 0, 0 ) at the joining point, these two curve segments are
*G*^{2} *continuous* at the joining point ( 0, 1, 0 ).

By the definition of *G ^{k}*, you could find two
parameterizations, not necessarily of arc length type, so that the
reparameterized segments are of