[comp.graphics] NURBS, interpolating them with lower degree NURBS

tim@nwnexus.WA.COM (Tim Anderson) (11/17/89)

I, ever humbled, ask the net another set of questions...

I want to turn big ugly NURB's (with degree <= 20) into lots of nice
quick-to-draw peicewise cubic rational Bezier's. (What I *really* want
is to be able to display and compute tangents and normals at blinding
speed and the easiest way is to convert it all to rational cubic Bezier's
then hard code various transforms, no? I have been using Mssr Lee's zippy
method of computing points and tangents, but the amount of information that
I have to have to use it tends to slow things down. Yes, I am working in
the REAL world with finite memory and slow hard drives.).

First you bang Oslo's algo over them till they look like Bezier's. Now we
have lots of monsterous degree Bezier's around. Do I just cut those into
little sections and then do a bunch of curve fitting with cubic Bezier's?
Seems like there would be a 'better' way of doing this than that...

I was thinking of maybe cutting them up, then doing a degree reduction on 
each section till the answer falls out. This is a bit more accurate? but 
incredibly time consuming (no doubt). Any hints for this poor old soul 
wandering aimlessly in NURBS land? I have every book I could possibly find
and a few billion articles from CAD, CAGD, CG&IP, etc, etc... so if one of
you person's of infinite wisdom could point me in the correct direction, I 
would personally worship you as a diety.

Thanx!
tim@nwnexus.wa.com

PS: If you are selling a NURBS package, please DO NOT foist a bunch of sales
stuff onto me. Not only can I NOT afford it, I do not want it! (with all due
respect to those nice folks in UTAH).
 

bdd@calmasd.Prime.COM (Brian Donahue) (11/18/89)

In article <206@nwnexus.WA.COM> tim@nwnexus.UUCP (Tim Anderson) writes:

>I want to turn big ugly NURB's (with degree <= 20) into lots of nice
>quick-to-draw peicewise cubic rational Bezier's. (What I *really* want
>is to be able to display and compute tangents and normals at blinding
>speed [...]
>
> Do I just cut those into
>little sections and then do a bunch of curve fitting with cubic Bezier's?
>Seems like there would be a 'better' way of doing this than that...

You can do "degree-reduction" without doing a (time-consuming) interpolation
step if you use Hermite approximation.  See:  "Numerical Analysis", 
Burden, Faires & Reynolds. 2nd edi. pg. 101.  The basic idea is :
the error bound on the Hermite polynomial as it approximates a continuous
(C1) curve on [A,B] is given and depends on the maximum magnitude of
the (2n + 2)'th derivative of the curve (where the Hermite polynomial
is of degree 2n + 1).  (Eg. if n = 1 for your resulting cubics, the 
error bound is determined by the max magnitude of the 4th derivative
of the original somewhere on [A,B]).  This lets you calculate a "step-size"
so that you can sample your original curve (position and 1st derivative)
and do some cubic hermite interpolation.  The "hard" / time
consuming part may be estimating/calculating the max magnitude of 
the 4th derivative....


I have implemented this algo here, and its performance is not too bad
if your error bound is "reasonable".

bd

-- 
Brian Donahue	   	Calma San Diego R&D
...{ucbvax|decvax}!sdcsvax!calmasd!bdd        bdd@calmasd.Prime.COM