[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1372.0. "Bezier Curve fitting problem" by HGABSS::CLCHEUNG () Wed Jan 16 1991 00:34

Given Points P1,P2,P3,..., Pn ,  N points on X-Y plane,

How to find a cubic Beizer curve which passes through
P1 and Pn,  and best fit the above points ?

Thanks in advance.

-CL

T.RTitleUserPersonal
Name
DateLines
1372.1QuestionsCADSYS::COOPERTopher CooperWed Jan 16 1991 10:4315
    Off hand I don't have an answer, but before I even think about it there
    are some questions which need to be answered:

    1) What do you mean by "best fit"?  Least squares?  Anything visually
    satisfying?

    2) Are you sure you want a cubic Beizer curve for this?  A cubic Bezier
    is usually used to fill in between two adjacent points, with the
    control points used to make the Beizers fit together smoothly.  Best
    fit for a bunch of points is usually done with other kinds of
    interpolating spline curves.  (Yes, I realize that you may be stuck
    with some graphics package like postscript which only provides cubic
    Beizer -- I just need to confirm that you really need Beizers).

					Topher
1372.2ALLVAX::JROTHSaturday alley up to Sunday streetWed Jan 16 1991 11:1215
    You have quite a bit of freedom depending on what sort of fit
    you want.

    You can, in fact, fit a cubic interpolating spline to the points
    and with a change of basis, convert the pieces to a set of
    Bezier curve segments;  alternatively you can convert to
    a nununiform B-spline.   Even this cubic spline is arbitrary
    since the second derivative at the endpoints is arbitrary, as is
    the paramaterization along each curve segment, while keeping
    second order geometric continuity.

    If you want to make Bezier's that interpolate with C2 continuity,
    (for PostScript, say) I can supply you with a simple routine.

    - Jim
1372.3HGABSS::CLCHEUNGWed Jan 16 1991 20:5536
Re .1

Topher,

> What do you mean by "best fit"? 

I think Least Squares is ok.

> Are you sure you want a cubic Beizer curve for this? 

Yes, I am stuck with postscript, it is my only choice.

Actually , I want to describe the set of points by minimium 
number of Beizer curves, with a tolerant level provided
(least square).

Re .2

Jim,

I don't want multiply Beizer curves to describe the set of points,
because this set may be very large.

.0 is just part of the problem.  Actually, the next question I asked
is how to describe the outline of an arbitatry bitmap by line segments 
and beizer curves, with a tolerant level provided.

>If you want to make Bezier's that interpolate with C2 continuity,
>(for PostScript, say) I can supply you with a simple routine.

Can you explain what is "C2 continuity" ? I am definitely not an
expert in this field.

Thanks Jim and Topher.

-CL
1372.4Any idea ?HGABSS::CLCHEUNGMon Jan 21 1991 20:339
    Any ideas or suggestion ?
    
    Tell me even if you find this problem unsolvable.
    
    Anybody know "Artificial Specific Heat" method to solve this
    kind of problem ?
    
    -CL
    
1372.5Eye fitting methodSHIRE::ALAINDAlain Debecker @GEO DTN 821-4912Thu Jan 24 1991 05:5624
       I am not sure if I fully understand your question, but it seems 
       you have a problem, you have a solution and you are looking for
       a link between the two.
       
       The problem is that you have a given number of points to be laid 
       out with some kind of smooth fitting curve.
       
       The solution is that you can easily draw a certain type of curves, 
       namely Bezier cubic sections.
       
       Note that you may use a certain type equation to fit the curve, 
       and your plotting device may or may not use the same equation to 
       plot it.  It would matter only in the case the results are to be 
       used to some precise interpolation.  In that case I would not 
       recommend ANY solution -- especially cubic polynomials -- without 
       a better understanding of the problem.
       
       Therefore choose 3 points and let Postscipt do the rest.  It raises 
       the question of choosing the appropriate points?  Obviously a begin-
       ning, an end and something around the middle.  Again external infor-
       mation is needed.  The average is a good potential candidate for the 
       midpoint.  However good extremities are often subjective (a matter 
       of taste).  So let me advocate the devil, why not to use the old 
       robust eye-fitting method?	
1372.6problem solvedHGABSS::CLCHEUNGThu Jan 24 1991 21:2440
    
    
    
    
    
    
    
    
    
    
    Re .5
    
    >I am not sure if I fully understand your question, but it seems
    >you have a problem, you have a solution and you are looking for
    >a link between the two.
    
    You are fully understand my question.
    
    >Therefore choose 3 points and let Postscipt do the rest
    
    it is 4 points, not 3 points.
    
    > why not to use the old robust eye-fitting method?
    
    The problem is : 
    	1) I have a list of points, I want to fit the point with 
    	   minimum number of curves, with an acceptable results.
    	   eye-fitting is not a proper method.
    
    	2) I have too much data to be fitted.
    
    
    Actually, I have chosen statistical method to solve this problem,
    and the visual effect is quite good and correct.
    
    Thank you for your comments.
    
    -CL