banner



How To Draw Polyline In Illustrator

I'chiliad working on an awarding that records strokes, which yous paint with a pointing device.

enter image description here

In the epitome above, I've fatigued a single stroke, which contains 453 information points. My goal would be to drastically reduce the amount of information points while still maintaining the shape of the original stroke.

For those interested, the coordinates for the stroke pictured to a higher place are available as a gist on GitHub.

Equally a matter of fact, Adobe Illustrator has a corking implementation of what I'chiliad trying to attain. If I depict a similar stroke (with a calligraphic castor) in Illustrator, the resulting shape volition exist simplified to what nosotros see beneath. While cartoon the stroke, it will look very similar to the one in my application. In one case I release the mouse button, the curve will exist simplified to what we meet hither:

enter image description here

As we tin run into, the stroke only has xiv data points. Though there are boosted control points which define the inclination of the bezier spline (or whatever spline it is they're using). Here we tin see a few of those control points:

enter image description here

I have looked at algorithms like Ramer–Douglas–Peucker algorithm, just those seem to but remove points from the input set. If I'thou not mistaken, the approach I'yard looking for would as well have to introduce new points into the gear up to attain the desired curve.

I have come across questions similar iPhone smooth sketch drawing algorithm which seem related. But those seem to focus on creating a smooth curve from a minor set of input points. I feel like I have the opposite example.

Source: https://stackoverflow.com/questions/17425763/how-does-polyline-simplification-in-adobe-illustrator-work

Posted by: washingtondishemeard.blogspot.com

0 Response to "How To Draw Polyline In Illustrator"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel