Skip to main content

Timeline for Quaternion and axis of rotation

Current License: CC BY-SA 3.0

24 events
when toggle format what by license comment
Jan 31, 2013 at 13:43 comment added ithcy possible duplicate of How to place a point in 3D so that it creates a certain angle?
Jan 29, 2013 at 15:30 history edited user985611 CC BY-SA 3.0
added 54 characters in body
Jan 29, 2013 at 15:23 history edited user985611 CC BY-SA 3.0
added 239 characters in body
Jan 29, 2013 at 15:17 vote accept user985611
Jan 29, 2013 at 14:54 answer added Joseph Thomson timeline score: 3
Jan 29, 2013 at 13:06 comment added user985611 Updated the main post with more code.
Jan 29, 2013 at 13:02 history edited user985611 CC BY-SA 3.0
edited body
Jan 29, 2013 at 12:56 comment added user985611 I updated to reflect: Where the x1, y1, z1, x2, y2, z2 are the results from the unit vectors B-A and B-C.
Jan 29, 2013 at 12:56 history edited user985611 CC BY-SA 3.0
edited body
Jan 29, 2013 at 12:54 comment added user985611 I just tested with the above function. The Angle( A, B, C ), with middle point B, is 67.3895. When I rotate point C I get 75.4952. I believe the error is somewhere in the code I just inserted in my main post.
Jan 29, 2013 at 12:53 comment added MBo I mean B-A and C-A, because you have used "vectors B-A and C-A", and I thought about A as rotation point. Forget about denominator if you use unit vectors.
Jan 29, 2013 at 12:48 comment added user985611 result = arccos(DotProduct( x1, y1, z1, x2, y2, z2 )/ (BA.LengthCA.Length)). Do you mean BA.LengthBC.Length? (If B is the middle point)?
Jan 29, 2013 at 12:38 comment added MBo About axis of rotation - yes, your solution with CrossProduct is fine, it is direction vector of this axis. About angle - you are trying to use some 2D-case solution, it's wrong here
Jan 29, 2013 at 12:37 comment added user985611 For those who wonder what L2Norm is: return sqrtf( pow( x, 2 ) + pow( y, 2 ) + pow( z, 2 ) );
Jan 29, 2013 at 12:37 comment added user985611 I will revise the angle function and see if it works. Thank you for the help so far @Aki. I would give you 1000 points if I could. :) I more thing: Only point C must move. I cannot move the rest. This is like a jigsaw puzzle and point C must be rotated in such a manner as to create a certain angle.
Jan 29, 2013 at 12:35 history edited user985611 CC BY-SA 3.0
added 1849 characters in body
Jan 29, 2013 at 12:02 comment added Aki Suihkonen Yes, the axis of rotation would be the plane normal, which is the normalized cross-product of the two vectors defining the plane. However, as suggested by MBo (and myself in your other thread), your Angle function might need revising. It gives 89.926, while the arccos gives 80.841 (degrees).
Jan 29, 2013 at 11:59 comment added David Hammen You didn't show the code for how you are rotating C, so this is just a guess: You are rotating C about the origin. That's not what you want to do. You need to rotate C about B.
Jan 29, 2013 at 11:56 comment added David Hammen Given the name, I strongly suspect that L2Norm calculates the [1=L2 norm] of the input vector. In other words, it calculates the Euclidean length of the vector. [1]mathworld.wolfram.com/L2-Norm.html
Jan 29, 2013 at 11:49 comment added user985611 Not sure. The atan2 formula for it was explained like this. I believe I saw it in one of the matlab forums. As for the axis, do you have a solution for it?
Jan 29, 2013 at 11:43 comment added MBo What does function L2Norm do? You can calculate angle as result = arccos(DotProduct( x1, y1, z1, x2, y2, z2 )/ (BA.Length*CA.Length))
Jan 29, 2013 at 11:28 comment added user985611 Are you making a note about the angle algorithm or do you mean that if I remove the L2Norm I will get my desired result?
Jan 29, 2013 at 10:22 review Close votes
Jan 31, 2013 at 16:38
Jan 29, 2013 at 10:04 history asked user985611 CC BY-SA 3.0