# 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,
z = x² - y².

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² + y² + z², find the gradient of u and use plotmtv to display this three dimensional vector field

Exercise 7 Modify Figure 7 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.

Previous Section : 2D/3D Vector Data and Raster Map
Back to CSEP