April 26th, 2017, 01:08 PM  #1 
Member Joined: Nov 2016 From: Kansas Posts: 48 Thanks: 0  Bezier Curve
How to convert functions into bezier curves? I have a function f(x)=1/($4x^{2}$ +1) with knots from (1,1) with a 0.5 interval. How to convert it? Help! 
April 27th, 2017, 03:55 AM  #2 
Math Team Joined: Jan 2015 From: Alabama Posts: 2,520 Thanks: 641 
Bezier curves of what degree? Cubic Bezier curves are most common. Is that what you mean? Your knots are at x= 1, y= 1/5; x= 1/2, y= 1/2; x= 0, y= 1; x= 1/2, y= 1/2; and x= 1, y= 1/5. A cubic can be written as y= ax^3+ bx^2+ cx+ d, the first derivative is y'= 3ax^2+ 2bx+ c, and second derivative y''= 6ax+ 2b . For the first interval, from x= 1 to 1/2, you want y(1)= a+ b c+ d= 1/5 and y(1/2)= a/8+ b/4 c/2+ d= 1/2. Also, at x= 1/2, the derivatives must match so, taking the cubic over the interval from 1/2 to 0 to be y= ex^3+ fx^2+ gx+ h, so derivative y'= 3ex^2+ 2fx+ g, and second derivative 6ex+ 2f we must have 3a/4 b+ c= 3e/4 f/4+ g and 3a+ 2g= 3e+ 2f. We will have a cubic over each interval, with four coefficients to be determined over each of the four intervals, so 16 numbers to be determined. We have an equation for the value at the five knots, so 8 equations there, we have an equation connecting the derivatives at the three internal knots so 3 equations there, and we have an equation connecting the second derivatives at the three internal knots so 3 equations there. We have a total of 14 equations to determine 16 numbers. That is not enough we need two more conditions. Common are the "fixed ends" condition where we assume the derivative at the endpoints, or the "not a knot" condition where we use the same cubic over the first and second intervals and at the next to last and last intervals. Which convention are you expected to use? 
April 28th, 2017, 05:01 AM  #3 
Member Joined: Jan 2016 From: Athens, OH Posts: 45 Thanks: 26 
CountryBoy is describing a spline, not a Bezier curve. The usual terminology with Bezier curves is control points or guide points, not knots as in splines. The first graph is the natural cubic spline interpolating the given knots. The next graph shows two Bezier curves of degrees 4 and 128 for the given guide points. Aside, I'd never tried to graph a Bezier curve of such a high degree (12 and was mildly surprised by the result. 
April 29th, 2017, 04:34 AM  #4 
Math Team Joined: Jan 2015 From: Alabama Posts: 2,520 Thanks: 641 
Sorry, I have always gotten those confused! Thanks.


Tags 
bezier, curve 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Bezier Curve  ZMD  Linear Algebra  1  March 13th, 2017 09:01 AM 
Arc length of cubic bezier curve  ghafarimahsa  Number Theory  3  February 26th, 2014 12:00 PM 
draw a quad bezier having curve length  appollosputnik  Algebra  0  November 24th, 2013 10:00 PM 
Bezier Approximation  resurector  Applied Math  0  October 27th, 2009 07:38 AM 
Bezier curves  roadnottaken  Applied Math  2  August 15th, 2007 03:11 PM 