Math 2248 Lab 3:
Trace Plots of Quadric Surfaces

© Copyright by T.I. Lakoba,
with help from Helen P. Read.
Last modified  2025-09-16

It is imperative that when you are working on this Lab, you refer to Lab 1 for the material about parametric plots.

Clear["`*"]

Introduction: Traces of quadric surfaces

The idea of this Lab is to teach you how to visualize a surface in 3D by considering its cross-sections with certain planes. Such cross-sections are called traces. We will focus on the so-called quadric surfaces, which are so named because they are described by one or another special case of the following quadratic expression:

A (x^2) + B (y^2) + C (z^2) + Dxy + Exz + Fyz + Gx + Hy + Iz + J = 0 ,

where  A  through  J  are constant coefficients. 

Of course, with a tool as powerful as Mathematica, one could graph surfaces by simply using  one of its 3D-plotting commands, e.g.:

Plot3D[x^2+3*y^2,{x,-5,5},{y,-3,3}]

Here is a better plot of the same; it uses a more natural plotting domain:

Plot3D[x^2+3*y^2,{x,-5,5},{y,-3,3},RegionFunction->Function[{x,y,z},x^2+3y^2≤25]]

The intention of this Lab is to show that even when you do not have Mathematica at your disposal, you should still be able to plot 3D surfaces by plotting their traces.


Example: 
Sketch the surface whose equation is   z =  0.5  ( (x^2) + (y^2)) .
Below I describe the solution to this problem step by step. You are supposed to follow similar lines when doing the exercises.

First, consider traces in the cross-section of this surface with the planes  z=k (=const).
Verify (yes, do it!) that by setting  z=k  in the equation of the surface, one  obtains  (x^2) + (y^2) = 2k , which for  k>0  describes a circle. We will now plot our first trace, which will be the circle obtained for  z (= k) = 0.2 :

z=0.2;   
(* This and other values of z in this Example were chosen to make the final graph appear neat. *)
p1=ParametricPlot3D[ {Sqrt[2z]*Cos[t],Sqrt[2z]*Sin[t],z}, {t,0,2*Pi}]

Several remarks are in order:
	1) Note that we have used the parametric equations of the circle as shown in Lab 1, Part 1, Equations (E-2) and (E-3); see also a related “Practice on your own” question there. You have done similar work (except that it was for hyperbolas) in Ex. 2(a) of Lab 1, Part 2. (If you did not do that part correctly, see the posted solution.) 
Now, take a piece of paper and  derive yourself  the parametric equations in the plotting command above from the equation  (x^2) + (y^2) = 2 z . Consult Notes for Sec. 12.6 if you have any difficulty. You will have to repeat a similar step multiple times throughout this Lab, so do not proceed until you fully understand how it was done here.
	2) The reason why our plotting command begins with “p1 = ...” as opposed to just “ParametricPlot3D[...” is that we will later plot several of these circles (our traces) together for different values of  k. All the plots will later be combined using the command  Show,  as was described in the rubric on the  Plot  command in Lab 1, Part 2. 
	3) Note that while there are two commands above: one defining  z  and the other, defining p1, only one output is shown (the one for the plot). This is because the semicolon after a command suppresses its output. If you want both outputs to be shown, hit “Enter” (without “Shift”) after the first one, and type the second on the next line:

z=0.2
p1=ParametricPlot3D[ {Sqrt[2z]*Cos[t],Sqrt[2z]*Sin[t],z}, {t,0,2*Pi}]

Continuing with our Example, we plot:

z=0.8; p2=ParametricPlot3D[ {Sqrt[2z]*Cos[t],Sqrt[2z]*Sin[t],z}, {t,0,2*Pi}];

Food for thought:
Why is there no output for this input?

Continuing further, we define:

z=1.5; p3=ParametricPlot3D[ {Sqrt[2z]*Cos[t],Sqrt[2z]*Sin[t],z}, {t,0,2*Pi}];

z=3; p4=ParametricPlot3D[ {Sqrt[2z]*Cos[t],Sqrt[2z]*Sin[t],z}, {t,0,2*Pi}];

