Approximate a curve with a limited number of line segments and arcs of circles

后端 未结 3 516
清酒与你
清酒与你 2020-12-18 09:29

Is there any algorithm that would allow to approximate a path on the x-y plane (i.e. an ordered suite of points defined by x and y) with a limited number of line segments an

3条回答
  •  盖世英雄少女心
    2020-12-18 09:56

    A typical constraint when approximating a given curve by some other curve is to bound the approximate curve to an epsilon-hose within the original curve (in terms if Minkowski sum with a disk of fixed radius epsilon).

    For G1- or C2-continuous approximation (which people from CNC/CAD like) with biarcs (and a straight-line segment could be seen as an arc with infinite radius) former colleagues of mine developed an algorithm that gives solutions like this [click to enlarge]:

    The above picture is taken from the project website: https://www.cosy.sbg.ac.at/~held/projects/apx/apx.html

    The algorithm is fast, that is, it runs in O(n log n) time and is based on the generalized Voronoi diagram. However, it does not give an approximation with the exact minimum number of elements. If you look for the theoretical optimum I would refer to a paper by Drysdale et al., Approximation of an Open Polygonal Curve with a Minimum Number of Circular Arcs and Biarcs, CGTA, 2008.

提交回复
热议问题