How to Graph 3D Functions z = f(x, y)
What a 3D graph of z = f(x, y) shows, how to choose the x and y domain, how to rotate and read the surface, and what paraboloids, saddles and waves look like.
Graph a surface z = f(x, y) in 3D. Rotate and zoom it, choose the domain and mesh resolution, and slice it at a fixed x or y to see the cross-section as an ordinary 2D curve.
Each point (x, y) in the flat domain gets a height z = f(x, y). The colour moves from blue (low) through teal to pale green (high), and the box shows the domain. Because a flat screen can hide parts of a surface, rotate it to check its shape from several angles.
Cross-sections make 3D graphs concrete. For the paraboloid z = x² + y²:
The surface is sampled on a grid of at most 60 × 60 cells and drawn with simple depth sorting in a 2D canvas, so it works without special graphics hardware. Points where f is undefined (for example outside the domain of a square root) are left out rather than filled in. Very steep spikes are clipped to keep the rest of the surface visible; the height range is shown on the z-axis label. Lowest and highest values are those of the sampled grid, not exact extrema.
Guides: how to graph z = f(x, y), cross-sections of a surface and domain, resolution and performance.
Surfaces of the form z = f(x, y), for example z = x² + y², z = sin(x)·cos(y) or z = 4 − x² − y². Equations that cannot be solved for z, such as spheres x² + y² + z² = 1, are not supported.
Drag on the 3D view. Scroll or pinch to zoom. With the view focused, the arrow keys rotate, + and − zoom and 0 resets.
The surface is drawn as a grid of small patches. More patches (up to 60 × 60) look smoother but take longer to draw. Steep surfaces need more detail.
The curve you get by fixing x or y. With y fixed at 1, z = x² + y² becomes z = x² + 1 — a parabola shown in the 2D graph below the surface.
What a 3D graph of z = f(x, y) shows, how to choose the x and y domain, how to rotate and read the surface, and what paraboloids, saddles and waves look like.
A cross-section (trace) slices a 3D surface with a plane like y = 1 to give an ordinary 2D curve. Learn how to find traces, read them, and use them to identify surfaces.
Why a 3D surface looks blocky or slow, how grid resolution works, and how to choose the domain and resolution so peaks, poles and waves are drawn accurately.
Parametric equations describe a curve with x = x(t) and y = y(t). Learn how to graph them from a table, eliminate the parameter, and read motion from the graph.
Plot several functions, points and inequalities; find roots, intersections and turning points.
x(t), y(t) over a t-range with direction arrows, start/end points and trace.
Plot r(θ) on a polar grid, trace points and convert polar ↔ rectangular coordinates.