Parametric Geometry

{ParaGeo}

This subject matter was driven by 100k+ line, geometric-modeling program written in support of an advanced imaging project. In the course of generating the code I needed to master several aspects of the material touched upon below. Not all of the code written would be in direct support of these topics but there is more than enough to motivate any textbook based on these notes.

Computational Geometric Modeling with an Emphasis on Rational Parametric Equations

Parametric Projective Differential Geometry for:

two standard texts:

Faux, I.D., and M. J. Pratt. “Computational Geometry for Design and Manufacture.” Halsted, Chichester, England, 1980. [CompGeo]
Mortenson, M. E. “Geometric Modeling.” John Wiley & Sons, New York, 1985. [GeoMod]

While CompGeo at least included some material on rational parametric curves and surfaces {see section 5.2 p138} I found that the text as a whole was somewhat disorganized and not computational enough {see below}.

GeoMod, on the other hand, is reasonably well organized but lacks in other areas; for instance, rational parametric curves received a three page treatment {147 – 149}. The suggestion on the bottom of page 148:

“With appropriate account taken of the extra homogeneous coordinate, the rational parametric cubic formulation can be developed in the same way as the ordinary pc {parametric cubic} form was in earlier sections of this chapter.”

I found to be unhelpful and irritating. Further, Mortenson does not always follow his own advice. On page 25 of GeoMod:

“Transformations (for example, translation and rotation) can be performed directly on parametric equations.”

which is true but but unless further developed tremendously frustrating. Further, on page 369 he suggests that curves and surfaces be “convert{ed} to their four-point, or 16-point, or 64-point forms” before applying homogeneous transforms to them – a pointless exercise as we will see below.

Section 5.2.1 of CompGeo {pp 138 ff} is the only reference that had a reasonably accessible account of rational quadrics {and cubics} but they did not present a clear path to the parametric quadric algebraic form. It was not until I realized that they were developing it as a three-point {rational} bezier with the pencil supplying the three points and with the tangent line providing the additional weights needed for the rational extension that I was able to derive the parametric equations. Further, there is an extremely simple and useful relationship between the values for the tangent line and the three weights that was never mentioned:

    w0 = alpha, w2 = beta, w1 = sqrt( (1 - alpha) * (1 - beta) )

that I found simply by inspecting their own derivation. Using that and:

  alpha := (sqrt[2] - 1) * sqrt[2 ];
  beta  := alpha  ;

  and since beta = alpha
  w0 = w2 = alpha, w1 = 1 - alpha
  px[0] :=  0.00  ;  px[1] :=  1.00  ;  px[2] :=  1.00  ;
  py[0] :=  1.00  ;  py[1] :=  1.00  ;  py[2] :=  0.00  ;
  pz[0] :=  0.00  ;  pz[1] :=  0.00  ;  pz[2] :=  0.00  ;

produces one quadrant of the unit circle, which is the sort of useful result that I found lacking in both texts.

The matrix below is the general homogeneous transform matrix which can be the result of any number of rotations, scalings, translations, and projections. To transform a rational bicubic surface by such a matrix it is sufficient to perform the following:

 hP*(uw) = hP(uw) * Th,

 with
         __         __
         | a b c | p |
         | d e f | q |
   Th =  | g i j | r |
         |-----------|
         | l m n | h0|
         --         --


 hP(uw) = [ hx(uw) hy(uw) hz(uw) h(uw) ]

 hP*(uw) = [ hx*(uw) hy*(uw) hz*(uw) h*(uw) ]

  hx*(uw) = a.hx(uw) + d.hy(uw) + g.hz(uw) + l.h(uw)
  hy*(uw) = b.hx(uw) + e.hy(uw) + i.hz(uw) + m.h(uw)
  hz*(uw) = c.hx(uw) + f.hy(uw) + j.hz(uw) + n.h(uw)
   h*(uw) = p.hx(uw) + q.hy(uw) + r.hz(uw) + h0.h(uw)

 and where dot {.} is simply a scalar multiply and

 x*(uw) = hx*(uw) / h*(uw)
 y*(uw) = hy*(uw) / h*(uw)
 z*(uw) = hz*(uw) / h*(uw)

organization:

If ParaGeo is to be primarily a reference work then it might be best to start off with a summary of the more important / useful results even including the ones given above. Fairly early on I would like to introduce a generalization of the methods and results given in “Surfaces Defined by Curve Transformations” {qv}.

The more basic topics such as projective geometry, homogeneous transformations and differential geometry might be treated thoroughly in appendices to which the reader would be frequently referred.

Other major topics would include rational b-spline and bezier curves surfaces and solids.

Another topic worth looking at might be objects defined in time as well as in space where a ‘time’ solid might be seen as the product of a time line and a solid

 hP(tuvw) = [hx(t) hy(t) hz(t) h(t)] oper [hx(uvw) hy(uvw) hz(uvw) h(uvw)]

“snapshots” would be generated by setting t to a constant value.

The six surfaces of the transformed unit cube at that moment would be generated by setting each of the uvw to [0|1] in turn while the other two are allowed to vary [0..1].