The code is available in both html and maple

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: [arrow]( [<2, 1>, <3, 2>], [<2, 5>, <1, 4>], difference, > 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. > with(Student[Calculus1]): > f := proc() evalf(sqrt(rand()/10^12)) end proc: > colors := proc() COLOR(RGB, f(), f(), f()) end proc: 144 • Chapter 5: Plotting > DerivativePlot(sin(0.98*x), x=0..10, order=1..20, > 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. > with(plottools): Using the display Command The objects in the plottools package do not automatically display. You must use the display command, defined in the plots package. > with(plots): > display( dodecahedron(), scaling=constrained, style=patch ); 5.7 Manipulating Graphical Objects • 145 Sphere Before manipulating the following sphere, assign a name. > 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. > display( s1, scaling=constrained ); Place a second sphere in the picture and display the axes. > s2 := sphere( [3/2,-1/4,1/2], 1/4, color=red): > 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. > c := cone([0,0,0], 1/2, 2, color=khaki): > 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. > c2 := rotate( c, 0, Pi/2, 0 ): > 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. > c3 := translate( c2, 3, 0, 1/4 ): > 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