【问题标题】:Triangulate set of points on arbitrary plane in 3D space对 3D 空间中任意平面上的点集进行三角剖分
【发布时间】:2017-12-16 18:44:37
【问题描述】:

我在 3D 空间中有一组点。最大误差为 10^-5,我可以通过它们放置一个平面(误差是从点到平面的距离)。

有没有办法在这个任意平面上对这些点进行三角测量?我已经尝试过 Bowyer-Watson 但这仅在错误为 0 时才有效。其他任何东西都不会三角剖分,或者我不会得到一个好的三角剖分(重叠三角形)。

编辑

我想我找到了问题所在。在某些角度,鲍耶沃森算法将不起作用,因为我对外心的计算是关闭的。如何计算 3D 三角形的外心?

【问题讨论】:

    标签: unity3d 3d triangulation


    【解决方案1】:

    因为我知道平面上的点,所以我可以计算一个向量。这个向量位于平面上。接下来我计算点的质心。

    使用向量和质心我可以在平面上创建一个大三角形

            Vertex p1 = new Vertex(dir * 3000 + center);
            Vertex p2 = new Vertex(Quaternion.AngleAxis(120, plane.normal) * dir * 3000 + center);
            Vertex p3 = new Vertex(Quaternion.AngleAxis(240, plane.normal) * dir * 3000 + center);
    

    现在我有了封闭三角形,我可以使用 Bowyer-Watson。 对于 3D 中的外接中心,我使用:

    Vector3 ac = p3 - p1;
        Vector3 ab = p2 - p1;
        Vector3 abXac = Vector3.Cross(ab, ac);
    
        circumceter = p1 + (Vector3.Cross(abXac, ab) * ac.sqrMagnitude + Vector3.Cross(ac, abXac) * ab.sqrMagnitude) / (2 * abXac.sqrMagnitude);
    

    现在我在 3D 中的任意平面上有一组三角点。

    【讨论】:

      猜你喜欢
      • 2016-09-12
      • 1970-01-01
      • 2013-10-04
      • 2015-06-30
      • 2017-05-23
      • 2012-09-06
      • 1970-01-01
      • 2014-08-18
      • 1970-01-01
      相关资源
      最近更新 更多