小编Бог*_*пир的帖子

线段和三角形之间的 3d 交集

网络上的一切都太复杂了。

所以,我有一个由三个点的数组定义的三角形,和由两个点定义的线段。点 = 3 个浮点数。我想知道它们是否相交。交叉点也会有帮助,但没有那么多。

我有这样的事情: 用搅拌机 2.78 制作

每个案例有 5 个坐标(15 个浮点数)。我只需要 python 代码或数学公式,希望能提供一些入门信息。

请,关于 python:以这样的方式开始代码:

plane = [[float(input('plane coord1 x:'), float(input('plane coord1 y:'), float(input('plane coord1 z:')], [float(input('plane coord2 x:'), float(input('plane coord2 y:'), float(input('plane coord2 z:')], [float(input('plane coord3 x:'), float(input('plane coord3 y:'), float(input('plane coord3 z:')]]
line = [[float(input('line coord1 x:'), float(input('line coord1 y:'), float(input('line coord1 z:')], [float(input('line coord2 x:'), float(input('line coord2 y:'), float(input('line coord2 z:')]]
Run Code Online (Sandbox Code Playgroud)

或这个:

plane = [[x1,y1,z1], [x2,y2,z2], [x3,y3,z3]]
line = [[X1,Y1,Z1], [X2,Y2,Z2]]
Run Code Online (Sandbox Code Playgroud)

python 3d polygon line segment

2
推荐指数
1
解决办法
2280
查看次数

标签 统计

3d ×1

line ×1

polygon ×1

python ×1

segment ×1