How to calculate angular rotation for a 2D line?

in summary, the problem is finding the angle a and b and determining whether a number of complete rotations have occured.
  • #1
msn009
53
6
For illustration purposes, I have attached an image of the line with the angle that I want to calculate. I am trying to determine the angle of rotation and the calculation that I am using currently is as below:

angle = math.atan2(y,x)

I use this formula to calculate the rotation for A and A', and then I add up the angle of a and b get the rotation. So I am really not sure if this is the correct way to do this. The idea in the end is to see if the rotation from A to A' is >70 degrees or <70 degrees. Sorry my math is pretty rusted at the moment.

P_20180904_192952 (1).jpg
 

Attachments

  • P_20180904_192952 (1).jpg
    P_20180904_192952 (1).jpg
    43.7 KB · Views: 570
Mathematics news on Phys.org
  • #2
Can you explain the problem more, it is not clear at all for me.
 
  • #3
line A is the position of the line at timepoint 1 while line A' is the position of the line at timepoint 2. I want to calculate the angle of rotation from the position of the line at timepoint1 to the position of the line at timepoint 2. My approach now is to calculate the angle at each timepoint then I add up these angles to get the degree of rotation. Hope this is clear.
 
  • #4
I'm not sure what y and x are, nor what math.atan2 is. (arctan type 2 or arctan squared maybe?)

My feeling would be that each line has a direction - relative to the arbitrary reference frame of the paper - so you can just subtract the initial direction from the final direction to get the rotation.

For eg., if a were 30 deg and b were 25 deg, if you took line ba as East-West, then the starting line dotA would have a bearing of 120 deg and the finishing line bA' would have a bearing of 65 deg giving a rotation of -55 deg.

Your main problems are; finding the angles a and b, and knowing whether a number of complete rotations have occured.
 
  • #5
thank you very much Merlin, this was what I was looking for. sorry if the explanation wasn't very clear.
 
  • #6
Looking at it now, I realize the bearings could be different, depending on how you label the lines:
Line A is either 120 deg (pointing right) or 300 deg (pointing left)
similarly, line A' is either 65 deg or 245 deg
so the possible rotations are 120 - 65 = 55, 120 - 245 = -125, 300 - 65 =235, or 300 - 245 = 55 degrees.

I think you need to label the ends, eg. A is PQ and A' is P'Q' then you'd be able to see if the line had turned more than 180 deg.

I wonder how you know the angles a and b ?
 
  • #7
Merlin3189 said:
nor what math.atan2 is. (arctan type 2 or arctan squared maybe?)
atan2 has nothing to do with squaring. atan and atan2 are functions common to many programming languages such as C, C++, C#, python, matlab, and others. Both functions return an angle in radians. atan() takes a single argument, and atan2() takes two arguments.

For example, atan(1.0) returns the numeric equivalent of ##\pi/4##, and atan2(2.0, 1.0) returns about 1.107, which is about 63.4°.
 

1. How is angular rotation defined for a 2D line?

Angular rotation for a 2D line is defined as the rate of change of the line's angle with respect to time. It is usually measured in degrees or radians per second.

2. What is the formula for calculating angular rotation for a 2D line?

The formula for calculating angular rotation for a 2D line is: angular rotation = (final angle - initial angle) / time. This is known as the average angular rotation formula.

3. Can angular rotation for a 2D line be negative?

Yes, angular rotation for a 2D line can be negative. A negative angular rotation indicates that the line is rotating in a clockwise direction, while a positive angular rotation indicates a counterclockwise rotation.

4. How does the length of the line affect the angular rotation?

The length of the line does not affect the angular rotation. The angular rotation is only dependent on the change in angle and the time taken for that change to occur.

5. Is there a difference between angular rotation and linear rotation?

Yes, there is a difference between angular rotation and linear rotation. Angular rotation refers to the change in angle of a line, while linear rotation refers to the change in position of an object along a straight path. Angular rotation is measured in degrees or radians, while linear rotation is measured in units of distance.

Similar threads

Replies
3
Views
736
Replies
3
Views
1K
  • Mechanical Engineering
Replies
3
Views
472
Replies
4
Views
4K
Replies
4
Views
2K
Replies
1
Views
837
Replies
7
Views
936
  • Introductory Physics Homework Help
2
Replies
54
Views
2K
Back
Top