Home > vbmeg > external > iso2mesh > sms.m

sms

PURPOSE ^

SYNOPSIS ^

function newnode=sms(node,face,iter,alpha,method)

DESCRIPTION ^

 newnode=sms(node,face,iter,useralpha,method)

 simplified version of surface mesh smoothing

 author: Qianqian Fang, <q.fang at neu.edu>
 date: 2009/10/21

 input:
    node:  node coordinates of a surface mesh
    face:  face element list of the surface mesh
    iter:  smoothing iteration number
    alpha: scaler, smoothing parameter, v(k+1)=alpha*v(k)+(1-alpha)*mean(neighbors)
    method: same as in smoothsurf, default is 'laplacianhc'

 output:
    newnode: output, the smoothed node coordinates

 -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function newnode=sms(node,face,iter,alpha,method)
0002 %
0003 % newnode=sms(node,face,iter,useralpha,method)
0004 %
0005 % simplified version of surface mesh smoothing
0006 %
0007 % author: Qianqian Fang, <q.fang at neu.edu>
0008 % date: 2009/10/21
0009 %
0010 % input:
0011 %    node:  node coordinates of a surface mesh
0012 %    face:  face element list of the surface mesh
0013 %    iter:  smoothing iteration number
0014 %    alpha: scaler, smoothing parameter, v(k+1)=alpha*v(k)+(1-alpha)*mean(neighbors)
0015 %    method: same as in smoothsurf, default is 'laplacianhc'
0016 %
0017 % output:
0018 %    newnode: output, the smoothed node coordinates
0019 %
0020 % -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)
0021 %
0022 
0023 if(nargin<5)
0024    method='laplacianhc';
0025 end
0026 if(nargin<4)
0027    if(nargin<3)
0028       iter=10;
0029    end
0030    alpha=0.5;
0031 end
0032 
0033 conn=meshconn(face,size(node,1));
0034 newnode=smoothsurf(node(:,1:3),[],conn,iter,alpha,method,alpha);

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005