Calculate Y-axis angle between a transform (matrix 4x4) and the origin in a 3D coordinate system [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












As suggested by one of my peers on my stackoverflow post: Calculate Y-axis angle between world origin and ARCamera in SceneKit, I am posting my question here.



I am wondering if there is a way to calculate the Y-axis angle between the origin to a transform (matrix 4x4).



Example:



I have a camera C (-2, 3, -1) looking at a point B (-3, 2, -2).



I would like to get the Y-angle from the origin (0, 0, 0) to point B.



However, instead of having the coordinates of point B, I have instead a matrix 4x4 representing the camera C (its transform).



The goal of this angle calculation is the same idea as getting the heading of a GPS user cursor in any Maps mobile application.



Thanks!










share|cite|improve this question















closed as off-topic by Adrian Keister, Xander Henderson, José Carlos Santos, user91500, John B Aug 31 at 12:09


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Adrian Keister, Xander Henderson, José Carlos Santos, user91500, John B
If this question can be reworded to fit the rules in the help center, please edit the question.












  • What exactly is it that you’re trying to measure? An illustration might be helpful.
    – amd
    Aug 31 at 2:11










  • @amd Updated my comment, please let me know if you find it clearer
    – cos
    Aug 31 at 5:18














up vote
1
down vote

favorite












As suggested by one of my peers on my stackoverflow post: Calculate Y-axis angle between world origin and ARCamera in SceneKit, I am posting my question here.



I am wondering if there is a way to calculate the Y-axis angle between the origin to a transform (matrix 4x4).



Example:



I have a camera C (-2, 3, -1) looking at a point B (-3, 2, -2).



I would like to get the Y-angle from the origin (0, 0, 0) to point B.



However, instead of having the coordinates of point B, I have instead a matrix 4x4 representing the camera C (its transform).



The goal of this angle calculation is the same idea as getting the heading of a GPS user cursor in any Maps mobile application.



Thanks!










share|cite|improve this question















closed as off-topic by Adrian Keister, Xander Henderson, José Carlos Santos, user91500, John B Aug 31 at 12:09


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Adrian Keister, Xander Henderson, José Carlos Santos, user91500, John B
If this question can be reworded to fit the rules in the help center, please edit the question.












  • What exactly is it that you’re trying to measure? An illustration might be helpful.
    – amd
    Aug 31 at 2:11










  • @amd Updated my comment, please let me know if you find it clearer
    – cos
    Aug 31 at 5:18












up vote
1
down vote

favorite









up vote
1
down vote

favorite











As suggested by one of my peers on my stackoverflow post: Calculate Y-axis angle between world origin and ARCamera in SceneKit, I am posting my question here.



I am wondering if there is a way to calculate the Y-axis angle between the origin to a transform (matrix 4x4).



Example:



I have a camera C (-2, 3, -1) looking at a point B (-3, 2, -2).



I would like to get the Y-angle from the origin (0, 0, 0) to point B.



However, instead of having the coordinates of point B, I have instead a matrix 4x4 representing the camera C (its transform).



The goal of this angle calculation is the same idea as getting the heading of a GPS user cursor in any Maps mobile application.



Thanks!










share|cite|improve this question















As suggested by one of my peers on my stackoverflow post: Calculate Y-axis angle between world origin and ARCamera in SceneKit, I am posting my question here.



I am wondering if there is a way to calculate the Y-axis angle between the origin to a transform (matrix 4x4).



Example:



I have a camera C (-2, 3, -1) looking at a point B (-3, 2, -2).



I would like to get the Y-angle from the origin (0, 0, 0) to point B.



However, instead of having the coordinates of point B, I have instead a matrix 4x4 representing the camera C (its transform).



The goal of this angle calculation is the same idea as getting the heading of a GPS user cursor in any Maps mobile application.



Thanks!







linear-algebra matrices linear-transformations 3d rotations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Aug 31 at 5:17

























asked Aug 31 at 1:33









cos

62




62




closed as off-topic by Adrian Keister, Xander Henderson, José Carlos Santos, user91500, John B Aug 31 at 12:09


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Adrian Keister, Xander Henderson, José Carlos Santos, user91500, John B
If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Adrian Keister, Xander Henderson, José Carlos Santos, user91500, John B Aug 31 at 12:09


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Adrian Keister, Xander Henderson, José Carlos Santos, user91500, John B
If this question can be reworded to fit the rules in the help center, please edit the question.











  • What exactly is it that you’re trying to measure? An illustration might be helpful.
    – amd
    Aug 31 at 2:11










  • @amd Updated my comment, please let me know if you find it clearer
    – cos
    Aug 31 at 5:18
















  • What exactly is it that you’re trying to measure? An illustration might be helpful.
    – amd
    Aug 31 at 2:11










  • @amd Updated my comment, please let me know if you find it clearer
    – cos
    Aug 31 at 5:18















What exactly is it that you’re trying to measure? An illustration might be helpful.
– amd
Aug 31 at 2:11




What exactly is it that you’re trying to measure? An illustration might be helpful.
– amd
Aug 31 at 2:11












@amd Updated my comment, please let me know if you find it clearer
– cos
Aug 31 at 5:18




@amd Updated my comment, please let me know if you find it clearer
– cos
Aug 31 at 5:18















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

這個網誌中的熱門文章

How to combine Bézier curves to a surface?

Mutual Information Always Non-negative

Why am i infinitely getting the same tweet with the Twitter Search API?