Level curves (also called contour lines) of a function f(x, y) are curves along which the function has a constant value. For a surface z = f(x, y), the level curve at height c is defined by the equation f(x, y) = c.
This visualization shows the surface f(x, y) = x^2 + y^2 (a circular paraboloid) together with its level curves, helping students understand the relationship between a 3D surface and its 2D contour representation.
For the paraboloid x^2 + y^2 = c, the level curves are circles of radius sqrt(c) centered at the origin.
The transparent khaki surface shows the paraboloid, with colored circles drawn at heights z = 0, 2, 4, 6, 8, 10, 12, and 14. Each circle lies on the surface at the corresponding height.
This is the same information viewed from directly above -- a standard contour plot. The concentric circles correspond to the level curves at different heights. This is the view you would see on a topographic map.
| File | Description |
|---|---|
sage_code |
Original SageMath implementation |
plot3d_level_curves.py |
Python 3 translation with matplotlib |
plot3d_level_curves.png |
3D surface with level curves |
plot3d_level_curves_contour.png |
2D contour plot (top-down view) |
python3 plot3d_level_curves.py- Level curves of a surface z = f(x, y) are obtained by slicing the surface with horizontal planes z = c
- Closely spaced level curves indicate a steep surface; widely spaced curves indicate a gradual slope
- For the paraboloid x^2 + y^2, the level curves are concentric circles -- their spacing decreases as you move outward because the surface gets steeper
- Contour plots are the standard way to represent 3D information on a 2D map (topographic maps, weather maps, etc.)

