## 5. Exercises

**Exercise 1** Solutions to the diffusion partial differential equation can be expressed in
terms of the error function. Write a computer program similar to Code 2 that sequentially
displays a color raster map of the following function on the square -5 < x,y < 5 for t = .1;
t = 1.1; t= 2.1.

y = ymin
do 1 n = 0,nmax
x = xmin
do 2 m = 0,mmax
u(m,n) = (erf((x+1)/sqrt(t))-erf((x-1)/sqrt(t)))*
1 (erf((y+1)/sqrt(t))-erf((y-1)/sqrt(t)))
x = x + dx
2 continue
y = y + dy
1 continue

**Exercise 2** Use plotmtv to produce a two dimensional line drawing graphic of an
ellipse.
**Exercise 3** Use plotmtv to produce a three dimensional line drawing of a cone.

**Exercise 4** Use plotmtv to produce a wire frame representation of a paraboloid,

**Exercise 5** Use plotmtv with the option -plotall to produce a graphic of a paraboloid
intersecting a plane

**Exercise 6** Given the function u(x,y,z) = x^2 + y^2 + z^2, find the
gradient of u and use plotmtv
to display this three dimensional vector field

**Exercise 7** Modify Figure 6 so that each vector in the graphic has the same length and use
the underlying color raster map to represent the magnitude of the vector.