An algorithm to find bounding box of closed bezier curves?

后端 未结 7 870
半阙折子戏
半阙折子戏 2020-12-05 13:54

I\'m looking for an algorithm to find bounding box (max/min points) of a closed quadratic bezier curve in Cartesian axis:

input: C (a closed bezier curve)
out         


        
7条回答
  •  再見小時候
    2020-12-05 14:35

    I believe that the control points of a Bezier curve form a convex hull that encloses the curve. If you just want a axis-aligned bounding box, I think you need to find the min and max of each (x, y) for each control point of all the segments.

    I suppose that might not be a tight box. That is, the box might be slightly larger than it needs to be, but it's simple and fast to compute. I guess it depends on your requirements.

提交回复
热议问题