z=5; p5=ParametricPlot3D[ {Sqrt[2z]*Cos[t],Sqrt[2z]*Sin[t],z}, {t,0,2*Pi}];

z=9; p6=ParametricPlot3D[ {Sqrt[2z]*Cos[t],Sqrt[2z]*Sin[t],z}, {t,0,2*Pi}];

pall = Show[{p1,p2,p3,p4,p5,p6},PlotRange->All]
(* The reason we gave a name to the entire plot is that later, we will plot it along with some new graphs. *)

Practice on your own:
Investigate the effect of the option  PlotRange->All  by copying the last command, but leaving out that option. You will need this in this and future Labs.

It is evident that for  k<0 , the surface   (x^2) + (y^2)= 2k  does not exist, so we do not need to consider traces for  k<0 .


Now, consider cross-sections of the same surface by planes  x=k (=const). Their equation is   z= 0.5 ( (k^2)+  (y^2)) . These are parabolas in the  yz-plane, pointing upwards and raised by   0.5  (k^2).  Let us make plots of some of them:

x=0; q1=ParametricPlot3D[ {x,y,0.5*(y^2+x^2)}, {y,-4,4}]

Note that the parametric form of a parabola, unlike that of the other curves considered in Lab 1, is very straightforward: simply use the independent variable (in this case,  y ,  as the parameter).

Here is a technical consideration that you will encounter when doing the exercises in this Lab: “How do I guess a “good” range for the independent variable?” ( -4 < y < 4  in this case). The answer is: “by trial and error, but there are some vague guidelines.” Namely, for plotting a parabola, a reasonable range to start with is [-5,5]; then you can adjust it if need be. For plotting a hyperbola using its parametric equations with parameter  t,  a reasonable range for  t  to start the exploration is [-2,2] or [-3,3].  (The reason this range is smaller than that for a parabola is that  t  is the argument of an exponential function, which grows very fast. E.g.:  Cosh 3 > 10.)  Basically, the range should be such that the plot would show all essential details of the surface in question. Please note: I will reduce your score if the range is chosen poorly, i.e. if essential features of the surface cannot be easily discerned in your plot, or if it looks “untidy” (more information on trimming your plot is found below). 


Continuing with other traces by the planes  x=k (=const) , we will suppress their outputs, because they all look qualitatively the same. We will make all the plots visible again when we later show them together in one plot. You need to “Shift+Enter” only once (anywhere) in the large Input box below:

x=1; q2=ParametricPlot3D[ {x,y,0.5*(x^2+y^2)}, {y,-4,4}];
x=2; q3=ParametricPlot3D[ {x,y,0.5*(x^2+y^2)}, {y,-4,4}];
x=3; q4=ParametricPlot3D[ {x,y,0.5*(x^2+y^2)}, {y,-4,4}];
x=-1; q5=ParametricPlot3D[ {x,y,0.5*(x^2+y^2)}, {y,-4,4}];
x=-2; q6=ParametricPlot3D[ {x,y,0.5*(x^2+y^2)}, {y,-4,4}];

Show[pall,q1,q2,q3,q4,q5,q6]

If you see only 2 curves instead of 12, as you have probably expected, the reason is explained in the Practice on your own question above. (Annoyingly, how many curves you see by default may depend on which version of Mathematica you are using.) 

Please note: 
you won’t be able to do this Lab without fixing this problem!

You can trim the resulting plot by restricting its vertical range:

Show[pall,q1,q2,q3,q4,q5,q6,PlotRange->{0,9}]

Later in this Lab, you will learn how to limit the horizontal ranges as well.

Since  x  and  y  enter the equation   z = 0.5((x^2) + (y^2))  symmetrically, there is no need to plot traces obtained in the cross-section of the surface with planes  y=k (=const).  Indeed, such traces will look as the traces in the  x=k  planes that we have just plotted, but rotated by 90 degrees.

This surface is called a circular paraboloid. (By the way, do you know that you see dozens, if not hundreds, of paraboloids every day? Where?) 

Compare your plot above with that found on pp. 836, 837 of the textbook (8th edition). 

