Re: Quadratic Splines ============================================================================== Hi, I find it strange that you can find a lot about Cubic Splines on the Web, while (almost) nothing can be found about Quadratic Splines. A cubic spline in 2-D can be defined by: z(t) = (1-t)^3.z_0 + 3.t.(1-t)^2.z_1 + 3.t^2.(1-t).z_3 + t^3.z_4 Quite analogously, I could write for a quadratic spline: z(t) = (1-t)^2.z_0 + 2.t.(1-t).z_1 + t^2.z_3 Why is it that I can find anything about the former, but not about the latter ? =============================================================================== Han de Bruijn wrote: > Hi, > > I find it strange that you can find a lot about Cubic Splines on the Web, > while (almost) nothing can be found about Quadratic Splines. > > A cubic spline in 2-D can be defined by: > > z(t) = (1-t)^3.z_0 + 3.t.(1-t)^2.z_1 + 3.t^2.(1-t).z_3 + t^3.z_4 > > Quite analogously, I could write for a quadratic spline: > > z(t) = (1-t)^2.z_0 + 2.t.(1-t).z_1 + t^2.z_3 > > Why is it that I can find anything about the former, but not about the > latter ? I don't know why you've written them the way you have. Write the cubic as a_0 + a_1 t + a_2 t^2 + a_3 t^3. You have 4 parameters to work with. If you just want to match values at the endpoints, you need two parameters (linear interpolation). If you also want to match derivatives, you need two more parameters (cubic splines). Quadratic splines only give you three parameters, which doesn't allow you to match derivatives at both ends. Jon Miller =============================================================================== Han de Bruijn wrote: > > Hi, > > I find it strange that you can find a lot about Cubic Splines on the Web, > while (almost) nothing can be found about Quadratic Splines. > > A cubic spline in 2-D can be defined by: > > z(t) = (1-t)^3.z_0 + 3.t.(1-t)^2.z_1 + 3.t^2.(1-t).z_3 + t^3.z_4 > > Quite analogously, I could write for a quadratic spline: > > z(t) = (1-t)^2.z_0 + 2.t.(1-t).z_1 + t^2.z_3 > > Why is it that I can find anything about the former, > but not about the latter ? Because cubics are more useful. They give a more natural appearing curve. Quadratics have too few degrees of freedom and the functional form constrains them to do things not implied by the data. Most importantly, they can't have an inflection point between two data points. - Randy ================================================================================ Han de Bruijn wrote: > > Hi, > > I find it strange that you can find a lot about Cubic Splines on the Web, > while (almost) nothing can be found about Quadratic Splines. > > A cubic spline in 2-D can be defined by: > > z(t) = (1-t)^3.z_0 + 3.t.(1-t)^2.z_1 + 3.t^2.(1-t).z_3 + t^3.z_4 > > Quite analogously, I could write for a quadratic spline: > > z(t) = (1-t)^2.z_0 + 2.t.(1-t).z_1 + t^2.z_3 > > Why is it that I can find anything about the former, > but not about the latter ? I have always thought it was for the following reason. You match up the end-points, and also the 1st derivatives at the interior points. See how many equations, and how many unknowns, and you are left with one more equation to come up with. Where will that come from? With cubic splines, you have need of two new equations. Since there are two ends of the data points, that is a natural place to look. For this reason, it would make sense to me to use polynomials of odd degree when doing splines. -- Stephen Montgomery-Smith stephen@math.missouri.edu http://www.math.missouri.edu/~stephen ===============================================================================