O'Reilly logo

MATLAB Graphics and Data Visualization Cookbook by Swapnonil Banerjee, Nivedita Majumdar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Isosurface, isonormals, isocaps

Isosurfaces are surfaces that join points of equal magnitude. They are the 2D analog of contour lines. In this recipe, you will explore isosurfaces and their use in 3D visualization.

Getting ready

You will once again use the MRI dataset that comes with MATLAB installation. Load the data:

load mri
D = squeeze(D);

How to do it...

Perform the following steps:

  1. Construct the human face using an isosurface and the MRI plates. The three-dimensional smoothing creates a smoothed surface for presenting the human face. The color of the patch is chosen to match common skin tones.
    % create figure with predefined colormap figure('Colormap',map) % smooth the data Ds = smooth3(D); % create a isosurface; use patch to construct the image ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required