Level Curve Or Surface Plotter — Theory
1. What is a level curve?
A level curve is the set of all points \((x,y)\) where a function of two variables has one fixed value.
If the function is \(f(x,y)\), then a level curve has the equation
\[
f(x,y)=c.
\]
The number \(c\) is called the level value.
2. What is a level surface?
A level surface is the three-dimensional version of a level curve. For a function of three variables,
a level surface is the set of all points \((x,y,z)\) where the function has one fixed value.
\[
f(x,y,z)=c.
\]
Level surfaces are useful for visualizing scalar fields in space.
3. Example: concentric circles
Consider the function
\[
f(x,y)=x^2+y^2.
\]
A level curve is found by setting the function equal to a constant:
\[
x^2+y^2=c.
\]
If \(c>0\), this is a circle centered at the origin with radius \(\sqrt{c}\).
\[
r=\sqrt{c}.
\]
4. Concrete circle levels
For \(f(x,y)=x^2+y^2\), several common levels are:
5. Level curves as contour maps
Level curves are also called contour curves. A contour map shows many level curves at once.
Each curve represents points where the function has the same value.
If level curves are close together, the function is changing quickly. If they are far apart,
the function is changing slowly.
6. Gradient and level curves
The gradient of a two-variable function is
\[
\nabla f
=
\left\langle
f_x,\ f_y
\right\rangle.
\]
At regular points, the gradient is perpendicular to the level curve.
\[
\nabla f \perp f(x,y)=c.
\]
This is why gradient arrows cross contour lines at right angles.
7. Gradient and level surfaces
For a three-variable function, the gradient is
\[
\nabla f
=
\left\langle
f_x,\ f_y,\ f_z
\right\rangle.
\]
At regular points, the gradient is perpendicular to the level surface.
\[
\nabla f \perp f(x,y,z)=c.
\]
The gradient therefore gives a normal vector to the level surface.
8. Example: sphere as a level surface
Consider
\[
f(x,y,z)=x^2+y^2+z^2.
\]
The level surface is
\[
x^2+y^2+z^2=c.
\]
If \(c>0\), this is a sphere centered at the origin with radius
\[
r=\sqrt{c}.
\]
9. Example: plane as a level surface
Let
\[
f(x,y,z)=x+y+z.
\]
The level surface is
\[
x+y+z=c.
\]
This is a plane. Changing \(c\) shifts the plane parallel to itself.
10. How numerical contour plotting works
A graphing calculator cannot usually draw every point exactly. Instead, it samples the function
on a grid. In 2D, it checks each small square in the grid. If the function value crosses the
selected level \(c\), the calculator draws a small line segment through that square.
Combining many small segments produces an approximation of the level curve.
11. How numerical isosurface plotting works
A 3D level surface is harder to draw exactly. A numerical plotter samples many points in a box
and looks for points where
\[
f(x,y,z)\approx c.
\]
These near-level points approximate the surface. Slice contours can also be added to make the
shape easier to see.
13. Common mistakes
- Confusing the graph of \(z=f(x,y)\) with a level curve: a level curve is \(f(x,y)=c\), not \(z=f(x,y)\).
- Choosing a level outside the function range: if \(c\) is too large or too small, no level curve may appear in the selected window.
- Using too small a graph window: the level set may exist but lie outside the visible region.
- Using too low a sampling density: small or sharp level curves can be missed by a coarse grid.
- Forgetting that gradients are perpendicular: the gradient points across level curves, not along them.
- Overreading 3D projections: rotate the graph to understand depth and surface shape.