Versión (2.8 KB) por Andres
workaround for surface lighting with OpenGL

988 descargas

Actualizado 9 Jul 2009

Ver licencia

There's a bug in the OpenGL renderer that produces faulty face lighting in surface plots, see picture above and .
This submission contains a function that computes face normal data for the 'VertexNormals' property of the surface that fixes the lighting (facenorm.m) as well as a workaround function that you can just use in place of surf (surfo.m).

Only use this if you get erroneous surface plots and you can't go without OpenGL and flat lighting.

Citar como

Andres (2023). surfo (, MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2008b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Más información sobre Surface and Mesh Plots en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión

v1.01 · code with improved speed as kindly suggested by Jan Simon · minor text changes

perform meshgrid within facenorm.m, if necessary