[SciPy-dev] Fitpack, insert, and spline -> bezier conversion

Robert Kern robert.kern@gmail....
Tue Feb 6 21:06:46 CST 2007


Zachary Pincus wrote:
> Hello all,
> 
> I've been working with scipy.interpolate a lot lately (hence some of  
> the noise on this list; sorry) to write some code to convert cubic  
> parametric b-splines into bezier curves (for easy output to things  
> like postscript or SVG).
> 
> With the FITPACK 'insert' routine wrapped, this is relatively easy  
> once you figure out how, although there are a few gotchas. (Would  
> such a bit of code be useful in the scipy fitpack library?)

Yes, please!

> In the course of writing these conversion functions, I came upon some  
> subtle bugs in the original implementation of insert.f from netlib.  
> (They have to do with how the range into which the knot will be  
> inserted is chosen in corner cases that occur when converting  
> periodic splines to bezier curves.) I've tried contacting Dr.  
> Dierckx, but so far without luck.
> 
> What would be the best approach to making sure that at least scipy  
> gets correct versions? Should I contact the netlib people?

They're probably not in a position to accept updates from anyone but the authors
themselves, but you can try.

> Should I  
> send you guys my patch and further fork the codebase?

That seems like the best thing to do.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco


More information about the Scipy-dev mailing list