surfo
by Andres
24 Apr 2009
(Updated 09 Jul 2009)
workaround for surface lighting with OpenGL
|
Watch this File
|
| File Information |
| Description |
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. |
| MATLAB release |
MATLAB 7.7 (R2008b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (1) |
| 08 Jul 2009 |
Jan Simon
|
|
|
| Updates |
| 27 Apr 2009 |
perform meshgrid within facenorm.m, if necessary |
| 09 Jul 2009 |
v1.01 · code with improved speed as kindly suggested by Jan Simon · minor text changes |
|
Contact us at files@mathworks.com