On Mon, Nov 03, 2014 at 05:33:39PM +0100, Amir Hassan wrote:> i'm looking for a method to approximate arbitrary vector> graphic shapes (circles, rects, bezier curves, etc.)> with line segments.
> does anybody know the proper search terms for an algorithm> doing that?
piece-wise linear approximation.
For most geometrical Objects this is rather simple to do:
Circle (or segment): just subdivide the Angle (n*2pi/N)Bezier curves: there is a subdivision algorithmRectangles, Polygones: nothing to do.
If those objects exist as a function, you can simplyevaluate those functions for n/N, i.e. f(n/N) andconnect the resulting N+1 points with lines.