【发布时间】:2017-06-28 02:15:42
【问题描述】:
这个问题来自my last post,
但我只会专注于特定的部分,
如果我有一个 3d 矩阵 M,256*256*124,以及一个由与 3d 矩阵相交的 3 个点定义的平面,A,B,C,如何找到M中所有点到A,B,C定义的平面的距离
这是我得到的建议,
[X Y Z] = meshgrid(1:256,1:256,1:124)
A = [X(:)';Y(:)';Z(:)'];
n = cross([coor_A-coor_B],[coor_B-coor_C]); %The norm vector of the plane
d = norm(mean([coor_A,coor_B,coor_C]),2); %The distance from origin to the plane
L = ((n*A)-d); %The distance from all points in M to the plane
但是L中的所有值都很大,说明在相交平面上没有找到点。
谁能告诉我怎么了?
【问题讨论】:
-
“3d 矩阵中的点”是什么意思?点在空间中,矩阵只存储数字,在这种情况下它们如何关联?