ImplicitPlane1: Difference between revisions
No edit summary |
(Removes the AnswerFormatHelp macro and some other cleanup.) |
||
Line 43: | Line 43: | ||
loadMacros( | loadMacros( | ||
'PGstandard.pl', | |||
'MathObjects.pl', | |||
'parserImplicitPlane.pl', | |||
'parserVectorUtils.pl', | |||
'PGML.pl', | |||
'PGcourse.pl' | |||
); | ); | ||
Line 56: | Line 57: | ||
<p> | <p> | ||
<b>Initialization:</b> | <b>Initialization:</b> | ||
* The <tt>parserVectorUtils.pl</tt> macro is used for the <tt>non_zero_point3D</tt> function below. | |||
* The <tt>parserImplicitPlane.pl</tt> macro includes the context and the <tt>ImplicitPlane</tt> function to parse and create implicit planes. | |||
</p> | </p> | ||
</td> | </td> | ||
Line 66: | Line 70: | ||
<td style="background-color:#ffffdd;border:black 1px dashed;"> | <td style="background-color:#ffffdd;border:black 1px dashed;"> | ||
<pre> | <pre> | ||
Context( | Context('ImplicitPlane'); | ||
Context()->variables->are(x=>'Real',y=>'Real', z=> 'Real'); | |||
$A = non_zero_point3D(-5,5,1); | $A = non_zero_point3D(-5,5,1); | ||
Line 72: | Line 77: | ||
$answer1 = ImplicitPlane($A,$N); | $answer1 = ImplicitPlane($A,$N); | ||
$answer2 = ImplicitPlane('4x+3y=12'); | |||
$answer3 = ImplicitPlane('x=3'); | |||
$answer2 = ImplicitPlane( | |||
$answer3 = ImplicitPlane( | |||
</pre> | </pre> | ||
</td> | </td> | ||
Line 96: | Line 97: | ||
<td style="background-color:#ffdddd;border:black 1px dashed;"> | <td style="background-color:#ffdddd;border:black 1px dashed;"> | ||
<pre> | <pre> | ||
BEGIN_PGML | |||
a. Enter an equation for the plane through the point [` [$A] `] and perpendicular to [` [$N] `]. | |||
the point | + [______________]{$answer1} | ||
b. Enter an equation for the line in the [` xy `]-plane with [` x `]-intercept [` 3 `] and [` y `]-intercept [` 4 `]. | |||
+ [______________]{$answer2} | |||
xy-plane with x-intercept | |||
y-intercept | |||
$ | |||
c. Enter an equation for the vertical line in the [` xy `]-plane through the point [` (3,1) `]. | |||
+ [______________]{$answer3} | |||
$ | |||
[@ helpLink('equation') @]* | |||
END_PGML | |||
</pre> | </pre> | ||
<td style="background-color:# | <td style="background-color:#ffcccc;padding:7px;"> | ||
<p> | <p> | ||
<b> | <b>Main Text:</b> | ||
</p> | </p> | ||
</td> | </td> | ||
</tr> | </tr> | ||
<tr valign="top"> | <tr valign="top"> | ||
<td style="background-color:#ddddff;border:black 1px dashed;"> | <td style="background-color:#ddddff;border:black 1px dashed;"> | ||
<pre> | <pre> | ||
BEGIN_PGML_SOLUTION | |||
Solution explanation goes here. | Solution explanation goes here. | ||
END_PGML_SOLUTION</pre> | |||
</pre> | |||
<td style="background-color:#ddddff;padding:7px;"> | <td style="background-color:#ddddff;padding:7px;"> | ||
<p> | <p> |
Revision as of 16:02, 10 March 2023
Answer is an Equation for a Line or Plane

This PG code shows how to define an answer that is a line or plane.
- File location in OPL: FortLewis/Authoring/Templates/DiffCalcMV/ImplicitPlane1.pg
- PGML location in OPL: FortLewis/Authoring/Templates/DiffCalcMV/ImplicitPlane1_PGML.pg
PG problem file | Explanation |
---|---|
Problem tagging: |
|
DOCUMENT(); loadMacros( 'PGstandard.pl', 'MathObjects.pl', 'parserImplicitPlane.pl', 'parserVectorUtils.pl', 'PGML.pl', 'PGcourse.pl' ); TEXT(beginproblem()); |
Initialization:
|
Context('ImplicitPlane'); Context()->variables->are(x=>'Real',y=>'Real', z=> 'Real'); $A = non_zero_point3D(-5,5,1); $N = non_zero_vector3D(-5,5,1); $answer1 = ImplicitPlane($A,$N); $answer2 = ImplicitPlane('4x+3y=12'); $answer3 = ImplicitPlane('x=3'); |
Setup:
The first answer is a standard mulitivariable calculus question. There are several different ways to specify the input to
When the |
BEGIN_PGML a. Enter an equation for the plane through the point [` [$A] `] and perpendicular to [` [$N] `]. + [______________]{$answer1} b. Enter an equation for the line in the [` xy `]-plane with [` x `]-intercept [` 3 `] and [` y `]-intercept [` 4 `]. + [______________]{$answer2} c. Enter an equation for the vertical line in the [` xy `]-plane through the point [` (3,1) `]. + [______________]{$answer3} [@ helpLink('equation') @]* END_PGML |
Main Text: |
BEGIN_PGML_SOLUTION Solution explanation goes here. END_PGML_SOLUTION |
Solution: |