Transformation on ellipsoid

조회 수: 3 (최근 30일)
Sakshi
Sakshi 2011년 6월 18일
I have defined an ellipsoid at origin with its centre and then rotated the ellipsoid followed by translation using hgtransform function. Below is the code that I have used. However, when I am trying to retrieve [x,y,z] after the transformations, the coordinates of the ellipsoid are remaining the same. What is the conceptual mistake that I am making here ?
[x,y,z]=ellipsoid(0,0,0,sx,sy,sz,meshSize);
h=surf(x,y,z);
t = hgtransform; % parent%
set(h,'Parent',t) % making the ellipsoid as the child
C=b*R'+ T; %matrices b, R abd T defined previously
set(t,'matrix',C) % this should do the transformation on ellipsoid
x=get(h,'xdata');
y=get(h,'ydata');
z=get(h,'zdata'); % but these x,y,z remain same ??

채택된 답변

Walter Roberson
Walter Roberson 2011년 6월 18일
hgtransform() does not change the stored coordinates, only how the coordinates are processed for rendering.
  댓글 수: 1
Sakshi
Sakshi 2011년 6월 18일
Thank you.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Object Containers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by