This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Smooth color blend of surfaces

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Value Summary

InheritedFlat, or Smooth


Using Shading, a smooth color blend of triangulated surfaces can be (de-)activated.

Most surfaces in 3D are triangulated for display. The triangles are then drawn using Gouraud-shading to achieve a smooth visual effect. Using Shading = Flat, you can instruct the viewer to display the plain triangles.


Example 1

Reducing the mesh density of a surface usually has more effect on its outer rim than on the display of the middle:

plot(plot::Spherical([1, u, v], u=0..PI, v=0..2*PI,
                     UMesh=5, VMesh=5))

Setting Shading = Flat, you can see the triangles from which the sphere is constructed:

plot(plot::Spherical([1, u, v], u=0..PI, v=0..2*PI,
                     UMesh=5, VMesh=5),
     Shading = Flat)

See Also

MuPAD Functions

Was this topic helpful?