Geometry/Vector
Geometry/Vector
(OP)
I have three points in 3D space, P1, P2 and P3, defined by (x1, y1, z1), (x2, y2, z2) and (x3, y3, z3). Does anyone have a formula that calculates the angle between lines P1,P2 and P2, P3 and the angle of the plane, going through the points, relative to the x-y plane?
Thanks, Dik
Thanks, Dik






RE: Geometry/Vector
cos theta = (u.v)/((abs u)*(abs v))
The numerator is the dot product of the vectors which is a scalar quantity, not a vector and is given by u1*v1 + u2*v2 + u3*v3
The denominator is the product of the absolute values of the magnitudes of the vector which are given by (individually) ((x^2)+(y^2)*(z^2))^0.5
RE: Geometry/Vector
I was racking my brain here because I knew I had used that before, but I didn't have any of my calc notes in the office.
RE: Geometry/Vector
RE: Geometry/Vector
RE: Geometry/Vector
RE: Geometry/Vector
Reading the question, I suspect dik wants P2 to be the starting point for both vectors. This is not trivial because if you pick the wrong direction of the vectors, you could end up computing the supplemental angle (the angle necessary to obtain 180 degrees when aded to the original angle) rather than the angle of interest. I remember doing some COGO stuff some time ago and it was very important to keep your points in the right order.
As for getting the angle between the vector plane and the x-y plane, I think the first step would be to compute the cross product of the two vectors, which I believe creates an orthogonal vector to the vector plane. Reduce this to a unity vector and then I think you will have the direction cosines necesary to get the angle you want.
I might check my CRC Math handbook. I think the answer is very simple with the direction cosines.
RE: Geometry/Vector
Also, that would relate to the expression in my second post, not the last one that you reference in my first post. The magnitude of the vector is the same regardless of the direction.
RE: Geometry/Vector
Mag x ( u x i + v x j + w x k ) = vector cross product of (U,V)
A little old fashioned, but I believe it is the correct forumla.
RE: Geometry/Vector
If I use the method above to determine the angle between vectors 3 and 4, then this should be the angle to the x-y plane. Correct in my thinking?
Dik
RE: Geometry/Vector
The Vector from P2 to P1 is U (capitol denotes vector quantity)
The Vector from P2 to P3 is V
The angle between these two vectors may be determined from the relationship ...
U.V = u x v x cos (theta)
e.g. the dot product of U and V is equal to the magnitude of vector U (denoted 'u') times the magnitude of vector V (denoted 'v') times the cosine of the angle between the two vectors (denoted 'theta').
Adding the two vectors together, U+V=H, will only give you a new vector (denoted 'H') that "closes the triangle."
If you need the angle of the plane formed by points P1, P2 & P3 to plane X-Y, then you will need to take a step to compute the orientation of this P123 plane. As it turns out, the cross product of two vectors yields a new vector that is perpendicular to the plane P123. The angle between this plane, P123, and the X-Y plane is the acos of the third direction cosine in the cross product.
Vector W = U x V (Vector U cross Vector V)
This vector W is perpendicular to the plane P123. The magnitude of vector W is denoted 'w'. If the direction cosines of vector W are denoted by (a x i + b x j + c x k) then Vector W may be expressed as w x (a x i + b x j + c x k). The angle between plane P123 and the X-Y plane is then equal to the acos(c). This is not the same answer I gave earlier. The answer I gave earlier was wrong. It would have given you the complementary angle.
As with many problems in math, there are surely other methods to get the answer, but this is the most direct I can think of.
RE: Geometry/Vector
If I determine the angle between this and (x1+x2, y1+y2, 0) usig the method described by StructuralEIT, this should be the angle of the vector from the x-y plane. Is this not correct?
I'll try using a spreadsheet and see what pops up...
Dik
RE: Geometry/Vector
Force of 68K in direction of two vectors. Fy = 16.721K, Fz = 0.701K, Angle between the forces 165.876 degrees, and angle from plane = 2.40 degrees. This is supplement to 177.60 degrees calculated by method from StructuralEIT.
Spreadsheet attached...
Thanks, Dik
RE: Geometry/Vector
Let {v} be the unit vector from P2 to P3.
Then the vector angle that Dik wants is
[{u}cross{v}]/[{u}dot{v}]
The magnitude of this vector is the magnitude of the angle, and its direction is that of the normal to the plane defined by P1, P2 & P3.