You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed some weird behaviour in createBasisTransform (see code below).
When calculating the transform from a plane with a Z-normal to an Y-normal, I get the wrong affine transform. Is this normal behaviour?
I'm using Matlab R2017b.
p1 = createPlane([0 0 0],[0 0 1]);
% create points in XY plane
pnts1 = [-1 -1 0;
1 -1 0;
1 1 0;
-1 1 0];
drawPoint3d(pnts1);
drawPlane3d(p1);
% --> points are all in the XY plane
% create YZ plane (X-normal)
p2 = createPlane([0 0 0],[1 0 0]);
% transform points
t2 = createBasisTransform3d(p1,p2);
pnts2 = transformPoint3d(pnts1,t2);
% --> points are all in the YZ plane
hold on
drawPoint3d(pnts2);
drawPlane3d(p2);
hold off
% create XZ plane (Y-normal)
p3 = createPlane([0 0 0],[0 1 0]);
% transform points
t3 = createBasisTransform3d(p1,p3);
pnts3 = transformPoint3d(pnts1,t3);
% --> for some reason points are still in the YZ plane
hold on
drawPoint3d(pnts3);
drawPlane3d(p3);
hold off
The text was updated successfully, but these errors were encountered:
after having a look, I believe this is the normal behaviour.
After applying transform "t3", the coordinates of the points "pnts3" are expressed in terms of direction vectors of the plane p3. The four points are in the (global) XY plane. The plane p3 has first direction vector as [0 0 -1]. Therefore, the four points have their first coordinate in the basis of plane p3 equal to a constant (here equal to zero). Then, they all lie in a plane that corresponds to a YZ plane.
You can use the following to project back to "reference" basis:
I noticed some weird behaviour in createBasisTransform (see code below).
When calculating the transform from a plane with a Z-normal to an Y-normal, I get the wrong affine transform. Is this normal behaviour?
I'm using Matlab R2017b.
The text was updated successfully, but these errors were encountered: