?? simil.m
字號:
function xx=simil(x,ds,rx,ry,rz,t)% SIMIL Computes similarity coordinate transformation.% Transforms a single point for a left-handed coordinate% system using the model% x'=sRx+t% where% x = coordinate vector to transform from% x' = coordinate vector to transform to% s = scale = 1+ds, ds=scale change% R = total rotation matrix (RxRyRz)% t = translation vector% Non-vectorized for multiple stations.% Version: 5 Nov 98% Useage: xx=simil(x,ds,rx,ry,rz,t)% Input: x - coordinate vector to transform% ds - scale change (unitless)% rx - rotation about x axis (rad)% ry - rotation about y axis (rad)% rz - rotation about z axis (rad)% t - translation vector% Output: xx - transformed coordinate vectorcrx=cos(rx);srx=sin(rx);Rx=[1 0 0; 0 crx -srx; 0 srx crx];cry=cos(ry);sry=sin(ry);Ry=[cry 0 sry; 0 1 0; -sry 0 cry];crz=cos(rz);srz=sin(rz);Rz=[crz -srz 0; srz crz 0; 0 0 1];R=Rx*Ry*Rz;xx=(1+ds)*R*x+t;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -