SCI Seg3D Mailing List

Text archives Help


[Seg3D] Re: Re: computing the spline in the Spline Tool


Chronological Thread 
  • From: Ramón Casero Cañas <ramon.casero@comlab.ox.ac.uk>
  • To: "seg3d@sci.utah.edu" <seg3d@sci.utah.edu>
  • Cc: "brooks@ece.neu.edu" <brooks@ece.neu.edu>
  • Subject: [Seg3D] Re: Re: computing the spline in the Spline Tool
  • Date: Thu, 10 Dec 2009 16:57:08 +0000

Dana Brooks wrote:
Ramón, hi,

first, to be clear, using interp1 with the 'cubic' input is not a spline, it's a Hermite interpolation with a particular condition that Mathworks seems to like. I think you know that but just want to be sure it is clear.


Hi Dana,

Thanks for the clarification, although from the documentation, it seems
that 'cubic' means using piecewise cubic Hermite polynomials [1], and I
think the whole curve is usually called a 'cubic Hermite spline' [2].


second, I believe that you are correct that the end conditions are different. Combing through Matlab help and looking at the interp1 code, it seems that interp1 uses a non-a-knot end condition while cscvn uses the natural (or periodic) end condition. I would guess that it should not be too hard to modify our spline code so that it can handle both types of end conditions, but that's easy for me to say ....

Yes, I think you are right.

Maybe it would be convenient to eventually have a small library with
functions that provide the different end conditions, interpolants, etc.?

For the moment, I think we can be very happy with something that works
and is consistent with other implementations :)  Even if the Spline Tool
is implemented with the cscvn() spline, it will be very easy to add an
option to the interface to choose between cscvn() and interp1() behaviour.

[1] http://www.mathworks.com/access/helpdesk/help/techdoc/ref/interp1.html
[2] http://en.wikipedia.org/wiki/Cubic_Hermite_spline

R.

--
Dr. Ramón Casero Cañas

Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 610807
web     http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos  http://www.flickr.com/photos/rcasero/




Archive powered by MHonArc 2.6.16.

Top of page