The twisted cubic curve: a computer-aided geometric design approach

The twisted cubic curve: a computer-aided geometric design approach

The twisted cubic cu rve: a computer-aided geometric design approach A R F orrest The twisted cubic curve has the attraction o f combining both comm...

744KB Sizes 0 Downloads 109 Views

The twisted cubic cu rve: a computer-aided geometric

design approach A R F orrest

The twisted cubic curve has the attraction o f combining both commonly used curve definitions, the conic section and the parametric cubic, in a single form, A definition of the twisted cubic is developed in terms o f geometric 'handles' convenient for CA D and independent o f parametrization, analogous to a well-known definition of conics. Conditions for the occurrence of asymptotes are investigated and shown to be considerably more complex than those for conics. Several more controllable subsets o f the general curve are described. The paper concludes that use of the full generality o f the twisted cubic is in most cases unjustified. In computer-aided geometric design, two curve forms predominate: the conic section and the parametric (vector-valued) cubic. Conic sections have been used, traditionally, in aircraft lofting, there being several well-known geometric constructions for manual drawing of conics 1 . Typically, the conic arcs are pieced together with continuity of position and slope. To achieve higher continuity, it is necessary to use cubic curves which offer additional features - they need not be planar, and they can have points of inflexion. The rational 2'3 or twisted cubic 4 curve offers the possibility of combining both curve types in a single mathematical form, and has been explored by several workers for that reason. This paper presents a general approach to the twisted cubic in its rational parametric form, and aims to indicate the limitations and pitfalls of the curve which may not have been appreciated earlier in the context of computer-aided geometric design. In particular, it should be a considerable improvement on the treatment discussed in the author's thesis 3. NOTATION Let P denote a point vector in two or three-dimensional space: P= [ x y ] o r P = [ x y z ] where the coordinates of the point are x, y and z. Let P denote a point vector in three or four-dimensional homogeneous space: p=[XYH]

orP=[XYZH]

where the homogeneous coordinates s of the point are

