• Quadratic Curves - I can't learn what I need
    3 replies, posted
Hey guys, borrowed a couple books from the library on Trig/Calc and I am still unsure how to do what I need/if it is possible. [IMG]http://i73.photobucket.com/albums/i230/wutanggrenade/quadraticcurve.jpg[/IMG] Let's say we know x1,y1 and x2,y2 and the control point. Now How would I be able to figure out what x is where y lays, and vice versa, where y is where x lays. example : x1,y1 = 0,0 x2,y2 = 10,10 control point = 7,7 How would I figure out what y is at 2,3,4 and so on? I'm only asking cause I have not seen this explained
[url]http://en.wikipedia.org/wiki/Bézier_curve[/url] Quadratic Bézier curves A quadratic Bézier curve is the path traced by the function B(t), given points P0, P1, and P2, [IMG]http://upload.wikimedia.org/math/2/d/5/2d5e5d58562d8ec2c35f16df98d2b974.png[/IMG] [IMG]http://upload.wikimedia.org/wikipedia/commons/2/2d/Bezier_2_big.gif[/IMG] Basically t is the progress ranging from 0 to 1 and you apply the formula to the x and y components of your points seperately.
funny I didn't pick that up on wiki, but it helped once pointed out Thanks man
I thought you'd like to see this article, which shows a nice way of using shaders to draw curves: [url]http://www.mdk.org.pl/2007/10/27/curvy-blues[/url]
Sorry, you need to Log In to post a reply to this thread.