This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Connecting Equal Values with Isosurfaces

Isosurfaces in Fluid Flow Data

Create isosurfaces with the isosurface and patch commands.

This example creates isosurfaces in a volume generated by flow. Generate the volume data with the command:

[x,y,z,v] = flow;

To select the isovalue, determine the range of values in the volume data.

ans =
ans =

Through exploration, you can select isovalues that reveal useful information about the data. Once selected, use the isovalue to create the isosurface:

  • Use isosurface to generate data that you can pass directly to patch.

  • Recalculate the surface normals from the gradient of the volume data to produce better lighting characteristics (isonormals).

  • Set the patch FaceColor to red and the EdgeColor to none to produce a smoothly lit surface.

  • Adjust the view and add lighting (daspect, view, camlight, lighting).

    hpatch = patch(isosurface(x,y,z,v,0));
    hpatch.FaceColor = 'red';
    hpatch.EdgeColor = 'none';
    axis tight
    camlight left; 
    lighting gouraud