X, Y, Z and H. Cartesian and homogeneous coordinate representations are related, where H :Y=O, thus: P= [ X Y (Z) HI = [ H P H ] = [Hx Hy (Hz) H] In the case where H = 0, the homogeneous vector P= [X Y (Z) 0] represents the point at infinity on the line through the origin passing through the point P = [X Y (Z)]. Throughout the paper, the dimensionality of the point vectors will be apparent from context. We shall use the letter P to denote data vectors, that is to say vectors which might be supplied by a user or employed in the definition of a curve, and the letter Q to denote derived vectors. Thus the generic point on a curve is the vector-valued function Q(u): (or Q(u)): Q(u) = [x(u) y(u) (z(u))] = f(P~,u) where pr.I are data vectors, r denoting the degree of differentiation (for r = 0, points, we shall omit the superscript). We shall use 3x 3 and 4x 4 matrices to transform vectors and to define curves: for general matrices, we shall use the letter A, but we shall use B for basis matrices and G for geometry matrices, both terms to be elucidated later. Components of matrices will be denoted by the corresponding lower case letter with two subscripts. Unless otherwise indicated, matrices will be used to post-multiply row vectors:

Q(u) = Q(u)A REVIEW OF CONIC SECTIONS All conic sections may be derived by transforming a parabola (or a circle, etc) in three-dimensional space and then projecting the transformed curve onto a standard plane by a pencil of rays through the origin, ie by conic projection. We need not be concerned here with the theorems of projective geometry leading to this result, but immediately proceed to defining our general conic arc as a transform of the primitive parabola6: x=u 2 y=u in parametric terms, or if we eliminate u, y2 = x Using homogeneous coordinate notation, the primitive parabola is written: q(u) : [u 2 u

11

and the general conic section is then written: School of Computing Studies, University of East Anglia, Norwich NR4 7TJ, UK

volume 12 number 4 july 1980

Q(u) = [u 2 u 1]A = [X(u) Y(u) H(u)]

0010-4485/80/040165-08 $02.00 © 1980 IPC Business Press

165

where A is a 3x 3 matrix. We now seek a method for defining the matrix A, and here we make several assumptions appropriate to computer-aided geometric design: • we seek to model bounded conic arcs rather than complete conic sections • we seek to avoid, unless specifically required in a particular situation, arcs containing asymptotes • we seek to define conic arcs purely by means of geometric data such as points, slopes, etc In nonhomogeneous terms, provided H(u) #= 0, the conic arc takes the rationa/quadratic form: X(u)_ a . u ~ +a:lu +a3~ x(u) - H(u) a13 u2 + a23u + a3j Y(u) _ a,2u 2 + a22u + a32 y ( u ) - H ( u ) a13u 2 + a23u + a33 Since multiplying the numerators and denominator by the same factor does not change the conic section, we see that A does not contain nine independent coefficients as far as definition of the arc is concerned, but eight independent ratios. Furthermore, substitution for the parameter u by

i /j- OLV+f 7v+6 does not change the shape of the curve 3. This transformation, by an argument similar to that above, contains three independent factors 4, but if we wish to parametrize the conic over a given range, for example from 0 to 1, two of these factors will be fixed, Thus the transformation

O~V u - (a-1)v + 1 leaves the arc parametrized in the range 0 to 1 unchanged in shape, but the rate of change of position with respect to parameter will be different. This means that of the eight independent ratios in the matrix A, one has no effect on the shape of the curve, and in that sense is non geometric. We shall define A in terms of seven geometric items of data, and adopt a standard parametrization (which can, but need not, be changed) to fix the eighth parameter, cx in the parametric transformation. A convenient method for defining the seven geometric items is the following: consider the triangle Po-PT-P1 (Figure 1). The conic arc will start at Q(0) = Po and terminate at Q(1) = P1. At Po it will be tangent to Po-~PT, and at P1 it will be tangent to PT-+PI. Six parameters are so defined. The seventh parameter will be determined by specifying where the arc intersects the line joining PT to PM, the midpoint of the chord Po-+P1. This intersection point PS (S for shoulder) is given by the relationship: Ps = (1-p)P M +pPm = ½(1 -P)Po +PPT +½(1 -p)Pt We shall call p the conic shape factor: 1 it determines whether the arc is parabolic, elliptic, or hyperbolic. We shall standardize the parametrization by the arbitrary (but reasonable) choice Q(½) = Ps. The conic arc may now be written in the form:

= [u 2 u 1]BG

166

p P o

/

z" z_[_p, " ', p M

~

Figure I. Standard definition o f the conic section

provided the tangents at Po and Pl are not parallel, ie provided that PT is a finite point. If the tangents are parallel, we can write:

I 01

and PT may be regarded as an i n c r e m e n t a l vector parallel to the required tangents. These tangents meet at the point at infinity PT = [PT 0]. The shoulder point PS = Q(½) is given by: PS = Q(½) = ½ (Po + Pl) + PT For the main argument of this section we will assume tangents are not parallel. Two special cases require particular attention: • p = 0: the arc is independent of PT and is merely the line segment joining Po to P1 • p= 1 : the arc is the special case of the hyperbola consisting of the semi-infinite line segment starting at Po and passing through PT and the semi-infinite line segment through PT terminating at P1 The second case is clearly to be avoided. On examining our representation further, we notice that it is not completely general: we have excluded the possibility that Ho and H1 have opposite signs. Since the denominator is a quadratic function, it can have at most two roots for u e [0,1 ]. Zeros correspond to asymptotes of the curve, and these we wish to avoid. Thus if Ho ~nd HI are of the same sign, the denominator H(u) will either have no roots in [0,1 ], two roots in [0,1 ], or in the limiting case two coincident roots in [0,1 ]. By inspection, if p < l , H(u) has no roots in [0,1]. I f p /> 1, there are two roots in [0,1 ]. Thus, using the above formulation, we can avoid asymptotes by ensuring p < l , ie by ensuring that the shoulder point PS is contained in the triangle Po-PT-P1, or in the semi-infinite region bounded by Po-~PT and PT-+PI and the opposite side of Po-+PI from PT. In the latter case, p is negative, and the arc starts at P0 tangent to Po-ePT but in the sense PT~Po, terminating at P1 tangent to PI-+PT (Figure 2). Further inspection shows that p defines the type of conic section 1 : p = ½ parabola, p ~> ½ hyperbola, p < ½ ellipse Note also that if p < ½ then p' = -p/(1-2p) may be used to define a second arc, for the same Po, PT and P1, to complete the closed curve. In summary, we have been able to define a conic arc in terms of purely geometric data, independent of the parametrization; to ensure that unwanted asymptotes do not occur; and to classify the conic section used. The designer need know nothing about homogeneous coordinates, tangent vectors or projective geometry, and

computer-aided design

a

the condition for no asymptotes is particularly simple. In passing we note that Faux and Pratt 7 suggest a similar definition for the conic section but the shoulder point is considered as being the maximum distance of the arc from the chord, measured perpendicular to the chord. By similar triangles (Figure 3) we see that the conic shape factor in both cases is identical.

T H E N O N - R A T I O N A L CUBIC Two non-rational forms of the cubic curve are in common use: the Hermite 2 cubic and the Bernstein-B~zier 8 cubic. Both are transformations of the primitive cubic parabola: Q(t)=[u 3u 2 ul]BG

///

where B is the basis matrix, in this case 4x4, and G is the geometry matrix, in this case 4x 3. The primitive cubic parabola is the curve defined by:

X=U3~ y =U2~ Z =U

b

ie by the intersection of any two of the surfaces:

PTO

x 2 =y3, x =z 3,y = z 2 The curve is non-planar, twisted, in the general case. Four vectors, at known values of parameter suffice to define the curve. In the Hermite case, the four vectors chosen are the start and end points of the cubic arc, and the tangent vectors 2 at the start and end of the arc:

Q(u)=[u3u2ul]BG=[u3u2ul]

-2

1

1

Po

3 -2

-1

PI

0

1

0

eg

0

0

0

P~

P, Po

Figure 4. (a) Hermite cubic definition (tangent vectors drawn full size) (b) Bernstein - BEzier cubic definition (convex hull shaded) By inspection Q(0) = Po, O(I) = PI, QI (0) = Po~, and Q' (I) = P]

I-p

Po~ ¢=-*f \ //I I\

i-zp

.~.

Figure 2. Example o f a closed curve

Po

~

P,

Figure 3. Maximum excursion from the chord

volume 12 number 4 july 1980

The Hermite form is most often used where curves are to be joined with continuity of position and slope, since the parameters which directly control this continuity are used explicitly in the definition. A major criticism of the parametric Hermite method is that the user is required to specify tangent vectors and that the effect of varying the tangent vector magnitudes is difficult to predict with accuracy. In particular, overshooting and looping of arcs can occur, but these can be avoided by crude rules of thumb. The data used in defining a parametric cubic curve in Hermite form is thus dependent on the parametrization of the curve (as we shall see below), requiring the designer to have some knowledge of differential geometry for complete mastery over shape control. Nevertheless, the Hermite form is an appropriate form for storage of curve data because of the explicit use of data at the ends of the arc. Figure 4a shows the Hermite definition. In the Bernstein-Bezier cases the four vectors defining the arc are successive vertices of an open polygon (Figure 4b) and the resulting arc runs from the first point of the polygon, tangent to the first side, to the last point of the polygon where it is tangent to the last side. The arc is contained in the convex hull of the four defining points. Note that, in general, the curve does not pass through the two interior points of the defining polygon.

167

data, and each point vector at an unknown value of parameter, as well as supplying three items of data, adds an unknown, yielding a net two items of data. Since our arc is bounded, we presumably supply the two end 0 P1 _J points, leaving eight items of data to be found. In theory, we could ask the curve to interpolate four where Q(0) = Po, Q(1)=PI ,Q1 (0)=3(PTo_Po) and additional points, at unknown parameter values, but QI (1) = 3(PI-PT~). we could not guarantee either tile order of interpolation This definition of the cubic parabola is directly analogous or that the interpolated points would lie within the to the definition of the parabola given above, and shall be bounded arc. This is always the risk where the parameter capitalized on in the following section. value is an unknown. If we attempt to specify the curve by points at known values of parameter, we note that, since 14/3 is noninteger, that we can define only four THE RATIONAL CUBIC points, leaving two items of data to be provided, ie two The cubic parabola is a special case of the more general additional scalars or two shape factors. cubic curve which may be represented in parametric form using homogeneous coordinates:

'

Ii ill

BERNSTEIN-Bg'ZIER FORM OF THE RATIONAL CUBIC

O(u)= [u 3 u 2 u 1 1 B G In this case both B and G are 4 x 4 matrices, and we seek a suitable means of defining them; as with conic sections we shall assume that:

Since analysing the conic section in Bernstein-B~zier form leads to a workable definition of the conic arc, the rational cubic is examined in a similar manner. The general cubic arc will be a perspective transforrnat/on of the cubic parabola, just as the conic section was a conic projection of the parabola. We use a four-sided open polygon and two shape factors to define the cubic, and we shall demonstrate how the shape factors may logically be derived by extending the form used for conic sections to three dimensions, enabling us to classify cubic arcs geometrically into the various categories used by geometers. The cubic arc may now be written:

• arcs are bounded • asymptotes are to be avoided • if possible the specification is to be independent of the parametrization Historically, in computer-aided geometric design, rational cubics were first proposed in Hermite form: Q(u) = [ . ~ . 2 u 11

3 -2

= [ u ~ u ~ u 11

-

0

1

0

0

0 0

1

Q(u)=lu3u2u llBG=[u3u2u 1]

LPU

fi -231 2

PI

-1

0

-6

0 ]Eo1

H1 0

1 0 ~ 0 Ho 0 0JL0 HI 0

P1

Po

= [u3u 2 u 1]

1

Both Coons 2 and the author a have investigated this form. It appeared promising, insofar as one curve form encompassed the Hermite cubic commonly used and the conic section. Objections raised against the Hermite cubic form apply here, but more so, since it is not clear how the values for the derivatives of the homogeneous coordinates, Ho~ and H~ are to be specified, except in the case of particular conic arcs. Coons and Ahuja 9 return to the rational cubic form in a later paper, but again do not suggest how the homogeneous coordinate components might be chosen. The important question of how to avoid asymptotes is not tackled. Note that the twisted cubic in this form reduces to the cubic parabola when: Ho=H~ =I,H~ =HI =0 Following the approach used for conics, it is apparent that the general twisted cubic is defined by 15 independent ratios, rather than 16 independent terms of the 4x 4 matrix A. Assuming parametrization over a closed range of u, from u=O to u--1 for convenience, and using the argument regarding reparametrization, we can further reduce the 'free geometric parameters' to 14. Since the twisted cubic is properly defined in 3D, each point vector at a known value of parameter contributes three items of

168

i! 3 !]r.Ool

[! ] -1 3_3

3

PT

3 0

/PT,I

0 0

LP,_I

1 F.o .0 .o 1

-6

3

0

IHToPToHTol

3

0

0

II-IT~PTIHTII

0

0

0

L.H1 Pl

Hi_ j

H0, HTO, HTI and HI are not mutually independent, since P0, PTO, PT~ and PI supply 12 of the 14 free parameters. Following the conic analogy, we shall fix the homogeneous coordinates by controlling the position of a shoulder point, and standardize the parametrization by making the shoulder point PS correspond to the parameter value ½: O(½) = es

Since the conic arc is planar, we can define the shoulder point by the intersection of a curve and a line: in three dimensions, we must define the shoulder point in terms of the intersection of the arc with ap/ane. A line is determined by two points, a plane by three, so we define the shoulder point to be the intersection of the curve with the plane defined by the tangent points PTO and PT1 and the midpoint of the chord PM = Y2(Po + P1). J ust as we controlled the position of the conic shoulder point relative to the tangent point and the midpoint of the chord by a scalar, p, so we can control the position of the shoulder point PS relative to PTO, PT1 and PM by two

computer-aided desigr

scalars, a and r, which are the area/coordinates of Ps, ie we use homogeneous coordinates within the plane s . PS= OPT1 + rPTo + (I - a - r)P M where: APTo PS PM T =

APT~ PsPM ,

(7 =

AP T o PT 1PM

APTo PT 1PM

The sign of (7 is determined by which side of the line PTo-~PM the shoulder point Ps lies: if PS is on the PTI side, then (7 is positive, and vice versa. A similar rule applies to r. A denotes the area of the designated triangle. Any point in the plane defined by PTO, PT~ and PM may be described in terms of the three points and two scalars. The conic arc cuts the median line, in the definition we have used, in one point interior to the bounded arc. We can demonstrate that a similar result obtains for the intersection of the cubic arc with the plane. Let Ps be any point in the plane PTo-PT1-P M given by: PS = a P t o + rPT 1 + (1 - a - r)P m We now determine the values of parameter for which Q(u) = Ps. By substitution,

that H o and H1 are of the same sign. If Ho and Hi are of the same sign, then the cubic arc intersects the plane defined by PTO, PT1 and PM at a unique point interior to the arc, and we can use this shoulder point to complete the definition of the cubic arc by fixing the values of HTO and HT1. Forcing Ho and H 1 to be of the same sign does not exclude the possibility of asymptotes, and we must therefore look for the conditions which control the roots of the denominator, H: 20 u(1-u) 2 H(u) = (l-u) 3 + (1 - a - r)

2r +(1 - o - r )

: 1 + ( 1 - o - r ) U+(1---a-~-~u +(

Clearly the case where o + r = 1 is a special case, to which we shall return. Again, from the theory of cubic equations, the discriminant of this cubic, after much tedious manipulation, is found to be: g = [ 3 - 4 ( o + r ) ] 3 - [ 3 + 2(0+ r)]2(o-r) 2 1728(a-r) ¢ + [:27-(0-r) 2 ] (o-r) 2

+ 3u2.(1-U)HT1PTI +u3H1P1]

1728(a-r) 4

where: H = (l-u)3Ho + 3u(1-u) 2 HTO + 3u 2 (1-u)H T 1 + u3H 1 Equating Q(u) with Ps we obtain: (7 = 3u(1-u) ~

,

r = 3u 2 (l-u) yHT 1 ½ ( 1 - a - r ) =u3Hl '

H

Let H~ = XHo. It then follows that: (1_u)3 = ~3

The discriminant, D, for this cubic equation is: D=j

a

= 0 for asymptotes

Q(u) = 1 [(1-u)3HoPo + 3u(1-u) 2 HToPTo

½(1 - (7 - r) : (l-u) 3 g,

u2 ( l - u ) + u 3

~ X

which is positive for all real values of X. From the theory of cubic equations, this implies that this particular cubic has a single real root,

Not only does D enable us to determine the number and nature of the asymptotes, but it provides a means of classify. ing the cubic in geometric terms. If D is zero, the curve will have two coincident asymptotes, and is a cubical hyperbolic parabola. If D is positive, the curve has one real asymptote (which cannot lie in [0,1 ] ) and is a cubical ellipse. If D is negative, there are three real asymptotes and the curve is a cubical hyperbola. The special case where o = r = 3/s is the cubical parabola which has three real coincident asymptotes at infinity. The cubical parabola is the curve where H(u) = 1, ie the nonrational cubic. Figure 5 shows the rational cubic curve in terms of its defining parameters and Figure 6 plots the discriminant D against a and r, with D = 0 emphasized. Determining whether or not a given cubic arc will have an asymptote is clearly much more complex than was

I

u = 1--~rg I f k is positive, ie Ho and Hi are of the same sign, then the root lies between 0 and I. X merely repositions the unique intersection point in parametric terms. To avoid certain asymptotes, we make X positive. We are at liberty to make the arbitrary selection Ho = I, and we have demonstrated that X simply controls parametrization. We now choose k = I, so that H~ = I, and the intersection with the plane occurs at the parameter value u =/~. Immediately we find that:

T]

H = ¼ + 3/8 (HTo + H T I ) and thus: HTO

_

_20 _ ~_ 3(1 - a - 1")' HTI=3(1 - o - r)

In summary, if we wish to avoid an asymptote in the bounded cubic segment, then a necessary condition is

volume 12 number 4 july 1980

Po

~

P,

Figure 5. Standard definition of the twisted cubic

169

the case for the conic. For the conic, if the shape factor p was less than or equal to ½, there could be no asymptotes at all and for p < 1, there could be no asymptotes in 10,1 ], ie in the bounded arc. The rule for conics is therefore p < 1. For the cubic, since H0 and Ht are of the same sign, we can have no asymptotes in [0,1 ], two coincident asymptotes, or two distinct asymptotes. Thus if D > 0, there can be no asymptotes. If D ~< 0, we must determine the constraint on the shape factors o and r for which there are no asymptotes in [0,1 ]. In Figure 6, we show hatched those regions of the o - ~- plane which give arcs free from asymptotes in [0,1 ]. As well as the curve D = 0, we plot various lines which give rise to roots of the denominator at specific values of parameter. The limiting case, for our analysis, is o + r = 1, which causes roots at parameter values of 0 and 1. Points on o + r = 1 between o -- 1 and 7 = 1 correspond to roots outside [0,1 ]. Thus the region in the o - ~- plane between D = 0 and o + ~-= 1 does not generate asymptotes. We can thus say that no asymptotes will occur in the bounded arc if: either

D/> 0

or

D
andl o - ~-I ~<1

0~ 0). Unlike the conic, the cubic does not yield a terse, elegant, recipe for avoiding asymptotes, and the analysis involved is prolonged and tedious. The simple heuristic suggested above is analogous to the precise condition for the conic arc, and although it rather restricts the range of cubic arcs which might be attempted, it errs considerably on the side of caution.

PARTICULAR FORMS OF THE R A T I O N A L CUBIC When o = r = 3/8, the denominator of the rational cubic reduces to H = 1, and we have the cubic parabola - the most widely used of the various forms of rational cubic, but strictly speaking the nonrational form. The earliest form of the rational cubic in practical use appears to have been the T-conic developed by Rowin ~° at Boeing. The T-conic is obtained by setting l+p 4

The denominator then reduces to: H(u) = (1 - p ) + 2 ( 2 p - 1)u + 2(1 - 2p)u 2 (barring a scale factor), which is the denominator of the general conic section with shape factor p. Thus the T-conic (or twisted conic) will have no asymptotes in [0,1 ] provided p < 1. In general the T-conic will have a cubic term in the numerator, and will be three-dimensional

170

Roots oi

\

t

r- con,c

1

°Y

-

"

\/Rool ot +I ~

/

0>o

;,

/

~

.

\

-I

Cubtcal hyperbolo

D< 0

%,

L,/(

" in ( 0 , 1 ) ~

:

/

/

\

}X

L/ ." . / F/. ///.

~_ ./ Cubicol hyperb porobolo, D=O " Z 7 ~ \

~N,

I'/J%"> ,,,, ;,-,G+//, . ?./,\\,i" J "

-I

Z _ . _ _ "

0

~.

~-" _ A X _ . L t ....

+!

+2

Figure 6. Classification of the twisted cubic

An even more restricted choice, which seems reasonable, is to confine the shoulder point of the curve to lie within the triangle formed by P i p , PTJ and PM, and this can be expressed by:

0=7--

+2

Roois ol

and I o - ~ - l % 1

Since this set of conditions is somewhat difficult to check, a more conservative set of conditions, somewhat limiting the range of permissible arcs, is: o+r
Roofs ot

rather than planar if the four defining vectors are not coplanar. If we select PTO and PT1 to satisfy the constraint: PT1 - P T o = 11 -+pp ( P T - P ° ) then the T-conic reduces to the standard conic. In terms of the standard conic parameters, PTO = P0 + I~P+Pp (PT-Po)

PT1 = P l - ~2p -p

(P1 - PT)

The advantage of the T-conic is that it combines the two curve forms used commonly in aircraft design: the conic, and the cubic parabola (known at Boeing as the F-curve) which is the case where p = f½. Moreover, the simple restriction that p < 1 ensures that all T-conics are wellbehaved. Two different special cases of the rational cubic curve are employed in the CONSURF system 11-13 at BAC, Warton: the linear parameter segment and the generalized conic segment. Following the analysis by Faux and Pratt 7, the linear parameter segment is defined b'y its end points, its end tangent vectors, and a p-ratio (not the same as the conic shape factor). The tangent vectors are multiplied by scale factors which depend on p and a vector n in a specified direction, in such a way that Q ( u ) ' n increases linearly with u. In terms of our standard rational cubic: PTI = Po +ctoTo

PT1 = P1 - c q T l

where P(P, - Po) "n So- 3(1 - P)To'n

al

_ P(P1 - Po)'n 3(1 - P ) T i " n

and Ho =H1 = P, HTo =HT1 = 1 - p

computer-aided desigr

To and TI are the tangent vectors. The denominator of the linear parameter segment has the form: H(u) = p + 3(1 - 2p)u + 3(2p - 1)u ~ which has roots at

1 +I U

=

--

--

2 - 6

(6p - 9) ½ (2p - 1)

Analysis shows that there can be no real roots for ½ ~< p ~< 3/2 and no roots in [0,1 ] for p < ½. Thus the linear parameter segment case of the rational cubic will be well-behaved provided the p-ratio is less than or equal to 3/2. The generalized conic segment is again defined in terms of its end points, its end tangent vectors, and a p-ratio. In terms of our generalized rational cubic curve, PT o = Po + )iT0

PT1 = PI -/IT1

The three special cases of the rational cubic which we have analysed restrict the range of shapes which can be generated for two reasons: they reduce the number of shape factors from two to one, and they eliminate the cubic term from the fourth, homogeneous, coordinate. In terms of the shape factors for the full rational cubic: T-conic

l+p o = r = -4

Linear parametric segment

3(1 - p ) a = r = 2(3 - 2p)

Generalized conic segment

o = r = p2

As far as the author is aware, there are no special forms of the rational cubic which are either defined in terms of two independent shape factors or retain the cubic term in the denominator.

where

CONCLUSIONS

X = I P~ - Po I sin ~ I P1 - Po I sin 0 sin(~b + O) /a = sin(~b+ O) _p and Ho = H1 - ~ , HTO = HT1 = 1 - p Geometrically, the generalized conic section is obtained by rotating the tangent vectors about the chord Po-~P~ and selecting the points PT0 and PT1 to lie on the corresponding tangent vectors and the circle formed by the intersection of the two cones (Figure 7). 0 and ~bare the semi-angles of the respective cones. The generalized conic then intersects the line joining the mid-point PM of the chord Po-~P1 and the mid-point PN of the line joining PT0 and PT~ at PS such that PS = Q(½) = (1 - P)PM + PPN Clearly the p-ratio is analogous to the shape factor of the conic section, but once more it is not identical since the denominator of the generalized conic section is: H(u) = (1 - p) + (4p - 3)u + (3 - 4p)u 2 1+ 1 This has roots at u = ~ _ 2 ~ _ 3 and by inspection, there will be no roots in [0,1 ] provided p < 1. If 0 < p < 1, the curve segment will lie within the hull formed by the two defining cones.

Po

Figure 7. Generalized conic section

volume 12 number 4 july 1980

P,

We have developed a definition of the rational cubic curve segment which is independent of the parametrization, in a manner directly analogous to the most commonly used definition of the general conic segment. The twisted cubic is expressed in Bernstein-B6zier form and the definition retains the convex hull properties of that form provided the segment does not contain asymptotes. Particular attention is drawn to the problem of predicting or detecting asymptotes, a topic which has largely been ignored by the advocates of the rational cubic form. Full conditions for the occurrence of asymptotes are given, but as these are considerably more complex than the corresponding rules for conic sections, simpler but more restrictive rules are suggested. Three special cases of the general cubic are analysed in terms of the general form, and conditions for asymptotes are developed. Since rational cubic curves require more effort to design, more computation, and more storage than the non-rational cubic, their use requires justification. Superficially, the ability to model, in a single mathematical form, both the general conic and the non-rational cubic has its attractions, but unless care is taken, there is an ever-present danger of asymptotes. Note, in passing, that if the curve is checked graphically, and the common procedure of approximating an arc by a series of straight line segments is adopted for graphical output, then it is by no means certain that an asymptote would be detected - it could simply manifest its presence by an unusual inflection in the drawn curve. Checking for asymptotes mathematically is expensive, but simple checks can be used for restricted subsets of the general curve. For most engineering purposes, excellent approximations to most curves can be obtained in terms of cubic parabolas, and there seems little need to adopt a more complex form provided, for example, that a circle is always identified as such in the data structure. (Devices capable of drawing or generating circles exactly can then take the appropriate action.) For graphical purposes, the user is unlikely to be able to distinguish between a true conic and its cubic parabolic approximant. Of the special cases of the rational cubic, the T-conic, with its direct incorporation of the most commonly-used definition of the general conic, has much to recommend it. Those who wish to adopt the general rational form must be aware of the dangers and guard against them.

17

REFERENCES

1 Newell, A Genera/discussion of the use of conic equations to define curved surfaces The Boeing Company, D2-4398, USA (March 1960) 2 Coons, S A Surfaces for computer-aided design of space forms MIT Project MAC, MAC-TR-41, USA (June 1967) 3 Forrest, A R Curves and surfaces for computer-aided design PhD thesis University of Cambridge, UK (1968) 4 Wood, P W The twisted cubic curve Cambridge Tracts in Mathematics and Physics No 14, Cambridge UP, UK

(}913) 5 Maxwell, E A The methods of plane projective geometry based on the use of general homogeneous coordinates Cambridge UP, UK (1946) 6 Roberts, L G Homogeneous matrix representation and the manipulation of n-dimensional constructs M IT Lincoln Labs MS 1405, USA (May 1965)

172

7 Faux, 1 D and Pratt, M J Computationalgeometry tor design and manufacture Ellis Horwood, Chichestcr,

UK (1979) 8 B@zier, P Numerical control - mathematics and appEcations Wiley, Chichester, UK (1972)

9 Ahuja, D Vand Coons, S A 'Geometry for construction and display' IBM Systems J. Vol 7 Nos 3-4 (1968)

pp 188-205 10 Rowin, M S Conic, cubic and T-conic segments The Boeing Company, D2-23252, USA (April 1964) 11 Ball, A A 'CONSURF Part 1: Introduction of the conic lofting tile' Comput. Aided Des. Vol 6 No 4 (1974) pp 243-249 12 Ball, A A 'CONSURF Part 2: Description of the algorithms' Comput. Aided Des. Vol 7 No 4 (1975) pp 237--242 13 Ball, A A 'CONSURF Part 3: How the program is used' Comput. AidedDes. Vol 9 No 1 (1977) pp 9-18

computer-aided desigr

A new international journal published by IPC Science and Technology Press in association with the European Computer Measurement Association

an international journal for all those concerned with the design, development and maintenance of computer systems. Published quarterly from J u n e 1980

Main s u b j e c t areas to be covered:

• measurement applications • measurement technology • analytical methods

modelling techniques capacity planning • performance theory

If you are a:

If you work at one of the following: • research establishment • hardware vendor • software vendor • computing and standard organization • procurement body

• computer and systems design engineer • systems analyst or programmer • performance analyst • data-processing manager • consultant • user

YOU NEED THE FORUM FOR PRACTICAL AND THEORETICAL PAPERS ON PERFORMANCE MEASUREMENT, EVALUATION AND TUNING THAT COMPUTER PEFORMANCE PROVIDES

TO:

Christine Mullins, IPC Science and Technology Press Ltd., PO Box 63, Westbury House, Bury Street, Guildford, Surrey GU2 5BH, England Telephone: 0483-31261 Telex: 859556 SCITEC G Please send me further details of Computer Performance

Name Organization and address

Annual Subscription £50.00 ($130.00) ECOMA Subscription £35.00

L-

volume 12 number 4 july 1980

I"13

ADVANCEDCOURSE ON COMPUTERAIDED DESIGN DARMSTADT, GERMANY SEPTEMBER 8 TO 19, 1980

DIRECTORS OF THE COURSE J. Encarnacao, Technical University of Darmstadt, Germany M. Lucas, University of Nantes, France LECTURERS K. B~, University of Trondheim, Norway E. Hoskins, Applied Research of Cambridge, Cambridge, U.K. T. Neumann, Technical University of Darmstadt, Darmstadt, Germany H. Nowacki, Technical University of Berlin, Berlin, Germany A. Requicha, University of Rochester, N.Y., USA T. Sancha, Cambridge Interactive Systems, Cambridge, U.K. EoG. Schlechtendahl, Kernforschungszentrum, Karlsruhe, Germany M.A. Wesley, IBM Watson Research Center, Yorktown Heights, USA

TOPICS include Scope and purpose of CAD CAD system architecture Design of CAD systems Design optimisation in CAD Aspects of CAD methodology The resource aspect in CAD systems Graphics for presentation of data

Geometric modelling 3 D-Graphics Surface generation and f a i r i n g Data base design for CAD Case studies Ergonomics Economics

FOR INFORMATION WRITE INSTITUT FOR INFORMATIONSVERWALTUNGUND INTERAKTIVE SYSTEME FACHGEBIET GRAPHISCH-INTERAKTIVE SYSTEME TECHNISCHE HOCHSCHULEDARMSTADT - CREST ADVANCEDCOURSEON CAD- Congress Office Steubenplatz 12 - I I I ,

D-6100 Darmstadt, Germany

Phone (area code 06151) 16-3478

174

computer-aided design