☖ Home Units Converter Geometry Σ Math Physics Electricity

Line 3D geometry - calculator

Print midline calculator
Line defined by 2 points Point P1(x1,y1,z1) ( , , )
Point P2(x2,y2,z2) ( , , )
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
3D lines summary Direction angles Distance between two 3D lines Presentation of 3D lines
Example 1 Example 2

3D lines summary

Print 3D lines summary
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 P0 and P1 are proportional to those determined by P1 and P2. 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 (a1, b1, c1) and (a2, b2, c2) are perpendicular
to each other if and only if:
Two lines are parallel if:

Direction angles, direction cosines and direction numbers

Print 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.

Presentation of 3D lines

Print Example 3

A 3D line can be presented by several methods, the most frequent way is by parametric equations or by the classical form, another way is by vector notations, the line can also be presented by defining two points along the line.

1.
Parametric equations
x=x_1+a_1 t y=y_1+b_1 t z=z_1+c_1 t
x1 , y1 , z1
A point on the line
a1 , b1 , c1
Direction numbers
2.
The classical equations
(x-x_1)/a_1 =(y-y_1)/b_1 =(z-z_1)/c_1

The parametric and the classic presentation of the line are actually the same, to show this we take the values of the division of x, y and z as equal to t:

(x-x_1)/a_1 =(y-y_1)/b_1 =(z-z_1)/c_1=t
(x-x_1)/a_1 =t  (y-y_1)/b_1 =t  (z-z_1)/c_1 =t
x-x_1=a_1 t  y-y_1=b_1 t  z-z_1=c_1 t
x=x_1+a_1 t  y=y_1+b_1 t  z=z_1+c_1 t

And we receive again the parametric equations of the line, different values of  t  describes different points along the line.

Notice that when a direction number is 0 let say  a1 = 0  the  x  term will be:
(x-x_1)/0

This is incorrect mathematically, but in the line notation it means that  x = x1  and the line; is located on a plane parallel to the  y-z  axis.

If two direction numbers, let say  a1 = b1 = 0 , the line is parallel to the z axis. All 3 direction numbers can not be 0 as there will be no line but only a point.

3.
The vector notation
r ⃗_1=a ⃗_1+b ⃗_1=xi+yj+zk+(v_x i+v_y j+v_z k)

Notice that r1 is a location of a point on the line and e1 (in the parenthesis) defines the direction numbers of the line.

4.
Lines defined by 4 points
r ⃗_1=a ⃗_1+b ⃗_1=xi+yj+zk+(v_x i+v_y j+v_z k)

This method also includes one point (x1, y1, z1) but this time we must calculate the direction numbers for line L1:

a_1=x_2-x_1  b_1=y_2-y_1  c_1=z_2-z_1

3D lines - Example 1

Print 3D lines Example 1
Question:
Find (a) the parametric equations of the line passing through the points P1(3, 1, 1) and P2(3, 0, 2). and also find  (b) a point on the line that is located at a distance of 2 units from the point (3, 1, 1).
Solution:
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:

3D lines - Example 2

Print Example 2
Question:
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).
Solution:
The direction numbers (values of t) of the given A B line are:
The required line that passes through point (1, 1, ⎯ 2) is: