Line 3D geometry - defined by 2 points
Line defined by 2 points
Point P
1
(x
1
,y
1
,z
1
)
(
,
,
)
Point P
2
(x
2
,y
2
,z
2
)
(
,
,
)
Distance from
P1 to P2
Line spherical angles
Parametric
equation of the line
x =
+
t
y =
+
t
z =
+
t
If t =
The equivalent point on the line is:
If t =
The equivalent point on the line is:
Line equation
x +
=
y +
=
z +
Direction angles
Direction cosines
Degree
Radian
3D lines
Distance between two points
and
Line passing through two points
and
A point P(x, y, z) is on the line L if and only if the direction numbers determined by P
0
and P
1
are proportional to those determined by P
1
and P
2
. If the proportionality constant is t we see that the conditions are:
The two points of the parametric equation of a line are:
(1)
The parametric equations of a line L through the point
with direction numbers a, b and c are given by the equations:
(2)
Two points formed by the equation of a line also may be written symmetrically as:
Two lines with slopes of (a
1
, b
1
, c
1
) and (a
2
, b
2
, c
2
) are perpendicular
to each other if and only if:
Two lines are parallel if:
Finding the distance
d
between 2 lines L
1
and L
2
that are given by the parametric equations:
L
1
L
2
Step (1) Calculate the
cross product
of the
direction numbers
, the result is a
vector
perpendicular to both lines:
Step (2) Find the norm of the vector (is a scalar value):
Step (3) The unit vector in this direction is:
Step (4) Find a point P on L
1
where t = 0:
Step (5) Find a point Q on L
2
where s = 0:
Step (6) Find vector PQ connecting P to Q by subtracting (Q ⎯ P):
PQ = [(x
1
- x
0
), (y
1
- y
0
), (z
1
- z
0
)]
Step (7) The absolute value of the
dot product
of n with PQ will give the required distance d between the lines:
Example 1:
Find a) the parametric equations of the line passing through the points P
1
(3, 1, 1) and P
2
(3, 0, 2). b) Find a point on the line that is located at a distance of 2 units from the point (3, 1, 1).
a) from equation (1) we obtain the parametric line equations:
Any additional point on this line can be described by changing the value of t for example t = 2 gives the point (3, ⎯ 1, 3) which is located on the line.
b) distance from any point (x, y, z) to the point (3, 1, 1) is:
Replace x, y and z by their parametric values gives:
Substituting the value of t in the parametric line equations yields the required point which can be located on either side of the line:
Example 2:
Find the equation of the line that passes through the point (1, 1, ⎯ 2) and is parallel to the line that connects the points
A(1, 2, 3) and B(2, 0, 4).
The direction numbers (values of t) of the given A B line are:
The required line that passes through point (1, 1, ⎯ 2) is:
Example 3:
Find the distance between the lines:
Two lines calculator
Step (1) Cross product of the direction numbers is:
Step (2) The norm of the vector is:
Step (3) The unit vector in the line direction:
Step (4) A point P on L
1
where t = 0 is at: (3, ⎯ 2, 5)
Step (5) A point Q on L
2
where s = 0 is at: (3, 2, ⎯ 1)
Step (6) (Q ⎯ P) = (0, 4 ⎯ 6)
Step (7) Finally the distance between the lines is:
Direction angles, direction cosines and direction numbers
A line has two sets of
direction angles
according to the pointing direction of the line
If α, β, γ are the direction angles of a line then the
direction cosines
are:
and:
If d is the length of the line, then the direction cosines values are:
The
direction numbers
are the length of the line projected on the 3 axes x, y and z and their values are
a, b
and
c
.