hello

having position of 3 point i want to calculate the angle between them

Printable View

- Aug 8th 2007, 02:56 AMSuperEletcriccalculating angle
hello

having position of 3 point i want to calculate the angle between them - Aug 8th 2007, 04:28 AMThePerfectHacker
- Aug 8th 2007, 07:11 AMticbol
If in 2D only, plot the 3 points on the same rectangular axes, so that you'd know how to get the angle between the two rays. For simplicity, put the corner of the angle on the origin (0,0).

Use the slopes of the rays. The slope of a line is the tangent of the angle made by the line with the horizontal axis, so the angle of the line with the horizontal axis is the arctangent of the slope.

So the angle between the two rays is actan(m1) minus arctan(m2).

Be careful with the signs of the slopes m1 and m2. - Aug 8th 2007, 07:15 AMSoroban
Hello, SuperEletcric!

Another approach . . .

Quote:

Having the positions of 3 points,

calculate the angles of the triangle.

Let's find angle

Use the Slope Formula to find: .

Then: .

- Aug 8th 2007, 08:46 AMPlato
Any three non-collinear points determine a triangle, even in .

Hence we have three angles. If A, B, & C are the three points then .

This is exactly what TPH posted above. - Aug 15th 2007, 02:56 AMSuperEletcric
thanx to all

but i have small problem.

(finding vectors and doing dot product).

would you mind solving algorithm for instance for this points : (0,0),(1,1),(1,0) - Aug 15th 2007, 06:33 AMThePerfectHacker