Rotate.m function fixed

版本 1.1.0.0 (2.5 KB) 作者: Luc Masset
Surf property "vertexnormals" are updated correctly.
454.0 次下载
更新时间 2012/2/23

查看许可证

Bug evidence:

[x,y,z] = sphere(20);
hs=surf(x,y,z,'facecolor','y');
view(2)
axis equal
hl=light;
lightangle(hl,0,0)
% light is on -Y axis, thus at the
% bottom
rotate(hs,[0 0 1],30)
% rotate sphere to the right from 30°

It looks like the light has moved. This is due to a bug in rotate.m function. The "VertexNormals" property of the surf object is not updated as "xdata", "ydata" and "zdata" properties are.

This is fixed in the submitted version of rotate.m.

Luc Masset

引用格式

Luc Masset (2024). Rotate.m function fixed (https://www.mathworks.com/matlabcentral/fileexchange/35210-rotate-m-function-fixed), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Graphics Object Properties 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

interactive commands order changed

1.0.0.0