Graphing Explicit Surfaces
by
x-Slices and y-Slices

by
K. D.  Stroyan
University of Iowa

copyright 1997 by Academic Press, Inc. - All rights reserved.

Special Mathematica Functions used in this NoteBook

SpaceCurve[ fun:{_, _, _}, ul:{_, u0_, u1_, du_}, opts___] :=
	Show[ Graphics3D[Line[Table[N[fun], ul]]], opts,ViewPoint->{5,2,1} ] /;
			NumberQ[N[u0]] && NumberQ[N[u1]] && NumberQ[N[du]]

SpaceCurve[fun_, {u_, u0_, u1_}, opts___] :=
Module[{plotpoints},
    plotpoints = PlotPoints /. {opts} /. Options[Plot3D];
	SpaceCurve[ fun, {u, u0, u1, (u1-u0)/(plotpoints-1)}, opts ]
    ]

Notebook Overview

This NoteBook draws the x-slices along a surface  z = f[x,y]  where  y  is held fixed and the  y-slices along the surface where  x  is held fixed.  This is one basic way to build a surface graph.  It is hard to do by hand.

References to the Text

This NoteBook goes with Chapter 17 of the text.

Step-by-step: Example 17.1
Slices of  z = (x^2) + ((y^2)/2)

The next cell computes the slices of the surface described in text Example 17.1

\(Clear[x, y, z, s, t, c]; 
z := x\^2 + y\^2\/2; 
\(x := s; \)\)y := t; web = {}; \(Do[c[s] = 
        SpaceCurve[{x, y, z}, {t, \(-1\), 1}, 
          PlotRange -> {{\(-1\), 1}, {\(-1\), 1}, {0, 2}}, 
          BoxRatios -> {1, 1, 1}, DisplayFunction -> Identity]; 
      AppendTo[web, c[s]]; 
      \(Show[web, DisplayFunction -> $DisplayFunction]; \)

      	, {s, \(-1\), 1,  .2}]; 

    Do[c[t] = 
        SpaceCurve[{x, y, z}, {s, \(-1\), 1}, 
          PlotRange -> {{\(-1\), 1}, {\(-1\), 1}, {0, 2}}, 
          BoxRatios -> {1, 1, 1}, DisplayFunction -> Identity]; 
      AppendTo[web, c[t]]; 
      \(Show[web, DisplayFunction -> $DisplayFunction]; \)

      	, {t, \(-1\), 1,  .2}]; \)

ParametricPlot3D[{x, y, z}, {s, -1, 1}, {t, -1, 1}, 
      ViewPoint -> {5, 2, 1}];

Exercise 17.2.1: Explicit Surface Slices

The program above will help you verify your hand computation of the slices of the functions in this text exercise.  Simply copy the program and replace the z-equation.

a)  z = -x - (y/2)

b)  z = (x^2) - (y/2)

c) z = (x^2) - ((y^2)/2)

d)  z = (x^3) - 3 x (y^2)