pouët.net

Go to bottom

angle curves- new kind of mathematical curves I made

category: code [glöplog]
well yeah, some of this old methods are about pixel-perfect rasterization (also with AA), but I got the point that you just want to draw lines, which makes more sense today (also if you think about 3d splines).

Maybe it's good idea to split cubic spline (degree 3, max. cusps = 2) into say 5 segments (based on curvature or inflection points that can be easily calculated, the trick is to make the "cut" around the cusp with a "parametric distance" proportional to curvature) and then for every segment use fixed subdivision with "k" steps, so in total you would have 5k steps and very fast drawing routine. Maybe it's already somewhere in those forums/papers/libraries or it's just not so good idea in practice. But still, since I've never tried that approach before, I am actually willing to investigate it more over the weekend.
added on the 2015-05-15 15:07:50 by tomkh tomkh
erratum: technically cusp is a discontinuity in second derivative, but what I meant by "cusp" is more like a sharp turn
added on the 2015-05-15 15:19:37 by tomkh tomkh
damn it, this forum really needs post-correction mechanism
added on the 2015-05-15 15:22:44 by tomkh tomkh

login

Go to top