Absolute value of rotation of a point around a line in 3D
$begingroup$
am struggling for hours with turning something that already works perfectly in 2D, into 3D space. Really hope someone can help…
The task is to determine the absolute rotation of a point around the coordinate system so that rotation can then be applied to another point.
In 2D you do that with simple atan2(X, Y) that gives the angle which then can be applied to a point by rotating it around the origin (0,0).
But how would I do exactly the same in 3D space?
I know the procedure to compute the angle between two vectors (v1, v2):
arccos( dot(v1, v2) / (magnitude(v1)*magnitude(v2)) )
However since I have only the input vector, I cannot use this. I would need an "origin vector" like [0,0] in 2D. Unfortunately the procedure fails when a vector is [0, 0, 0] (not surprising as it results in computing arccos of 0 / 0).
Does someone have an idea?
As additional information: I do know the normal vector of a plane where the point is found in but again I have the same problem that this normal vector does not contain an orientation,
Huge thanks in advance!
3d rotations
$endgroup$
add a comment |
$begingroup$
am struggling for hours with turning something that already works perfectly in 2D, into 3D space. Really hope someone can help…
The task is to determine the absolute rotation of a point around the coordinate system so that rotation can then be applied to another point.
In 2D you do that with simple atan2(X, Y) that gives the angle which then can be applied to a point by rotating it around the origin (0,0).
But how would I do exactly the same in 3D space?
I know the procedure to compute the angle between two vectors (v1, v2):
arccos( dot(v1, v2) / (magnitude(v1)*magnitude(v2)) )
However since I have only the input vector, I cannot use this. I would need an "origin vector" like [0,0] in 2D. Unfortunately the procedure fails when a vector is [0, 0, 0] (not surprising as it results in computing arccos of 0 / 0).
Does someone have an idea?
As additional information: I do know the normal vector of a plane where the point is found in but again I have the same problem that this normal vector does not contain an orientation,
Huge thanks in advance!
3d rotations
$endgroup$
$begingroup$
Well, I'd recommend using either matrix rotations with Euler angles, or quaternions. Quaternions have a theoretical and practical advantage: no gymbal lock.
$endgroup$
– Adrian Keister
Jan 28 at 17:04
add a comment |
$begingroup$
am struggling for hours with turning something that already works perfectly in 2D, into 3D space. Really hope someone can help…
The task is to determine the absolute rotation of a point around the coordinate system so that rotation can then be applied to another point.
In 2D you do that with simple atan2(X, Y) that gives the angle which then can be applied to a point by rotating it around the origin (0,0).
But how would I do exactly the same in 3D space?
I know the procedure to compute the angle between two vectors (v1, v2):
arccos( dot(v1, v2) / (magnitude(v1)*magnitude(v2)) )
However since I have only the input vector, I cannot use this. I would need an "origin vector" like [0,0] in 2D. Unfortunately the procedure fails when a vector is [0, 0, 0] (not surprising as it results in computing arccos of 0 / 0).
Does someone have an idea?
As additional information: I do know the normal vector of a plane where the point is found in but again I have the same problem that this normal vector does not contain an orientation,
Huge thanks in advance!
3d rotations
$endgroup$
am struggling for hours with turning something that already works perfectly in 2D, into 3D space. Really hope someone can help…
The task is to determine the absolute rotation of a point around the coordinate system so that rotation can then be applied to another point.
In 2D you do that with simple atan2(X, Y) that gives the angle which then can be applied to a point by rotating it around the origin (0,0).
But how would I do exactly the same in 3D space?
I know the procedure to compute the angle between two vectors (v1, v2):
arccos( dot(v1, v2) / (magnitude(v1)*magnitude(v2)) )
However since I have only the input vector, I cannot use this. I would need an "origin vector" like [0,0] in 2D. Unfortunately the procedure fails when a vector is [0, 0, 0] (not surprising as it results in computing arccos of 0 / 0).
Does someone have an idea?
As additional information: I do know the normal vector of a plane where the point is found in but again I have the same problem that this normal vector does not contain an orientation,
Huge thanks in advance!
3d rotations
3d rotations
asked Jan 28 at 17:01
DragonGamerDragonGamer
1163
1163
$begingroup$
Well, I'd recommend using either matrix rotations with Euler angles, or quaternions. Quaternions have a theoretical and practical advantage: no gymbal lock.
$endgroup$
– Adrian Keister
Jan 28 at 17:04
add a comment |
$begingroup$
Well, I'd recommend using either matrix rotations with Euler angles, or quaternions. Quaternions have a theoretical and practical advantage: no gymbal lock.
$endgroup$
– Adrian Keister
Jan 28 at 17:04
$begingroup$
Well, I'd recommend using either matrix rotations with Euler angles, or quaternions. Quaternions have a theoretical and practical advantage: no gymbal lock.
$endgroup$
– Adrian Keister
Jan 28 at 17:04
$begingroup$
Well, I'd recommend using either matrix rotations with Euler angles, or quaternions. Quaternions have a theoretical and practical advantage: no gymbal lock.
$endgroup$
– Adrian Keister
Jan 28 at 17:04
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
In 3D a rotation cannot be parameterized using just the rotation angle. You don't need an origin vector. The least number of parameters you need is three. For example the three Euler angles or rotation axis and rotation angle (since rotation axis is a unit vector, the rotation angle can be encoded as the length of the vector). However it is often convenient to work with four parameters such as quaternions.
Modern approach is to avoid Euler angles, so my advise is to work with axis-angle parameters (kind of 3D angle) or quaternions (not just an angle representation but a whole algebra)
$endgroup$
add a comment |
$begingroup$
The struggle has come to an end. I've followed Mauricio's suggestion and found a solution based on Euler-angles.
Am applying this algorithm to the vector I have as the "direction vector" and the normal of the mentioned plane as the "up vector": https://stackoverflow.com/questions/21622956/how-to-convert-direction-vector-to-euler-angles
The resulting Euler angles can then be applied to any point to reproduce their rotation.
Smooth and thanks :)
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
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%2f3091125%2fabsolute-value-of-rotation-of-a-point-around-a-line-in-3d%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
In 3D a rotation cannot be parameterized using just the rotation angle. You don't need an origin vector. The least number of parameters you need is three. For example the three Euler angles or rotation axis and rotation angle (since rotation axis is a unit vector, the rotation angle can be encoded as the length of the vector). However it is often convenient to work with four parameters such as quaternions.
Modern approach is to avoid Euler angles, so my advise is to work with axis-angle parameters (kind of 3D angle) or quaternions (not just an angle representation but a whole algebra)
$endgroup$
add a comment |
$begingroup$
In 3D a rotation cannot be parameterized using just the rotation angle. You don't need an origin vector. The least number of parameters you need is three. For example the three Euler angles or rotation axis and rotation angle (since rotation axis is a unit vector, the rotation angle can be encoded as the length of the vector). However it is often convenient to work with four parameters such as quaternions.
Modern approach is to avoid Euler angles, so my advise is to work with axis-angle parameters (kind of 3D angle) or quaternions (not just an angle representation but a whole algebra)
$endgroup$
add a comment |
$begingroup$
In 3D a rotation cannot be parameterized using just the rotation angle. You don't need an origin vector. The least number of parameters you need is three. For example the three Euler angles or rotation axis and rotation angle (since rotation axis is a unit vector, the rotation angle can be encoded as the length of the vector). However it is often convenient to work with four parameters such as quaternions.
Modern approach is to avoid Euler angles, so my advise is to work with axis-angle parameters (kind of 3D angle) or quaternions (not just an angle representation but a whole algebra)
$endgroup$
In 3D a rotation cannot be parameterized using just the rotation angle. You don't need an origin vector. The least number of parameters you need is three. For example the three Euler angles or rotation axis and rotation angle (since rotation axis is a unit vector, the rotation angle can be encoded as the length of the vector). However it is often convenient to work with four parameters such as quaternions.
Modern approach is to avoid Euler angles, so my advise is to work with axis-angle parameters (kind of 3D angle) or quaternions (not just an angle representation but a whole algebra)
answered Jan 28 at 17:49
Mauricio Cele Lopez BelonMauricio Cele Lopez Belon
839411
839411
add a comment |
add a comment |
$begingroup$
The struggle has come to an end. I've followed Mauricio's suggestion and found a solution based on Euler-angles.
Am applying this algorithm to the vector I have as the "direction vector" and the normal of the mentioned plane as the "up vector": https://stackoverflow.com/questions/21622956/how-to-convert-direction-vector-to-euler-angles
The resulting Euler angles can then be applied to any point to reproduce their rotation.
Smooth and thanks :)
$endgroup$
add a comment |
$begingroup$
The struggle has come to an end. I've followed Mauricio's suggestion and found a solution based on Euler-angles.
Am applying this algorithm to the vector I have as the "direction vector" and the normal of the mentioned plane as the "up vector": https://stackoverflow.com/questions/21622956/how-to-convert-direction-vector-to-euler-angles
The resulting Euler angles can then be applied to any point to reproduce their rotation.
Smooth and thanks :)
$endgroup$
add a comment |
$begingroup$
The struggle has come to an end. I've followed Mauricio's suggestion and found a solution based on Euler-angles.
Am applying this algorithm to the vector I have as the "direction vector" and the normal of the mentioned plane as the "up vector": https://stackoverflow.com/questions/21622956/how-to-convert-direction-vector-to-euler-angles
The resulting Euler angles can then be applied to any point to reproduce their rotation.
Smooth and thanks :)
$endgroup$
The struggle has come to an end. I've followed Mauricio's suggestion and found a solution based on Euler-angles.
Am applying this algorithm to the vector I have as the "direction vector" and the normal of the mentioned plane as the "up vector": https://stackoverflow.com/questions/21622956/how-to-convert-direction-vector-to-euler-angles
The resulting Euler angles can then be applied to any point to reproduce their rotation.
Smooth and thanks :)
answered Feb 4 at 11:18
DragonGamerDragonGamer
1163
1163
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%2f3091125%2fabsolute-value-of-rotation-of-a-point-around-a-line-in-3d%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
$begingroup$
Well, I'd recommend using either matrix rotations with Euler angles, or quaternions. Quaternions have a theoretical and practical advantage: no gymbal lock.
$endgroup$
– Adrian Keister
Jan 28 at 17:04