如何找到两条三次贝塞尔曲线之间的交点 [英] How to find intersection points between two cubic bezier curve

查看:516
本文介绍了如何找到两条三次贝塞尔曲线之间的交点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两条三次贝塞尔曲线,

I have two cubic bezier curve,

曲线1:-:第一锚点(a1x,a1y),第一控制点(c1x,c1y),第二控制点(c2x,c2y),第二锚点(a2x ,a2y)

curve 1:- 1st anchor-point(a1x,a1y), 1st control-point(c1x,c1y), 2nd control-point(c2x,c2y), 2nd anchor-point(a2x,a2y)

曲线2:-:第一锚点(a3x,a3y),第一控制点(c2x,c3y),第二控制点(c4x,c4y),第二锚点(a4x ,a4y)

curve 2:- 1st anchor-point(a3x,a3y), 1st control-point(c2x,c3y), 2nd control-point(c4x,c4y), 2nd anchor-point(a4x,a4y)

现在,我想找到这两条贝塞尔曲线之间的交点;

Now I want to find the intersection points between these two bezier curve;

该怎么做? 任何带有算法的参考文件都会对我有所帮助;

How to do it? Any reference document with algorithm will help me;

推荐答案

找到Bezier曲线交点的主要方法有两种:

There are two main methods to find a Bezier curve intersection:

  1. 递归细分利用Bezier曲线的凸包属性,通常检查其曲线段的边界框的交集.

  • 两个三次方程组的数值解.它导致9阶多项式方程,并且可能具有9个实根(两个S形曲线的情况).注意,该解在数值上是不稳定的.
  • JS代码几何工具 WildMagic库中.

    JS code and interactive demonstration And I think C++ code might be in Geometric Tools WildMagic library.

    这篇关于如何找到两条三次贝塞尔曲线之间的交点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