artursapek / mondrian

Web-based vector graphics editor
MIT License
1.24k stars 104 forks source link

Better smoothing of crayon points. #15

Open Fishrock123 opened 10 years ago

Fishrock123 commented 10 years ago

This will take a while, but should be something to work towards.

mondrian is going to need a smoothing algorithm for crayon points.

jarek-foksa commented 10 years ago

I would use Schneider's path fitting algorithm:

Fishrock123 commented 10 years ago

:+1: to @jarek-foksa's suggestion.

artursapek commented 10 years ago

I'll take an hour one day to learn about Schneider's algorithm. Haven't heard of it before. That paperjs demo is amazing.

The crayon tool uses a simple algorithm I came up with. It only produces smooth lines when one draws quickly. I'd love to port a better algo to it.

wraybowling commented 10 years ago

I like the smoothed results of Schneider's, but it does not do corners well. — Sent from Mailbox for iPhone

On Sat, Jan 25, 2014 at 8:58 PM, Artur Sapek notifications@github.com wrote:

I'll take an hour one day to learn about Schneider's algorithm. Haven't heard of it before. That paperjs demo is amazing.

The crayon tool uses a simple algorithm I came up with. It only produces smooth lines when one draws quickly. I'd love to port a better algo to it.

Reply to this email directly or view it on GitHub: https://github.com/artursapek/mondrian/issues/15#issuecomment-33306728

Fishrock123 commented 10 years ago

@wraybowling Oh wow, you're right. (Try drawing boxes in the demo.)

I would be more inclined to go with something a tad slower and more precise, generally.