Problem
1.
|
Derive the vectorial equation of a straight line passing through two generic points A and B.
|
2.
|
Choose two concrete points A and B, and use that vectorial equation to obtain the parametric equation of the line.
|
3.
|
Generate a 3D plot of this line.
|
Solution
The vectorial equation of a line is the equation satisfied by the position vector of any point of this line; in this case we want to express that equation in terms of the position vectors of the points A and B. The parametric equation is obtained from the vectorial equation with the coefficients of the unit vectors.
>
|
restart;
with(Physics[Vectors]):
Setup(mathematicalnotation = true);
|
| (1.1.1) |
1. To construct the vectorial equation of the line, let and be vectors pointing to A and B. The line we want to represent with a vectorial equation is then parallel to the vector difference
| (1.1.2) |
Now let be the position vector of any point of this line. Then the vector is also parallel to the line and so to ; therefore
>
|
Eq := (r_ - A_) &x (1.1.2) = 0;
|
| (1.1.3) |
This is the vectorial equation of the line passing through A and B. The position vector of any point belonging to this line satisfies this equation.
2. To construct the parametric representation for this line, turn the generic points A and B into concrete points; that is, give values to the components of and . For example:
>
|
A_ := 2*_i - 3*_j + 4* _k;
|
| (1.1.4) |
>
|
B_ := -4* _i + 2*_j - _k;
|
| (1.1.5) |
Regardless of the values of and , for the position vector of a point of the line, we always have
>
|
r_ := x*_i + y*_j +z*_k;
|
| (1.1.6) |
Thus the vectorial equation for these particular points A and B becomes
| (1.1.7) |
Since the unit vectors [] are independent, this vectorial equation represents three equations, constituted by the coefficients of these unit vectors
>
|
map(`=`, [coeffs(lhs(Eq), [_i, _j, _k])], 0);
|
| (1.1.8) |
This is a system of three equations in terms of three unknowns x<