Parametric Lines

Parametric equations: vector parametric lines

Complete Code

Download file: VectorParametricLines.pg

PG problem file

Explanation

DOCUMENT();

loadMacros(
    'PGstandard.pl',        'PGML.pl',
    'parserVectorUtils.pl', 'parserParametricLine.pl',
    'PGcourse.pl'
);

Preamble

The parserVectorUtils.pl macro is used which provides the non_zero_point3D, non_zero_vector3D, and Line methods. The parserParametricLine.pl macro is also used which provides the ParametricLine method that gives a MathObject form of a parametric line.

Context('Vector')->variables->are(t => 'Real');

$P = non_zero_point3D(-9, 9);
$V = non_zero_vector3D(-9, 9);

$general    = ParametricLine($P, $V);
$particular = Line($P, 2 * $V);

Setup

The non_zero_point3D method returns a nonzero Point in the third dimension with random coordinates that are the requested range. The accepted arguments (all of which are optional) are the minimum coordinate value (default -5), maximum coordinate value (default 5), and step size (default 1) respectively. The non_zero_vector3D method is the same but returns a Vector.

The ParametricLine method is used for a general parameterization of the line.

The Line method is used for a particular parametrization through the two points at t = 0 and t = 1.

BEGIN_PGML
a. Find any vector parametric equation for the line that goes through the points
[`[$P]`] and [`[@ Point($P + $V) @]`].

    [`\vec{L}(t) =`] [_]{$general}{20}

b. Find a vector parametric equation for the line that goes through the point
[`[$P]`] when [`t = 0`] and the point [`[@ Point($P + 2 * $V) @]`] when
[`t = 1`].

    [`\vec{L}(t) =`] [_]{$particular}{20}
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.