You can always verify whether the trace plot you obtained is correct by using the command Plot3D, mentioned at the beginning of this notebook.

Clear["`*"]

Another logistical suggestion:
You will need to look at the previous example many times when doing the Exercises. It will be rather inconvenient for you to keep scrolling up and down, going between the Example and the Exercise. It will be much more convenient to always have the Example in front of you. For that, open the Lab again, save it under a different name (you may simply not change the “_yourname” suffix at all), and open it in the Example. So, you will have two copies of the Lab open: one is where you are working and the other with the open Example.

Exercise 1

Sketch a trace plot of a  hyperboloid of two sheets:

			  (x^2)+  (y^2)- (z^2)= -1, 

which can be equivalently rewritten as

                                       (z^2) - (x^2)- (y^2)= 1.

You may use either form of this equation, as convenient.

The solution steps that you are asked to follow below are self-contained. That is, you can do this Exercise just by completing those steps and not needing to read any extra material. However, if you have difficulty following these guidelines, you should consult Notes for Sec. 12.6 and/or Part 1 of Lab 1.
(The solution to Exercise 2 of Part 2 of Lab 1, which is based on Part 1, can also be helpful.) You may also look at  Example 7 for Sec. 12.6 in the book, to see the final plot that you should expect as well as some of the details of solution of a similar (but not the same!) problem.


IMPORTANT NOTE:  Some of the curves that you will need to plot will be ellipses (perhaps, circles) and some will be hyperbolas. You MUST plot them using the parametric equations introduced in Part 1 of Lab 1. If, instead, you plot them in the Cartesian form, or even using any other parametrization, your score will be reduced even if your plots are correct.  

If, on the other hand, you need to plot a parabola, consult the Example above.  


(a)  Before you begin making plots of traces of the cross-section of this surface with planes z=k (=const) , write down the equation of such  a typical trace; it should contain only  x and  y on the left-hand side and only constants on the right-hand side. Recognize it as being the equation of one of the curves listed in Lab 1, Part 1. Also, review a similar step in the Example above. Answer the following questions in the boxes provided.

What curve is this?

Does this curve exist for all values of  k ? If not, for what values of  k does it exist?

(b)  Make plots of traces of the cross-section of this surface with planes z=k  only for those of the values of   k = -3, -2, -1.1, -0.5, 0, 0.5, 1.1, 2, 3  for which the traces exist. Follow the hints below.

Your answer in the 2nd answer box in part (a) of this Exercise should help you choose a convenient parametrization for these traces (see Lab1, Part 1).   Suggestion: In the Example preceding this Exercise, find the paragraph immediately following the command defining the plot p1. Review that paragraph and the work you did for it. You will need to do something similar here.

Make one of the traces visible and the rest invisible.

(c)  Combine all the traces you have obtained in one plot, so that all the traces are visible.

(d)  To make plots of traces of the cross-section of this surface with planes x=k (=const) , follow steps (a)--(c) above. 

Namely, to begin, write down the equation of the trace (it will contain only  y and  z  on its left and only constants on its right) and recognize this as being the equation of one of the curves listed in Lab1, Part 1. Answer the following questions in the boxes provided.

What curve is this?

Does the type (as defined in Part 1 of Lab 1) of this curve depend on whether   |k|>1  or  |k|<1 ?

(e)  Make plots of traces of the cross-section of this surface with planes  x=k  for k =  -2, -1, 0, 1, 2 . Follow the hints below.

Your answer in the 2nd answer box in part (d) of this Exercise should help you choose a convenient parametrization for these traces (see Lab 1, Part  1and make sure you put the equation of the curve into a canonical form).

Your answer in the 3rd answer box in part (d) of this Exercise should help you decide whether all of these traces will look qualitatively the same (see an explanation in the next paragraph) or whether there will be two types of traces that look qualitatively different, depending on whether  |k|>1  or |k|<1 . (Again, consult Lab 1 for the definition of “type.”) 

