MuPAD Pro Computing Essentials, 2nd Edition

Example 8.8 Class Surface

In this example I show how the Surface class can be used to develop plot of a surface given by parametric equations. Here I developed graph of a sphere.

g := (x,y,z)->[
   abs(sin(5*x)),
   abs(sin(5*y)),
   abs(sin(5*z))
]:
 
Sphere := plot::Surface(
   [2*sin(t)*cos(u), 2*sin(t)*sin(u), 2*cos(t)],
   t = 0..PI, u = 0..2*PI,
   Mesh = [50,50],
   FillColorFunction = g
):

plot(Sphere, Scaling = Constrained)
 
Loading sample geometry.

JavaView Display

Use the mouse pointer to rotate the graphics. Right click on the picture will open a menu where we can select rotations, scaling, moving and a few other options.

More features of this graphics can be examined using full JavaView applet >>


© Miroslaw Majewski, Abu Dhabi,  Update  26-10-2004