⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trin2d.m

📁 细胞生长结构可视化工具箱-MATLAB Toolbox1999.zip
💻 M
字号:
function [n12d,n22d,n32d,b1,b2] = trin2d(n1,n2,n3)

% Find two orthogonal basis vectors for the plane containing the triangle
b1 = n2-n1;

% find projection of n3-n1 onto b1
proj = (dot(n3-n1,b1)/dot(b1,b1))*b1;
% subtract this from n3-n1 to find second basis function orthogonal to b1
b2 = (n3-n1)-proj;

% can now express pts in traingle in form n1 +xb1 +yb2 => 2-D coords
n12d = [0,0];
n22d = [(n2-n1)/b1,(n2-n1)/b2];
n32d = [(n3-n1)/b1,(n3-n1)/b2];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -