Rotate.m function fixed

Surf property "vertexnormals" are updated correctly.

現在この提出コンテンツをフォロー中です。

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 (2026). Rotate.m function fixed (https://jp.mathworks.com/matlabcentral/fileexchange/35210-rotate-m-function-fixed), MATLAB Central File Exchange. に取得済み.

カテゴリ

Help Center および MATLAB AnswersGraphics Object Properties についてさらに検索

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.1.0.0

interactive commands order changed

1.0.0.0