Remove scale transformation from a complex transform matrix 4x4?
$begingroup$
My common task is I have a rect with coordinates of its $2$ points: $(x, y, z), (x + a, y + b, z)$. I applied a $4times4$ transform matrix to it and it became a quadrilateral. Now for some reasons I can't use it this way and must apply scaling before other transformations. The list of operations is given below (it is used in computer graphics so I don't know exactly if it is a correct order or if it should be reversed). How to solve this issue?
- perspective (
m34 = -0.0001
); - translation by
z = -radius
; - rotation around x axis;
- rotation around y axis;
- scale (decrease the size);
- translation by
z = radius
.
This $4times4$ matrix is transposed (for example, m41 means translation by x, m42 translation by y and m43 translation by z).
matrices geometry trigonometry matrix-calculus matrix-decomposition
$endgroup$
add a comment |
$begingroup$
My common task is I have a rect with coordinates of its $2$ points: $(x, y, z), (x + a, y + b, z)$. I applied a $4times4$ transform matrix to it and it became a quadrilateral. Now for some reasons I can't use it this way and must apply scaling before other transformations. The list of operations is given below (it is used in computer graphics so I don't know exactly if it is a correct order or if it should be reversed). How to solve this issue?
- perspective (
m34 = -0.0001
); - translation by
z = -radius
; - rotation around x axis;
- rotation around y axis;
- scale (decrease the size);
- translation by
z = radius
.
This $4times4$ matrix is transposed (for example, m41 means translation by x, m42 translation by y and m43 translation by z).
matrices geometry trigonometry matrix-calculus matrix-decomposition
$endgroup$
add a comment |
$begingroup$
My common task is I have a rect with coordinates of its $2$ points: $(x, y, z), (x + a, y + b, z)$. I applied a $4times4$ transform matrix to it and it became a quadrilateral. Now for some reasons I can't use it this way and must apply scaling before other transformations. The list of operations is given below (it is used in computer graphics so I don't know exactly if it is a correct order or if it should be reversed). How to solve this issue?
- perspective (
m34 = -0.0001
); - translation by
z = -radius
; - rotation around x axis;
- rotation around y axis;
- scale (decrease the size);
- translation by
z = radius
.
This $4times4$ matrix is transposed (for example, m41 means translation by x, m42 translation by y and m43 translation by z).
matrices geometry trigonometry matrix-calculus matrix-decomposition
$endgroup$
My common task is I have a rect with coordinates of its $2$ points: $(x, y, z), (x + a, y + b, z)$. I applied a $4times4$ transform matrix to it and it became a quadrilateral. Now for some reasons I can't use it this way and must apply scaling before other transformations. The list of operations is given below (it is used in computer graphics so I don't know exactly if it is a correct order or if it should be reversed). How to solve this issue?
- perspective (
m34 = -0.0001
); - translation by
z = -radius
; - rotation around x axis;
- rotation around y axis;
- scale (decrease the size);
- translation by
z = radius
.
This $4times4$ matrix is transposed (for example, m41 means translation by x, m42 translation by y and m43 translation by z).
matrices geometry trigonometry matrix-calculus matrix-decomposition
matrices geometry trigonometry matrix-calculus matrix-decomposition
edited Jul 16 '15 at 8:41
Vyachaslav Gerchicov
asked Jul 16 '15 at 7:47
Vyachaslav GerchicovVyachaslav Gerchicov
1085
1085
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
I multiply by additional matrices to "neutralize" perspective and translation (first 2 transforms) one by one then I apply scale (because the rotation and scale transforms don't need to be placed in a strict order). Then I "repeat" first 2 transforms I previously "removed".
The reason I haven't found a solution previously is the perspective transform. It seems it breaks the whole matrix (or adds something like an unusual distortion) and common matrix rules may work no longer. In this case my way works if I "remove" the perspective by the first action and it won't work if I "remove" transforms from the end of the sequence.
$endgroup$
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1363020%2fremove-scale-transformation-from-a-complex-transform-matrix-4x4%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
I multiply by additional matrices to "neutralize" perspective and translation (first 2 transforms) one by one then I apply scale (because the rotation and scale transforms don't need to be placed in a strict order). Then I "repeat" first 2 transforms I previously "removed".
The reason I haven't found a solution previously is the perspective transform. It seems it breaks the whole matrix (or adds something like an unusual distortion) and common matrix rules may work no longer. In this case my way works if I "remove" the perspective by the first action and it won't work if I "remove" transforms from the end of the sequence.
$endgroup$
add a comment |
$begingroup$
I multiply by additional matrices to "neutralize" perspective and translation (first 2 transforms) one by one then I apply scale (because the rotation and scale transforms don't need to be placed in a strict order). Then I "repeat" first 2 transforms I previously "removed".
The reason I haven't found a solution previously is the perspective transform. It seems it breaks the whole matrix (or adds something like an unusual distortion) and common matrix rules may work no longer. In this case my way works if I "remove" the perspective by the first action and it won't work if I "remove" transforms from the end of the sequence.
$endgroup$
add a comment |
$begingroup$
I multiply by additional matrices to "neutralize" perspective and translation (first 2 transforms) one by one then I apply scale (because the rotation and scale transforms don't need to be placed in a strict order). Then I "repeat" first 2 transforms I previously "removed".
The reason I haven't found a solution previously is the perspective transform. It seems it breaks the whole matrix (or adds something like an unusual distortion) and common matrix rules may work no longer. In this case my way works if I "remove" the perspective by the first action and it won't work if I "remove" transforms from the end of the sequence.
$endgroup$
I multiply by additional matrices to "neutralize" perspective and translation (first 2 transforms) one by one then I apply scale (because the rotation and scale transforms don't need to be placed in a strict order). Then I "repeat" first 2 transforms I previously "removed".
The reason I haven't found a solution previously is the perspective transform. It seems it breaks the whole matrix (or adds something like an unusual distortion) and common matrix rules may work no longer. In this case my way works if I "remove" the perspective by the first action and it won't work if I "remove" transforms from the end of the sequence.
answered Jul 16 '15 at 9:18
Vyachaslav GerchicovVyachaslav Gerchicov
1085
1085
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1363020%2fremove-scale-transformation-from-a-complex-transform-matrix-4x4%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown