View Full Version : Simple angle calculation - why wrong?

02 February 2012, 08:36 AM
Hi! I have this simple formula to calculate angle between 2 points:

theAngle = acos(dot (normalize p1) (normalize p2))

Now, I get 2 points from UVW elements selection. I want to track its rotations. So, lets say, I get angle 24 from the very start.

Then I take my selected UVW eleement, scale it down.

theAngle value is now 14! But why? I just scaled it down, no rotation so far. So I assumed relative rotation between 2 points of element would stay the same?

02 February 2012, 11:28 AM
Don't mind my question now. I realized I should compare vector lines, not points, for angles. Hope that will do the trick

02 February 2012, 04:49 PM
Yeah, that is right, 2 lines. There is a sticky in here with forumlas that has what you need.

CGTalk Moderation
02 February 2012, 04:49 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.