From: David Wilkinson Newsgroups: sci.math.num-analysis Subject: Re: parametric curve and second derivative Date: Tue, 27 Oct 1998 08:25:50 +0000 In article <3634eaf0.40635176@news.snafu.de>, Horst Kraemer writes >On Mon, 26 Oct 1998 19:21:50 -0000, "Marco Accame" >wrote: > > >> my goal is to build a tool in visual c++ that allows the user to approximate >> a function using >> some bezier curves. i computed the condition of continuity in 0-th, 1-st and >> 2-nd derivative >> in the junction points to find the control points of the curve. i used the >> parametric representation >> of the curve. >> but now, i need to sample y(x) for uniform intervals of x: > >> Y_i = y(x_i), with x_i = n*X (n=0, 1, 2, ... and X is the >> sampling interval) > >> and i cannot use a uniform sampling of t because it does not give the x_i - >> x_{i-1} = X for every i, >> as i like to have. > > > >Maybe you made things more complicated than necessary. > >If your purpose is to generate function graphs only, there is >basically no need to use a parametrization x(t),y(t). A >parametrization y(x), where x _is_ the (translated and scaled) >parameter would be everything you need. You would generate >1-dimensional BEZIER-curves, i.e. regular polynomials and that's it. > > The whole point of parametric Bezier curves is that they avoid the main problem with polynomials for yacht sections. This is that the section curve often has dy/dx = 0 on the bottom centre line (rocker line) and dy/dx = oo at or near the gunwhales (Side to deck junction). This means they cannot be fitted accurately by any polynomial of the form y(x). The parametric form always works as dy/dt and dx/dt and higher derivatives are always finite. -- David Wilkinson ============================================================================== From: ken@straton.demon.co.uk (Ken Starks) Newsgroups: sci.math Subject: Re: Spline, Cubic or otherwise curvefitting points. Date: Thu, 29 Oct 1998 22:51:50 GMT "John Willoughby" wrote: > What other types of "curve fitting" could I use? Bezier? (what ever the > hell that is) And where can I find these algorithms or mathematical > descriptions? Yes, Bezier is worth learning about. They have the same equations in 3D as 2D or any other D, if you use vectors. They don't depend on 'y is a function of x'. x any y are completely equivalent, as are any other directions you choose. They are easy to calculate on a computer. They were invented by Pierre Bezier to computerise the shapes of car bonnets. Find out more by reading the FAQ of comp.graphics.algorithms Lots of book refs, and quite a few Web refs.