|
|
|
|
|
by andrewnc
1597 days ago
|
|
So, let's say I want to implement these (or other) curves into a drawing program. How do I go about doing that? I mean to say, I want to implement a brush on canvas type interface - how do Bézier curves fit into that? Do I collect points when mouse is down and build a curve with those points?
Do I get some other path information and rasterize? I'm trying to write my own drawing program (for fun) but given my lack of background in this I feel myself floundering. |
|
The B-spline is just a math name for a connected sequence of curve segments, setup so that the segments join nicely and so that there is a continuous “parameter” along the entire curve.
For a sketch interface, I personally prefer the quadratic B-spline to the cubic (but you can use any degree you want). The background for curves in general isn’t easy to pick up and understand quickly, but you might check out the “Chaikin” subdivision which is super simple math and equivalent to a quadratic curve.