Here is an example illustrating what “qualitatively the same” or “qualitatively different” curves mean. Two parabolas that are shifted up or down relative to one another, e.g.,  y=(x^2)+1  and  y=(x^2)- 1,  are qualitatively the same (thus, these two curves belong to one type). On the other hand, two parabolas, one pointing up and the other pointing down or to the right or to the left, are qualitatively different, and hence belong to two qualitatively different types. 
(Recall, however, that any hyperbola has two branches that point in opposite directions. So, two such branches constitute one curve -- the hyperbola, -- rather than two qualitatively different curves.) 

How many types of qualitatively different traces do you expect to obtain?

Next, if all traces look qualitatively the same, make only one of your plots visible and the rest invisible. If there are two types of qualitatively different traces, make two visible plots and the rest invisible. 

Before you plot, review the technical note in Example about choosing the range of the independent variable for plotting your curves. However, do not spend too much time on deciding on its value right now: you will always be able to come back and change the range, if need be.

(f)  Combine all the traces you have obtained in one plot along with the traces you obtained in part (b) and make all the traces visible. 

Use the PlotRange option (see the next paragraph) to make the combined plot look presentable (a.k.a. “trim the traces in your plot”). Your score will be reduced if the plot is left not trimmed.

If you have done everything correctly, the “box” in which Mathematica plots your graph will appear substantially longer in one horizontal direction than in the other.To fix that, include the new horizontal limits into your plotting range as follows: 
PlotRange -> {{xmin,xmax},{ymin,ymax},{zmin,zmax}}.
(Recall that in the past, if you only wanted to trim your vertical limits, you would use  PlotRange -> {zmin,zmax}.)

Since   x and  y  enter the equation of this quadric surface symmetrically, there is no need to draw traces by the planes  y=k (=const) .

Finally, there comes an important step in your work: You must verify your result. You may do so in a number of ways. The easiest two are:  
(i) consulting the Table of quadric surfaces in Sec. 12.6, and 
(ii) solving for  z and then using the command Plot3D with the option RegionFunction->Function, illustrated in the Introduction. 
You may also find the correct plot of the hyperboloid of two sheets online. So, you have plenty of ways to check your answer. 
When doing so, you should pay attention to a couple of things:
   * Make sure that the graph looks like any of those described above.
   * Verify that all the curves interlace, as opposed to being detached 
     and “hanging” on their own. A good way to verify this is to rotate 
     the “box” with the graph using your mouse. 

If your plot substantially differs from the correct one, I expect you to go back and try to find and correct a mistake (or mistakes). As always, you are welcome to ask me. If nothing helps, you should still discuss this in the answer box below and propose a plausible reason why your result differs from the correct one.

Exercise 2

Repeat steps of Exercise 1 to sketch a trace plot of a hyperbolic paraboloid:

			 z =  (x^2) - (y^2) .

We will encounter this surface in this course many times and will often refer by its “common” name: a saddle. The plot that you should obtain at the end of this exercise will explain this name. 

Again, the guidelines below are self-contained, but you may consult the book as needed.


RECALL THE IMPORTANT NOTE FROM EXERCISE 1:  
Some of the curves that you will need to plot will be ellipses (perhaps, circles) and some will be hyperbolas. You MUST plot them using the parametric equations introduced in Part 1 of Lab 1. If, instead, you plot them in the Cartesian form, or even using any other parametrization, your score will be reduced even if your plots are correct. (See a section on WRONG parametric equations for hyperbolas in Part 1 of Lab 1, and do NOT use them.)  

If, on the other hand, you need to plot a parabola, consult the Example at the beginning of this Lab.  


(a)  Before you begin making plots of traces of the cross-section of this surface with planes z=k (=const), write down the equation of the trace (it will contain only  x and  y on its left and only constants on its right) and recognize this as being the equation of one of the curves from Lab 1. Answer the following questions in the boxes provided.

What curve is this?

Does the type of this curve depend on whether  k > 0  or  k < 0 ? (If you have forgotten what “type” refers to, consult Exercise 1(d) or Part 1 of Lab 1.)

(b)  Make plots of traces of the cross-section of this surface with planes  z=k  for k = -4, -2, -1, 1, 2, 4 . Follow the hints below.

