Rotate.m function fixed

Surf property "vertexnormals" are updated correctly.
455 download
Aggiornato 23 feb 2012

Visualizza la licenza

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

Cita come

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

Compatibilità della release di MATLAB
Creato con R2009b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Graphics Object Properties in Help Center e MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.1.0.0

interactive commands order changed

1.0.0.0