function hrmplot(fname)

% figure;
hold on
fp=fopen(fname,'r');
fposchar(fp,'=');

ncmpn=fscanf(fp,'%i',[1 1]);
for ii=1:ncmpn
   fposchar(fp,'=');
   fposchar(fp,'=');
   fposchar(fp,'=');
   ncross=fscanf(fp,'%i',[1 1]);
   fposchar(fp,'=');
   npt=fscanf(fp,'%i',[1 1]);

   cmpn=zeros([ncross npt 3]);
   
   for jj=1:ncross
       for kk=1:npt
           for ll=1:3
               cmpn(jj,kk,ll)=fscanf(fp,'%f',[1 1]);
           end
       end
   end
%     surf(cmpn(:,:,1),cmpn(:,:,2),cmpn(:,:,3),ones([size(cmpn,1) size(cmpn,2)]));
   surf(cmpn(:,:,1),cmpn(:,:,2),cmpn(:,:,3));
end
view(3)
hold off
axis equal 
axis off
fclose(fp);

function fposchar(fp, ch)
jnk=0;
while(jnk~=ch)
    jnk=fscanf(fp,'%1c',[1 1]);
end