function plot3ds(v,t,INcolor,INfacelight)
%PLOT3DS(v,t,<color>,<facelight>) plot object read by 'read3ds()'
%using matlab's PATCH command.
%input: v,t: vertices, triangles (see 'read3ds()')
%optional: color: [r g b] or matrix length(v)*[r g b] (see PATCH->facevertexCdata)
%          facelight: 'none' | 'flat' | 'phong' | 'gouraud'


%init
if exist('INcolor')==0 | length(INcolor)==1
   INcolor=[0.8 0.8 0.8];
end
if exist('INfacelight')==0
   INfacelight='none';
end

%plot
patch('faces',t{1},'vertices',v{1},'FaceVertexCData',INcolor,...
      'FaceColor','flat','facelighting',INfacelight);
light('Position',[2000 2000 2000],'Style','infinite');
axis equal;

%bye
return