Your answer in the 2nd answer box in part (a) of this Exercise should help you choose a convenient parametrization for these traces. Namely, put the equation of the curve into a canonical form and then find its parametrization in Lab 1, Part 1.  

Your answer in the 3rd answer box in part (a) of this Exercise should help you decide whether all of these traces will look qualitatively the same or whether there will be two types of traces that look qualitatively different, depending on whether  k > 0  or  k < 0. (Review the explanation of “qualitatively the same” and “qualitatively different” in Exercise 1(e) above.) If you have any difficulty, find a similar problem in Lab 1, Part 2. (If you did not do Lab 1 correctly, use my posted solutions.)

How many types of qualitatively different traces do you expect to obtain?

If all traces look qualitatively the same, make only one of your plots visible and the rest invisible. If there are two types of qualitatively different traces, make two visible plots and the rest invisible. 

Recall the earlier notes about using different names for different plots and about choosing a “good” range for the independent variable in your plots.

(c)  Combine all the traces you have obtained in one plot and make sure that all the traces are visible.
It may be a good idea to label your axes (see Exercise 1 in Lab 1, Part 2).

(d)  To make plots of traces of the cross-section of this surface with planes x=k (=const) , follow steps (a)--(c) above. Namely, to begin, write down the equation of the trace (it will contain only  y and  z on its left and only constants on its right). This curve was not listed in Lab 1, but it was encountered in the Example  preceding Exercise 1.  Answer the following questions in the boxes provided.

What curve is this?

Does the type of this curve depend on the value of  k  ?

(e)  Make plots of traces of the cross-section of this surface with planes  x=k  for k = -3, -2, -1, 0, 1, 2, 3 . Follow the hints below.

Your answer in the 2nd answer box in part (d) of this Exercise will help you choose a convenient parametrization for these traces (see the  Example ).

Your answer in the 3rd answer box in part (d) of this Exercise will help you decide whether all of these traces will look qualitatively the same or whether there will be two types of traces that look qualitatively different, depending on the value of  k.  

How many types of qualitatively different traces do you expect to obtain?

Next, if all traces look qualitatively the same, make only one of your plots visible and the rest invisible. If there are two types of qualitatively different traces, make two visible plots and the rest invisible.

(f)  Combine all the traces you have obtained in one plot along with the traces you obtained in part (b). 

Trim the traces in the horizontal directions so as to make your combined plot look presentable. As in Exercise 1(f), you will need to include the new horizontal limits into your plotting range with commands: 
PlotRange -> {{xmin,xmax},{ymin,ymax},{zmin,zmax}}.
(If you only need to trim your vertical limits, use  
PlotRange -> {zmin,zmax}.)
In either case, make sure that your PlotRange allows you (and me!) to see sufficient details of your graph.
 * Your score will be reduced if you do not make your plot presentable. 

Also:
 - make sure that your plot satisfies the criteria listed in Exercise 1(f);
 - label the plot’s axes (see Exercise 2(c)). 

The purpose of this step is to provide a check point of your work so far. You should verify that all the curves interlace, as opposed to being detached and “hanging” on their own. (You should also look at the Table in Sec. 12.6 to make sure that your hyperbolic paraboloid so far appears similar to the one shown there.) 

If you notice any problems with your plot at this stage, you should go back and try to correct those curves which seem to be “out of place.” If you try but cannot do so, you should at least identify which curves appear to be incorrect. 

Whether your plot appears to be getting correct or not, do the following:
 - Go to the drop-down menu in the upper left corner (where you can select the type of text, e.g., Input, Title, Section, Text, etc.) and select the last entry, NameBox. Left-mouse click inside that box and begin typing.
 
 - If your plot appears to be correct, type “My plot appears to be correct” in that NameBox. 
 - If your plot appears to be going in a wrong direction, present some analysis of the problem:
   * which curves appear incorrect;
   * which parts of this Exercise were they defined in;
   * what you think the problem with them could be.
   
If you proceed with a clearly incorrect plot but without such an analysis, your score will be reduced in this part, in addition to being also reduced at the end, where you will present the final plot.

