[Metalab] approximating arbitary shapes with segments
Herbert Poetzl
herbert at 13thfloor.at
Mon Nov 3 18:23:40 CET 2014
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 algorithm
Rectangles, Polygones: nothing to do.
If those objects exist as a function, you can simply
evaluate those functions for n/N, i.e. f(n/N) and
connect the resulting N+1 points with lines.
Best,
Herbert
> greets,
> amir
> _______________________________________________
> Metalab mailing list
> Metalab at lists.metalab.at
> https://lists.metalab.at/mailman/listinfo/metalab
More information about the Metalab
mailing list