[comp.sys.sgi] nurbs and bezier rendering

prevost@eos.UUCP (Michael Prevost) (01/12/90)

Can someone please give me some assistance with drawing 
parametric surfaces?  
I would like to alter a shaded parametric surface by changing a 
single control point for the surface. I need this affect to be be local, 
or at least not change the location of the end points. I can get the 
effect that I am looking for by using bezier curves ( GL patch 
command ) but I cannot seemed to render them as shaded surfaces, 
only lines. I haven't seen anything that says you cannot render them 
as shaded polygons but I've never seen an example of this either. 

I tried nurbs, which can be render as surfaces, but the end points 
drift as I change the control points and the curves doesn't have to 
pass through the any of the control points. The documentation says 
that the effect is local but also shows the end point moving. 

1) Is it possible to render bezier patches as shaded surfaces ?
2) Is it possible to restrict the end points of nurbs.

Thanks in advance

Mike Prevost 
Sterling Software 
NASA  AMES ms 239-19
Moffett Field Ca. 94035
prevost@eos.arc.nasa.gov

rhbartels@watcgl.waterloo.edu (Richard Bartels) (01/12/90)

In article <5966@eos.UUCP> prevost@eos.UUCP (Michael Prevost) writes:

>2) Is it possible to restrict the end points of nurbs.

If SGI really offers nurbs, then it allows you to specify the knot
structure of the nurb.  When you specify enough knots of equal value,
you get interpolation.  For example, a cubic Bezier segment is the same thing
as a cubic nurb segment with the nurb knots given as the sequence

	0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0

If a cubic nurb curve had the knots

	0.0, 0.0, 0.0, 0.0, 1.0, 2.0, 3.5, 4.2, 6.8, 7.7, 7.7, 7.7, 7.7

for example, it would interpolate its endpoints (i.e. interpolate its
first and last control vertex) while floating near its intermediate
points (control vertices).

The same thing works in the interior of the curve.  If the knot 3.5
were replicated to 3.5, 3.5, 3.5, 3.5, then the curve would interpolate
one of the interior control vertices.  (Actually, only three 3.5's are
needed to interpolate.  The extra one would allow the curve to be
"torn apart" at the corresponding parametric point).

This means that a composite Bezier curve can be regarded as a
nurb curve with knots equal to, e.g.

	0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, etc.
        etc. n-1, n-1, n-1, n, n, n, n

-Richard