javascript - Drawing App - Curve Fitting -
i'm working on web-based drawing app, utilize position of pointer generate line. speed determines width of line.
my problem browser events not produce clean info when getting position, width becomes quite "jittery" other beingness soft , smooth.
i'm wondering best way smooth out sort of info drawing beingness made? thinking on curve fitting, i'm not sure algorithm work improve in case.
p.s. i'm not redrawing line start every single time on canvas, i'm adding "final part".
thanks!
you might seek pulling both "smooth" , "simplify" functions out of paper.js (their mit license allows this). worked me in border detection project. check out here: http://paperjs.org/tutorials/paths/smoothing-simplifying-flattening.
javascript canvas drawing curve-fitting
No comments:
Post a Comment