-1

我想计算正四面体的第四个顶点。我有坐标

{0, 0, Sqrt[2/3] - 1/(2 Sqrt[6])}, {-(1/(2 Sqrt[3])), -(1/2), -(1/(2 Sqrt[6]))} 和 {-(1/(2 Sqrt[3])), 1/2, -(1/(2 Sqrt[6]))}

有人可以帮忙吗?

4

1 回答 1

2

找到脸的中心

cx = (x1 + x2 + x3)/3 and similar for y,z

获取两个边向量

e2x = x2 - x1
e2y = y2 - y1
e2z = z2 - z1
e3x = x3 - x1
e3y = y3 - y1
e3z = z3 - z1

计算边距

elen = sqrt(e2x*e2x+e2y*e2y+e2z*e2z)

计算向量积以获得法线到这张脸

nx = e2y*e3z - e2z*e3y 
ny = e2z*e3x - e2x*e3z 
nz = e2x*e3y - e2y*e3x

使单位正常

nlen = sqrt(nx*nx+ny*ny+nz*nz)
nx = nx / nlen
...

制作所需长度的法线(四面体高度)

lnx = nx * sqrt(2/3) * elen
...

将此法线添加到面部中心

x4 = cx +/- lnx
y4 = cy +/- lny
z4 = cz +/- lnz

+/- 符号对应于第四个顶点的两个可能位置

于 2020-09-18T04:29:23.660 回答