12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

isonormalsDraw an isosurface from the volume data and add lights. This isosurface usestriangle normals (patch, isosurface, view, daspect, axis, camlight,lighting, title):subplot(1,2,1)p1 = patch(isosurface(data,.5),...'FaceColor','red','EdgeColor','none');view(3); daspect([1,1,1]); axis tightcamlight; camlight(-80,-10); lighting phong;title('Triangle Normals')Draw the same lit isosurface using normals calculated from the volume data:subplot(1,2,2)p2 = patch(isosurface(data,.5),...'FaceColor','red','EdgeColor','none');isonormals(data,p2)view(3); daspect([1 1 1]); axis tightcamlight; camlight(-80,-10); lighting phong;title('Data Normals')These isosurfaces illustrate the difference between triangle and data normals:See Alsointerp3, isosurface, isocaps, smooth3, subvolume, reducevolume,reducepatch2-254

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!