Visualize 3D functions with contour plots and level curves. Explore mathematical surfaces with interactive controls.
A contour plot (also called a level plot) is a graphical technique for representing a 3-dimensional surface on a 2-dimensional plane. It plots contour lines (also called isolines) of a function f(x,y), where each line corresponds to constant values of the function.
Mathematical Definition:
For a function f(x,y), a contour line (level curve) at level c is the set of points (x,y) satisfying:
f(x, y) = c
where c is a constant. Different values of c produce different contour lines.
Steepness: Closely spaced contour lines indicate a steep slope, while widely spaced lines indicate a gentle slope.
Peaks and Valleys: Closed contour lines typically represent peaks (if values increase toward the center) or valleys/depressions (if values decrease toward the center).
Ridges and Troughs: Elongated contour patterns with higher values on both sides indicate ridges, while patterns with lower values on both sides indicate troughs.
| Function | Contour Pattern | Description |
|---|---|---|
| f(x,y) = x² + y² | Concentric circles | Paraboloid (circular symmetry) |
| f(x,y) = x² - y² | Hyperbolas | Saddle surface |
| f(x,y) = sin(x) + cos(y) | Wave pattern | Periodic surface |
| f(x,y) = exp(-(x²+y²)) | Concentric circles | Gaussian bell curve |
| f(x,y) = xy | Rectangular hyperbolas | Saddle oriented at 45° |
| f(x,y) = x³ - 3xy² | Complex symmetric pattern | Monkey saddle (3-fold symmetry) |
Topography: Contour maps show elevation with contour lines representing equal height above sea level.
Meteorology: Weather maps use isobars (pressure contours), isotherms (temperature contours), and isohyets (precipitation contours).
Engineering: Stress and strain distributions, temperature gradients, and fluid flow patterns are often visualized with contour plots.
Statistics: Contour plots visualize probability density functions and likelihood surfaces in statistical modeling.
Function Evaluation: The calculator evaluates your function on a grid of (x,y) points within the specified range using the nerdamer.js symbolic math library.
Contour Detection: The algorithm finds level curves by detecting where the function crosses constant values and connecting these points into smooth curves.
Visualization: The plotly.js library renders the contour plot with appropriate coloring, labels, and interactive features.
Calculator Features:
x^2 + y^2
Circular paraboloid
x^2 - y^2
Hyperbolic paraboloid
sin(x)+cos(y)
Wavy surface
exp(-(x^2+y^2))
Gaussian bell
x*y
Saddle surface
sqrt(x^2+y^2)
Cone