Difference between revisions of "3DGraphsParametricCurves"
(New page: <h2>Interactive Graphs of Parametric Curves in Three Dimensions</h2> <!-- Header for these sections -- no modification needed --> <p style="background-color:#eeeeee;border:black solid...) |
(added historical tag and gave updated problem link) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{historical}} |
||
+ | |||
+ | <p style="font-size: 120%;font-weight:bold">This problem has been replaced with [https://openwebwork.github.io/pg-docs/sample-problems/Parametric/SpaceCurveGraph.html a newer version of this problem]</p> |
||
<h2>Interactive Graphs of Parametric Curves in Three Dimensions</h2> |
<h2>Interactive Graphs of Parametric Curves in Three Dimensions</h2> |
||
Line 4: | Line 7: | ||
<p style="background-color:#eeeeee;border:black solid 1px;padding:3px;"> |
<p style="background-color:#eeeeee;border:black solid 1px;padding:3px;"> |
||
− | <em>This PG code shows how to generate interactive graphs of |
+ | <em>This PG code shows how to generate interactive graphs of parametric curves from MathObjects formulas. It uses the Java applet LiveGraphics3D to display the interactive graph.</em> |
</p> |
</p> |
||
Latest revision as of 10:03, 29 June 2023
This problem has been replaced with a newer version of this problem
Interactive Graphs of Parametric Curves in Three Dimensions
This PG code shows how to generate interactive graphs of parametric curves from MathObjects formulas. It uses the Java applet LiveGraphics3D to display the interactive graph.
PG problem file | Explanation |
---|---|
DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "parserVectorUtils.pl", "PGcourse.pl", "LiveGraphicsParametricCurve3D.pl", ); TEXT(beginproblem()); |
Initialization:
We need to include the macros 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; ENDDOCUMENT(); |
Answer Evaluation: Nothing happening here. |