필터 지우기
필터 지우기

geht the transformation coordinates from hgtransform

조회 수: 2 (최근 30일)
Benutzer Name
Benutzer Name 2018년 10월 10일
댓글: Walter Roberson 2018년 10월 18일
Hello,
I am working with hgtransform and makehgtform. I am surf some coordinates in the origin position, than I translate and rotate these objects and now I want to get the new coordinates of these Objects. I thought they would be maybe in the properties of the Transform-handle but there is only the transformation matrix. Is there a Way to get them correctly from Matlab?
My other question:
If I have to transform by my own (i.e. to rotate on X-axis), are these the correct new coordinates?
p=[3.4;5.2;4.3;1];
M=makehgtform('xrotate',pi/7)
p_new=M*p; % p_new(1:3,1) new coordinates?
  댓글 수: 2
Benutzer Name
Benutzer Name 2018년 10월 18일
for everyone who wants to know. You can't get the coordinates of the new Transform object from the properties.
you have to use manual the matrix multiplication like I did in my question.
Walter Roberson
Walter Roberson 2018년 10월 18일
Unfortunately true.
I do not know how the transformation is processed in MATLAB. I do know that in OpenGL (which is used by MATLAB), that these kinds of transformation matrices are built right into the processing chain, that a program sets up coordinate lists and sets up a transform and then makes a call to apply the transform. This can be important because the transformations might be applied in graphics hardware rather than at the CPU level. The mechanism to do rotation animations in such a system is to just send a new transform matrix and ask to render again. This multi-step process can be critical for graphics performance, as it cuts down on the data that has to be transferred to the graphics hardware.

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

답변 (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