(g)  Unlike the equation considered in Example and Exercise 1, in this Exercise  x and  y  do not enter the equation of this quadric surface symmetrically.  Therefore, we do need to draw traces by the planes  y=k (=const)  in this case. We proceed as before. 

Namely, to begin, write down the equation of the trace (it will contain only  x and  z on its left and only constants on its right). This curve was not listed in Lab 1, but it was encountered in the Example  preceding Exercise 1.  Answer the following questions in the boxes provided.

What curve is this?

Does the type of this conic section depend on the value of  k  ?

(h)  Make plots of traces of the cross-section of this surface with planes  y=k  for k = -3, -2, -1, 0, 1, 2, 3 . Follow the suggestions given below. 

Your answer in the 2nd answer box in part (g) of this Exercise will help you choose a convenient parametrization for these traces (see the  Example ).

Your answer in the 3rd answer box in part (g) of this Exercise will help you decide whether all of these traces will look qualitatively the same or whether there will be two types of traces that look qualitatively different, depending on the value of  k.  

How many types of qualitatively different traces do you expect to obtain?

If all traces look qualitatively the same, make only one of your plots visible and the rest invisible. If there are two types of qualitatively different traces, make two visible plots and the rest invisible.

(i)  Combine all the traces you have obtained in one plot along with the traces you obtained in parts (b) and (f) and make all the traces visible. Use the PlotRange option, if needed, to make the combined plot look presentable (a.k.a. “trim the traces”).  

You must now verify your result following the directions given in part (f) of Exercise 1.

Comment:
Near the origin, this surface resembles a saddle. Namely, the origin is a maximum if one moves parallel to the  xz-plane, but is a minimum if one moves parallel to the   yz-plane.  Such a point is called a saddle point. We will encounter it later in this course.

A note about quadric surfaces in architecture

Given how complicated the hyperbolic paraboloid that you have just constructed looks, it may seem surprising that it can also be constructed using only straight lines! More specifically, through each point on this surface, there pass exactly 2 straight lines. See # 51 for Sec. 12.6 in your textbook, as well as Wikipedia entry on so-called Ruled Surfaces:

https://en.wikipedia.org/wiki/Ruled_surface

The rubric about the Hyperbolic paraboloid is found in the middle of that page; there are many other surfaces there as well.

The fact that a hyperbolic paraboloid, or hypar, can be constructed entirely of straight beams, is one of the reasons that made it a popular element in architectural design. (For the same reason it is also called a “ruled surface”, as in a “ruled notebook”.) For example, this surface was also extensively used by a famous Spanish-Mexican architect Felix Candela:

https://casce.princeton.edu/teaching-resources/lectures/institutions/princeton-university/felix-candela-and-hyperbolic

(look for the Hyperbolic Paraboloid under Teaching Materials on the right side of the page). Some other structures using the hypar and created by Candela can be seen here: 

https://pragmatika.media/en/giperbolicheskij-parabaloid-feliksa-kandely/

We also have our own hypar between Patrick Gym and Redstone campus. Cornell University has a similar hypar, too.  

Another quadric surface that is also a ruled surface is a hyperboloid of one sheet. Its equation differs from that of the hyperboloid of two sheets (see Exercise 1) just by the sign of its right-hand side. However, the shapes of the hyperboloids of one and two sheets are very different - see the Table in Sec. 12.6. 

Thus, a hyperboloid of one sheet can also be made entirely of straight beams; see an illustration at the end of Sec. 12.6 (the figure of transmission gears). For this an other reasons, it is also a popular shape in architecture. The first building of this shape was erected in Russia in the early XX century:

http://en.wikipedia.org/wiki/Shabolovka_tower

At present, cooling towers of power stations are made in the shape of a hyperboloid of one sheet (probably not for economical reasons, but because of their superior robustness). Lists of architectural structures using ruled surfaces can be found here:

http://en.wikipedia.org/wiki/Hyperboloid_structure
http://en.wikipedia.org/wiki/Gridshell
http://en.wikipedia.org/wiki/List_of_hyperboloid _structures .