The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 B Spline does not fit data tightly enough
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

MrDavid

Posts

Posted - 11/21/2007 :  10:10:48 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin):
Operating System:

Hello,

I am trying to fit a curve to my data, and I have tried using the two 'spline' options. Ideally, I would like a smooth looking line, which accurately represents the data points but looks more attractive than straight line connectors.
Spline does not give me a smooth enough line, but B-Spline gives me a curve that misses some of the data points by quite a way. Is there any way of controlling how 'tightly' the curve fits the data points?

Thank you, David

stoelzer@p

Germany
5 Posts

Posted - 04/02/2008 :  06:03:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Did you find a solution for your problem? I'm really interested in that solution.

While looking through the programming help I found this:
Function: Curve_bspline
Prototype: int Curve_bspline(curvebase* pcrvData, curvebase* pcrvResults, double dSmoothness = BSPLN_AUTO, Dataset* pdsWeights = NULL)

Changing the parameter dSmoothness and recalculating the B-spline curve is probably what we want to do. But I don't know if and how that is possible without much programming.

Is there any expert who can answer this question?

Many thanks,
Mathias

Go to Top of Page

PeterKunhardt

USA
Posts

Posted - 04/11/2008 :  10:14:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The central difference between spline and b-spline is that with spline the curve is forced to fall exactly on every data point, but with b-spline the algorithm used to determine the curve allows the y-values at given x's to float. This is what allows the b-spline algorithm to appear so "smooth."

The Origin C command suggested above will draw a b-spline curve. If you were to set the parameter dSmoothness to "0" then you would get the effect you are looking for: drawing a b-spline curve that connects through every single data point. However, if you compare the result with a line and symbol plot with line type "spline," you will see the results are exactly the same.

You can also demonstrate this by running an interpolation of a symbol plot. You can choose b-spline as your method with a smoothness of 0 in the interpolation dialog, but you will see again that it produces the same result as interpolation with spline.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000