laserbeam.sci

来自「用来实现三维阻抗及光学断层成像重建的matlab程序」· SCI 代码 · 共 66 行

SCI
66
字号
function [sel]=laserbeam(vtx,srf,cnts)sel=[];// function [sel] = laserbeam(vtx,srf,cnts)// //Auxiliary ploting function// // // //vtx  = The vertices matrix//srf  = The boundary faces //cnts = The coordinates of the centers of the surfaces     //!! gca has no Scilab equivalent! //!! Scilab get function is a partial emulation of the Matlab onep = get(gca(),'CurrentPoint'); pp = p; pu = pp(1,:); dista = []; for j = 1:size(cnts,1)     x1 = pu(1);  y1 = pu(2);  z1 = pu(3);  x2 = cnts(j,1);  y2 = cnts(j,2);  z2 = cnts(j,3);     dd = db23d(x1,y1,z1,x2,y2,z2);     dista = [dista;dd];   end for k = 1:max(size(dista))        //! mtlb_min(dista) may be replaced by   //!   min(dista) if distais a vector  //!   min(dista,'r') if distais a matrix  if dista(k)==mtlb_min(dista) then         sel = k;    // the index of triangle in srf matrix       endend  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%// This is part of the EIDORS suite.// Copyright (c) N. Polydorides 2001// Copying permitted under terms of GNU GPL// See enclosed file gpl.html for details.// EIDORS 3D version 1.0// MATLAB version 5.3 R11//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

⌨️ 快捷键说明

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