LearningGuide

# The code is available in both html and maple

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: [arrow]( [&lt;2, 1&gt;, &lt;3, 2&gt;], [&lt;2, 5&gt;, &lt;1, 4&gt;], difference, &gt; scaling=constrained ); 5 4 3 2 1 1 1.5 2 2.5 3 For a listing of other available plot types, enter ?plots at the Maple prompt. Visualization Component of the Student Package The Student package is a collection of subpackages designed to assist with the teaching and learning of standard undergraduate mathematics. There are many routines for displaying functions, computations, and theorems. For example, in the Student[Calculus1] subpackage, the visualization routines are designed to assist in the understanding of basic calculus concepts. The following is an example of the Student[Calculus1][DerivativePlot] command. The DerivatePlot(f(x),x=a..b) command plots an expression and its derivatives. &gt; with(Student[Calculus1]): &gt; f := proc() evalf(sqrt(rand()/10^12)) end proc: &gt; colors := proc() COLOR(RGB, f(), f(), f()) end proc: 144 • Chapter 5: Plotting &gt; DerivativePlot(sin(0.98*x), x=0..10, order=1..20, &gt; derivativecolors=colors ); DerivativesofVariousOrderof f(x)=sin(.98*x) ontheInterval[0,10] 1 0.5 0 –0.5 –1 2 4 x 6 8 10 f(x) 1stderivative 20thderivative For a complete list of visualization routines in the Student subpackages, refer to the ?Student help page and select a subpackage link. 5.7 Manipulating Graphical Objects The plottools package contains commands for creating graphical objects and manipulating their plots. Use with(plottools) to access the commands using the short names. &gt; with(plottools): Using the display Command The objects in the plottools package do not automatically display. You must use the display command, deﬁned in the plots package. &gt; with(plots): &gt; display( dodecahedron(), scaling=constrained, style=patch ); 5.7 Manipulating Graphical Objects • 145 Sphere Before manipulating the following sphere, assign a name. &gt; s1 := sphere( [3/2,1/4,1/2], 1/4, color=red): Note: In the sphere example, the assignment ends with a colon (:). If you use a semicolon (;), Maple displays a large plot structure. To display the plot, use the display command. &gt; display( s1, scaling=constrained ); Place a second sphere in the picture and display the axes. &gt; s2 := sphere( [3/2,-1/4,1/2], 1/4, color=red): &gt; display( [s1, s2], axes=normal, scaling=constrained ); 146 • Chapter 5: Plotting –0.4 0.6 –0.2 0.4 0 1.3 0.2 1.4 0.4 1.5 1.6 1.7 Cones You can also make cones with the plottools package. &gt; c := cone([0,0,0], 1/2, 2, color=khaki): &gt; display( c, axes=normal ); –0.4 –0.2 0.4 2 1.5 1 0.5 0.2 0.2 –0.4 –0.2 0.4 Rotation Experiment using Maple object rotation capabilities. &gt; c2 := rotate( c, 0, Pi/2, 0 ): &gt; display( c2, axes=normal ); –2 –1 –0.4 –0.5 –0.2 –0.2 0.2 0.4 –0.4 0.4 0.2 –1.5 Translation You can also translate objects. &gt; c3 := translate( c2, 3, 0, 1/4 ): &gt; display( c3, axes=normal ); 5.7 Manipulating Graphical Objects • 147 0.6 0.4 –0.4 –0.20.2 0 0.2 1 0.4 –0.2 1.5 2 2.5 3 Hemisph...
View Full Document

Ask a homework question - tutors are online