Difference between revisions of "SpacecurveGraph1"
(Created page with '<h2>Interactive Graph of a Parametric Curve in 3D Space</h2> 300px|thumb|right|Click to enlarge <p style="background-color:#f9f9f9;border:black sol…') |
(add historical tag and give links to newer problems.) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | <h2>Interactive Graph of a Parametric Curve in 3D Space</h2> |
||
+ | {{historical}} |
||
+ | |||
+ | <p style="font-size: 120%;font-weight:bold">This problem has been replaced with [https://openwebwork.github.io/pg-docs/sample-problems/Parametric/SpaceCurve.html a newer version of this problem]</p> |
||
+ | |||
+ | <h2>Deprecated: Interactive Graph of a Parametric Curve in 3D Space</h2> |
||
[[File:SpacecurveGraph1.png|300px|thumb|right|Click to enlarge]] |
[[File:SpacecurveGraph1.png|300px|thumb|right|Click to enlarge]] |
||
<p style="background-color:#f9f9f9;border:black solid 1px;padding:3px;"> |
<p style="background-color:#f9f9f9;border:black solid 1px;padding:3px;"> |
||
− | This PG code shows how to make an interactive graph of a parametric curve in 3D space that is displayed using the LiveGraphics3D Java applet. |
+ | This PG code shows how to make an interactive graph of a parametric curve in 3D space that is displayed using the LiveGraphics3D Java applet. It is deprecated because Java is no longer universally supported on all web browsers and platforms. |
</p> |
</p> |
||
− | * Download file: [[File:SpacecurveGraph1.txt]] (change the file extension from txt to pg when you save it) |
||
+ | * File location in OPL: [https://github.com/openwebwork/webwork-open-problem-library/tree/master/OpenProblemLibrary/FortLewis/Authoring/Templates/Parametric/SpacecurveGraph1 FortLewis/Authoring/Templates/Parametric/SpacecurveGraph1/SpacecurveGraph1.pg] |
||
− | * File location in NPL: <code>FortLewis/Authoring/Templates/Parametric/SpacecurveGraph1/SpacecurveGraph1.pg</code> |
||
<br clear="all" /> |
<br clear="all" /> |
||
Line 148: | Line 151: | ||
Context()->texStrings; |
Context()->texStrings; |
||
BEGIN_SOLUTION |
BEGIN_SOLUTION |
||
− | ${PAR}SOLUTION:${PAR} |
||
Solution explanation goes here. |
Solution explanation goes here. |
||
END_SOLUTION |
END_SOLUTION |
||
Line 171: | Line 173: | ||
[[Category:Top]] |
[[Category:Top]] |
||
− | [[Category: |
+ | [[Category:Sample Problems]] |
+ | [[Category:Subject Area Templates]] |
Latest revision as of 06:48, 18 July 2023
This problem has been replaced with a newer version of this problem
Deprecated: Interactive Graph of a Parametric Curve in 3D Space
This PG code shows how to make an interactive graph of a parametric curve in 3D space that is displayed using the LiveGraphics3D Java applet. It is deprecated because Java is no longer universally supported on all web browsers and platforms.
- File location in OPL: FortLewis/Authoring/Templates/Parametric/SpacecurveGraph1/SpacecurveGraph1.pg
PG problem file | Explanation |
---|---|
Problem tagging: |
|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "LiveGraphicsParametricCurve3D.pl", ); TEXT(beginproblem()); |
Initialization:
We need to include the macro file |
Context("Numeric"); Context()->variables->are(x=>"Real",y=>"Real",z=>"Real",t=>"Real"); $plot = ParametricCurve3D( Fx => Formula("t*cos(t)"), Fy => Formula("t*sin(t)"), Fz => Formula("t"), tvar => "t", tmin => 0, tmax => 10, tsamples => 50, axesframed => 1, xaxislabel => "X", yaxislabel => "Y", zaxislabel => "Z", outputtype => 4, ); |
Setup:
We generate a string of plot data using
Setting |
Context()->texStrings; BEGIN_TEXT \{ Live3Ddata( $plot, image => "spiral.png", size => [400,400], tex_size => 600, tex_center => 1, scale => 1.1, ); \} END_TEXT Context()->normalStrings; |
Main Text:
To display the string of plot data
After you construct the graph you like, don't forget to take a screen shot of it and make an image file such as |
$showPartialCorrectAnswers = 1; |
Answer Evaluation: |
Context()->texStrings; BEGIN_SOLUTION Solution explanation goes here. END_SOLUTION Context()->normalStrings; COMMENT('MathObject version.'); ENDDOCUMENT(); |
Solution: |