フィルターのクリア

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 Center および File ExchangeObject Containers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by