ImplicitPlane: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 4: | Line 4: | ||
<em>This shows the PG code to evaluate answers that are planes defined implicitly by an equation.</em> | <em>This shows the PG code to evaluate answers that are planes defined implicitly by an equation.</em> | ||
</p> | </p> | ||
<p style="text-align:center;"> | <p style="text-align:center;"> | ||
| Line 105: | Line 100: | ||
[[IndexOfProblemTechniques|Problem Techniques Index]] | [[IndexOfProblemTechniques|Problem Techniques Index]] | ||
</p> | </p> | ||
<ul> | |||
<li>POD documenatation: http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/parserImplicitPlane.pl</li> | |||
<li>PG code: http://cvs.webwork.rochester.edu/viewcvs.cgi/pg/macros/parserImplicitPlane.pl</li> | |||
</ul> | |||
[[Category:Problem Techniques]] | [[Category:Problem Techniques]] | ||
Revision as of 22:29, 22 January 2010
Planes Defined Implicitly
This shows the PG code to evaluate answers that are planes defined implicitly by an equation.
| PG problem file | Explanation |
|---|---|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "parserImplicitPlane.pl", "parserVectorUtils.pl", "PGcourse.pl", ); TEXT(beginproblem); |
Initialization:
In particular, we need to include the |
Context("ImplicitPlane");
# Vectors in the plane
$AB = non_zero_vector3D();
$AC = non_zero_vector3D();
while (areParallel $AB $AC) {$AC = non_zero_vector3D()}
# The normal vector
$N = cross $AB $AC; # or $N = $AB x $AC;
# The points A, B and C
$A = non_zero_point3D();
$B = Point($A + $AB);
$C = Point($A + $AC);
|
Setup: Create points and vectors. Make sure that the vectors are not parallel. |
Context()->texStrings;
BEGIN_TEXT
An implicit equation for the plane passing through the points
\($A\), \($B\), and \($C\) is \{ans_rule(40)\}.
END_TEXT
Context()->normalStrings;
|
Main Text: Self-explanatory. |
ANS(ImplicitPlane($A,$N)->cmp); $showPartialCorrectAnswers = 1; ENDDOCUMENT(); |
Answer Evaluation: Just specify a point $A and a normal vector $N. |