pouët.net

Go to bottom

So what's everyone's favourite resources for Bezier curves?

category: code [glöplog]
 
Hi,
I've been studying my Foley and van Dam, and also scouring the web (found a tut on NeHe, but it was OpenGL code), but at the moment it's just going over my head, mainly cause I can't follow the math.
Can anyone suggest any BEGINNER's webpages for curved surfaces?
Thanks.
There's some pretty good animations on Wikipedia. Surfaces are just two curves that make up a patch.
added on the 2011-08-17 09:31:05 by Preacher Preacher
Not exactly about Bezier curves, but a very good place to start :
http://sol.gfxile.net/interpolation/index.html
added on the 2011-08-17 09:42:22 by flure flure
I should update the article, adding beziers and stuff. Was thinking of doing that at some point but got distracted.
added on the 2011-08-17 11:30:44 by sol_hsa sol_hsa
Not that I'd actually explain what's going on, as the article is more about practical uses of stuff than trying to understand the workings of things..
added on the 2011-08-17 11:31:23 by sol_hsa sol_hsa
Curves in and around Beziers:
BB Image
BB Image
BB Image
BB Image
added on the 2011-08-17 11:35:27 by w00t! w00t!
What a fucking great way to post shit on a serious post and make it unreadable. Well done, here's your cookie.

To bitnaughty: this is a great resource as well and contains a lot of java things to play around with.
added on the 2011-08-17 11:45:09 by Preacher Preacher
successful pouetization was successful.
added on the 2011-08-17 11:55:35 by nystep nystep
anyway, mathworld also has a pretty good page on it. here.
added on the 2011-08-17 11:57:17 by nystep nystep
@Preacher: thanks for the very interseting link!
I also commited some articles about quadratic splines (curves, not surfaces):
http://abrobecker.free.fr/text/quadsplines.pdf
http://abrobecker.free.fr/text/quad.htm
added on the 2011-08-17 14:04:46 by baah baah
isnt bezier curves just derivations of tangents? i did those a many years ago. but i dont think i knew much what i was doing. if you wanna do curved surfaces (actually understand them) you won't get around it without knowing some bunch of math.
added on the 2011-08-17 14:41:39 by rudi rudi
I used De Casteljau algorithm (recursive subdivision, you can stop at any point when you have enough precision) in the past to create my Bezier curves:
http://www.cubic.org/docs/bezier.htm
added on the 2011-08-17 16:02:16 by pmdata pmdata
Thanks so much you guys :) I was expecting a little to get sworn at for wanting a little hand holding, but that didn't happen :) pmdata, your link was especially simple.

Preacher, there I was just following your Assembly seminar last week, and here you are talking to me :) I enjoyed your talk. However, I'm ashamed to admit that I can't follow the equations on your page - does the dot mean the dot product, for example in the first equation:
x(t)=1 dot (1-t) square.... etc.?
@bitnaughty: the dot is another way of writing the standard multiplication.
(And why would people swear at you??? But what rudi says makes sense...)
added on the 2011-08-17 17:23:42 by baah baah
This calculates a Catmull-Rom spline using forward differencing (Evaldraw code). I had planned to make it adaptive to curvature based on this, but couldn't wrap my head around math/code.
Code: cmr_forward(p0x, p1x, p2x, p3x, p0y, p1y, p2y, p3y, steps) { ax = p3x - 3 * p2x + 3 * p1x - p0x; ay = p3y - 3 * p2y + 3 * p1y - p0y; bx = 2 * p0x - 5 * p1x + 4 * p2x - p3x; by = 2 * p0y - 5 * p1y + 4 * p2y - p3y; stepsize = 1.0/steps; stepsize2 = stepsize * stepsize; stepsize3 = stepsize * stepsize2; px = p1x; py = p1y; dx = (stepsize3*0.5)* ax + (stepsize2*0.5)*bx + (stepsize*0.5)*(p2x - p0x); dy = (stepsize3*0.5)* ay + (stepsize2*0.5)*by + (stepsize*0.5)*(p2y - p0y); d2x = (stepsize3*3) * ax + stepsize2 * bx; d2y = (stepsize3*3) * ay + stepsize2 * by; d3x = (stepsize3*3) * ax; d3y = (stepsize3*3) * ay; moveto(p1x, p1y); setcol(255, 255, 0); for (i = 0; i < steps; i++) { px += dx; dx += d2x; d2x += d3x; py += dy; dy += d2y; d2y += d3y; lineto(px, py); } }
added on the 2011-08-17 17:57:01 by raer raer
it think should be pretty easy to understand if you start with simple derivations of parametric curves and shit like that. :)
added on the 2011-08-17 19:42:21 by rudi rudi
http://www.cs.dartmouth.edu/~fabio/teaching/graphics08/lectures/08_ParametricCurves_Web.pdf

Holds your basic runthrough of different variants.

Otherwise I would recommend any book about numerical analysis (Should have a section on parametric curves and matlab examples).

And while your at it also maybe read something like "Elementary Linear Algebra with Supplemental Applications" - H. Anton, C. Rorres. For that beloved rotation, skewing etc...
added on the 2011-08-17 20:54:46 by wix wix
Quote:
What a fucking great way to post shit on a serious post and make it unreadable. Well done, here's your cookie.


Well, to be fair, I've learnt a lot more looking at Manon Ricci's curves than any old, boring maths site :)
added on the 2011-08-17 21:17:02 by Gmitts Gmitts
Just draw a few line segments and apply a low pass on them. Really simple to code and visualize.
added on the 2011-08-17 21:37:45 by xernobyl xernobyl
Then again, Preacher has a point, though :-)
added on the 2011-08-17 21:43:07 by w00t! w00t!

login

Go to top