12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

114 • Chapter 4: GraphicsParametric PlotsYou cannot specify some surfaces explicitly as z = f(x, y). The sphere isan example of such a plot. As for two-dimensional graphs (see Section 4.1),one solution is a parametric plot. Make the three coordinates, x, y, andz, functions of two parameters, for example, s and t. You can specifyparametric plots in three dimensions by using the following syntax.plot3d( [ x-expr, y-expr, z-expr ],parameter1=range, parameter2=range )Here are two examples.> plot3d( [ sin(s), cos(s)*sin(t), sin(t) ],> s=-Pi..Pi, t=-Pi..Pi );> plot3d( [ s*sin(s)*cos(t), s*cos(s)*cos(t), s*sin(t) ],> s=0..2*Pi, t=0..Pi );Spherical CoordinatesThe Cartesian (ordinary) coordinate system is only one of many coordinatesystems in three dimensions. In the spherical coordinate system,the three coordinates are the distance r to the origin, the angle θ in thexy-plane measured in the counterclockwise direction from the x-axis, andthe angle φ measured from the z-axis.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!