View Full Version : How to calculate the angle between two lines formed by connecting any set of numbers?
vks64
Jan 24, 2016, 07:41 AM
How to calculate the angle between two lines formed by connecting any set of numbers, For Example Line1 formed by connecting numbers 125, 132 and Line 2 formed by connecting numbers 110, 112 in a horizontal plane?
ma0641
Jan 24, 2016, 02:24 PM
Am I to assume Line 1 is on a vertical plane? You need crossing lines to get the angle. Look up Sine and cosine rules in your text book.
ebaines
Jan 25, 2016, 06:49 AM
We need more information, because from what you have written we can't understand what you are talking about. Typically points on a Cartesian plane are identified by two coordinates each (x and y coordinates), and it takes two points to define a line, so we would expect to see a total of four sets of coordinates for this problem. But you only gave us two sets, so you have defined only one line. Please clarify what you mean.
vks64
Feb 7, 2016, 12:16 PM
We need more information, because from what you have written we can't understand what you are talking about. Typically points on a Cartesian plane are identified by two coordinates each (x and y coordinates), and it takes two points to define a line, so we would expect to see a total of four sets of coordinates for this problem. But you only gave us two sets, so you have defined only one line. Please clarify what you mean.
Sir,
In the above illustration all the numbers lie on the same plane and the given numbers may be taken to represent anyone of axis, (in the given example may please be taken to represent the Y axis, i.e.. Y coordinates); and the value for other axis i.e. for x coordinate may be taken as any constant greater than zero.
The first two set of numbers connect to form the first line (L1) and the second two set of numbers connect to form the second line(L2). I have presented below two similar lines visualized in my question?
file:///C:\Users\user\AppData\Local\Temp\msohtmlclip1\01\c lip_image002.png
ebaines
Feb 8, 2016, 06:41 AM
The angle between the lines is dependent on the constant that you select. If the distance between the x-values of these coordinates is C, then the angle that line 1 makes to the horizontal is arctan((132-125)/C), and the angle that line 2 makles to the horizontal is arctan((112-110)/C), and the angle between the two lines is the difference of these two angles.
Another way to do this is to treat the two lines as vectors, calculate the dot product of them using \vec V_1 \cdot \vec V_2 = x_1x_2 + y_1y_2, and then calculate the cosine of the angle between them from:
\vec V_1 \cdot \vec V_2 = |V_1||V_2| \cos (\theta)