A Vector-value parametric line
Download file: VectorParametricLine.pg
DOCUMENT();
loadMacros(
'PGstandard.pl', 'PGML.pl',
'parserVectorUtils.pl', 'parserParametricLine.pl',
'PGcourse.pl'
);
Preamble
The parserVectorUtils.pl
macro provides the non_zero_point3D and
non_zero_vector3D methods. The macro parserParametricLine.pl
provides the ParametricLine function used for the
answer.
Context('Vector');
Context()->variables->are(t => 'Real');
$P = non_zero_point3D();
$disp = non_zero_vector3D();
$line = ParametricLine("$P + t * $disp");
Setup
Generate a random three dimensional initial point $P
using the non_zero_point3D method, and a random three
dimensional displacement vector $disp using the
non_zero_vector3D method. Use the
ParametricLine method to create the answer which is the
parametric line through $P in the direction of
$disp.
BEGIN_PGML
Find a vector parametric equation for the line through points [`P = [$P]`] and
[`Q = [@ Point($P + $disp) @]`].
[`\vec{r}(t) =`] [_]{$line}{15}
Give A vector in the form [|<x(t), y(t), z(t)>|]*.
END_PGML
Statement
This is the problem statement in PGML.BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION ENDDOCUMENT();
Solution
A solution should be provided here.