Clear Filters
Clear Filters

geht the transformation coordinates from hgtransform

2 views (last 30 days)
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 Comments
Benutzer Name
Benutzer Name on 18 Oct 2018
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 on 18 Oct 2018
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.

Sign in to comment.

Answers (0)

Categories

Find more on Object Containers in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!