figaro3d

PURPOSE ^

function [fc] = figaro3d(srf,vtx,simp,fc,BB,h);

SYNOPSIS ^

function [fc] = figaro3d(srf,vtx,simp,fc,BB,h);

DESCRIPTION ^

function [fc] = figaro3d(srf,vtx,simp,fc,BB,h);

This function plots the solution as a 3D object crossed at the plane z=h 
within the 3D boundaries of the volume



h    = is the height of the desired slice, max(vtx(:,3))>= h >= min(vtx(:,3))
srf  = The boundary surfaces (faces)
simp = The simplices matrix
fc   = Plotting utility matrix, calculated through slicer_plot. 
       This is calculated in slicer_plot.m 
BB   = The calculated inverse solution

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [fc] = figaro3d(srf,vtx,simp,fc,BB,h);
0002 %function [fc] = figaro3d(srf,vtx,simp,fc,BB,h);
0003 %
0004 %This function plots the solution as a 3D object crossed at the plane z=h
0005 %within the 3D boundaries of the volume
0006 %
0007 %
0008 %
0009 %h    = is the height of the desired slice, max(vtx(:,3))>= h >= min(vtx(:,3))
0010 %srf  = The boundary surfaces (faces)
0011 %simp = The simplices matrix
0012 %fc   = Plotting utility matrix, calculated through slicer_plot.
0013 %       This is calculated in slicer_plot.m
0014 %BB   = The calculated inverse solution
0015 
0016 srf_m=[];
0017 
0018 for i=1:size(srf,1)
0019    
0020    if vtx(srf(i,1),3) < h & vtx(srf(i,2),3) < h & vtx(srf(i,3),3) < h 
0021       %Adjust to <= if a coarse mesh is used.
0022       
0023       srf_m = [srf_m;srf(i,:)];
0024    end
0025 end
0026 
0027 figure;
0028 
0029 p = trisurf(srf_m,vtx(:,1),vtx(:,2),vtx(:,3),ones(size(vtx,1),1));
0030 set(p,'FaceColor',[0.6 1 0.5],'EdgeColor','none');
0031 camlight left 
0032 lighting flat;
0033 hold on;
0034 [fc] = slicer_plot_n(h,BB,vtx,simp,fc);
0035 daspect([1 1 1]);
0036 
0037 
0038 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0039 % This is part of the EIDORS suite.
0040 % Copyright (c) N. Polydorides 2003
0041 % Copying permitted under terms of GNU GPL
0042 % See enclosed file gpl.html for details.
0043 % EIDORS 3D version 2.0
0044 % MATLAB version 5.3 R11
0045 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Generated on Tue 09-Aug-2011 11:38:31 by m2html © 2005