Determining if a point is inside a polyhedron

前端 未结 3 1460
粉色の甜心
粉色の甜心 2021-02-10 02:03

I\'m attempting to determine if a specific point lies inside a polyhedron. In my current implementation, the method I\'m working on take the point we\'re looking for an array of

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-10 02:26

    It turns out that the problem was my reading of the algorithm referenced in the link above. I was reading:

    N = - dot product of (P0-Vi) and ni;
    

    as

    N = - dot product of S and ni;
    

    Having changed this, the code above now seems to work correctly. (I'm also updating the code in the question to reflect the correct solution).

提交回复
热议问题