There's a bug in the OpenGL renderer that produces faulty face lighting in surface plots, see picture above and http://www.mathworks.com/matlabcentral/newsreader/view_thread/249184 .
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.
引用格式
Andres (2024). surfo (https://www.mathworks.com/matlabcentral/fileexchange/23882-surfo), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2008b
兼容任何版本
平台兼容性
Windows macOS Linux类别
在 Help Center 和 MATLAB Answers 中查找有关 Surface and Mesh Plots 的更多信息
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!