function surfmodel(filename,filepath)
%  

%   This software is protected by german copyright and international treaties.             
%   Copyright 2004 Markus Junghöfer & Peter Peyk. All Rights Reserved.                     
%                                                                                          
%   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE        
%   NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,    
%   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE    
%   OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
%   TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT,       
%   INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE      
%   OR DOCUMENTATION.                                                                      

[filename,filepath]=uigetfile('*.mat','Please choose mat-file:');
head3dfilepath = [filepath,filename];
load(head3dfilepath,'vertexmat','patchmat');

figure;
patch('Vertices',vertexmat,'Faces',patchmat,'CData',[255 255 255],'EdgeColor','none','facelighting','gouraud');
h = light('position',[20 20 0],'style','infinite','Color',[0.5 0.5 0]);
h = light('position',[-20 -20 0],'style','infinite','Color',[0.5 0.5 0]);
set(gca,'Color','none');
figurecolor=get(gcf,'Color');
set(gca,'XTick',[]);
set(gca,'YTick',[]);
set(gca,'ZTick',[]);
set(gca,'XTickLabel','');
set(gca,'YTickLabel','');
set(gca,'ZTickLabel','');
set(gca,'XColor',figurecolor);
set(gca,'YColor',figurecolor);
set(gca,'ZColor',figurecolor);
set(gca,'Color',figurecolor);
light
axis equal;

return