A Vector-value parametric line
Download file: VectorParametricLine.pg
DOCUMENT(); loadMacros( 'PGstandard.pl', 'PGML.pl', 'parserVectorUtils.pl', 'parserParametricLine.pl', 'PGcourse.pl' );
Preamble
The macro parseVectorUtils.pl
provides random points. The macro parseParametricLine.pl
provides the ParametricLine
function which will be the answer.
Context('Vector'); Context()->variables->are(t => 'Real'); $P = non_zero_point3D(); $disp = non_zero_vector3D(); $Q = Point($P + $disp); $line = ParametricLine("$P+t *$disp");
Setup
We randomize two points in three-dimensional space, P
and Q
, a displacement vector between them, and a speed to travel between them.
BEGIN_PGML Find a vector parametric equation for the line through points [` P = [$P] `] and [` Q = [$Q] `]. [` \vec{r}(t) = `] [___]{$line} A vector should be entered like <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.