我正在尝试在MATLAB平面外生成一些通用3d框型形状。我对线性代数的知识有限,因此我一直遵循这种http://www.matrixlab-examples.com/3d-polygon.html简单方法通过指定平面的4个点并使用fill3来生成构成形状的平面。
但是,我以后需要使用geom3d函数来计算从空间内的点到每个平面的距离。 Geom3d函数要求平面必须采用以下引用的格式,而不是fill3的handle变量。
% The created plane data has the following format:
% PLANE = [X0 Y0 Z0 DX1 DY1 DZ1 DX2 DY2 DZ2], with
% - (X0, Y0, Z0) is a point belonging to the plane
% - (DX1, DY1, DZ1) is a first direction vector
% - (DX2, DY2, DZ2) is a second direction vector
% The 2 direction vectors are normalized and orthogonal.
% The created plane data has the following format:
% PLANE = [X0 Y0 Z0 DX1 DY1 DZ1 DX2 DY2 DZ2], with
% - (X0, Y0, Z0) is a point belonging to the plane
% - (DX1, DY1, DZ1) is a first direction vector
% - (DX2, DY2, DZ2) is a second direction vector
% The 2 direction vectors are normalized and orthogonal.
有人知道我如何将平面的变量从fill3生成或转换为该格式吗?