3D Surface Plotter
Plot interactive 3D surfaces z = f(x, y) with mouse-driven rotation, zoom and pan. Adjust x/y domain, mesh resolution, six color maps, wireframe overlay and lighting. Explore saddle points, Gaussian bumps, ripples, monkey saddles, hyperbolic paraboloids and the famous Mexican-hat sinc surface ā all in your browser, no plugin required.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (adāfree + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (adāfree)
About 3D Surface Plotter
The 3D Surface Plotter draws any function of two variables \( z = f(x, y) \) as a fully interactive 3D landscape directly in your browser. Drag inside the viewport to rotate the surface, scroll or pinch to zoom, and right-drag (or two-finger pan on mobile) to slide the view. Type your own function with full sin, cos, exp, log, sqrt support, the constants \( \pi \) and \( e \), and natural conveniences like x^2 or 2xy ā or click one of ten presets for an instant render of the classic saddle, paraboloid, Mexican-hat sinc, monkey saddle, egg-crate, Gaussian bump and more. Choose between isometric and perspective projection, six perceptual color maps, and three wireframe styles, then export the current view as a high-resolution PNG.
How 3D Surface Plotting Works
A surface plot turns a two-variable function into a tangible landscape. At every point \( (x, y) \) in the input plane, the value \( z = f(x, y) \) becomes the height of the surface above (or below) that point. The plotter samples a regular grid of \( (x, y) \) pairs ā typically 30 to 90 points per side ā evaluates \( f \) at each, and connects each cell of the grid into two coloured triangles.
The rendering uses three classic graphics-pipeline steps. Project every 3D vertex \( (x, y, z) \) into 2D screen space using your current rotation and zoom. Sort the triangles back-to-front by depth (the painter's algorithm). Shade each face by combining its height-mapped color with a Lambertian dot product against a fixed light direction. Spin the surface and the lighting follows the camera, which is what gives the figure its hand-modelled feel.
A Gallery of Classic Surfaces
What Makes This 3D Plotter Different
2xy, x^2 - y^2, sin(x)cos(y). Implicit multiplication, caret powers and Unicode Ļ are all converted automatically. Server-side AST whitelisting means user input can never touch unsafe Python globals.
Expression Syntax ā Quick Reference
| What you type | Meaning | Example |
|---|---|---|
x, y | The two input variables | z = x + y |
pi or Ļ | The constant Ļ ā 3.14159 | z = sin(pi*x) |
e | Euler's number ā 2.71828 | z = exp(-x**2-y**2) |
sin, cos, tan | Trig functions (radians) | z = sin(x)*cos(y) |
asin, acos, atan, atan2 | Inverse trig | z = atan2(y, x) |
exp, log, log2, log10 | Exponential & logarithms | z = log(x**2 + y**2 + 1) |
sqrt, abs, floor, ceil | Power & rounding | z = sqrt(abs(x*y)) |
^ or ** | Exponentiation | z = x^3 - 3*x*y^2 |
Implicit * | Number-to-letter inserts Ć | 2xy ā 2*x*y |
Reading a 3D Surface
A surface plot encodes huge amounts of information in shape and color together. A few patterns become recognisable with practice:
- Critical points are where the surface has a horizontal tangent plane ā local maxima look like dome tops, local minima like bowl bottoms, and saddle points bend up in one direction and down in the perpendicular direction. Click the Saddle preset and rotate the view: along one axis it's a smile, along the other it's a frown.
- Level curves (contour lines) appear naturally when the color map is divergent or terrain-style ā bands of the same color trace out lines of constant \( z \).
- Gradient direction is the steepest uphill direction at each point. Visually, that's the direction perpendicular to the level curves, pointing toward warmer colors.
- Symmetry is obvious in 3D: \( z = x^2 + y^2 \) is rotationally symmetric (a bowl), \( z = x^2 - y^2 \) has only mirror symmetries (a saddle), and \( z = x^3 - 3xy^2 \) has a beautiful three-fold rotation symmetry (monkey saddle).
From Saddle to Sinc: One-Click Tour
The preset gallery is a guided tour through the most-taught multivariable surfaces. A suggested sequence for first-time viewers:
- Paraboloid \( z = x^2 + y^2 \) ā the friendliest 3D surface. A bowl, rotationally symmetric, with a single minimum at the origin.
- Saddle \( z = x^2 - y^2 \) ā the iconic Pringle. Try cool-warm color map to see the positive/negative split immediately.
- Hyperbolic paraboloid \( z = xy \) ā a saddle rotated 45°. Same shape, different orientation.
- Monkey saddle \( z = x^3 - 3xy^2 \) ā three slopes around the origin instead of two. Named because a monkey would need to rest its tail there too.
- Gaussian \( z = e^{-(x^2+y^2)} \) ā the bell curve in 2D. Foundation of statistics, signal processing and physics.
- Mexican-hat sinc \( z = \sin\sqrt{x^2+y^2}/\sqrt{x^2+y^2} \) ā the radial sinc. Appears in Fourier optics, diffraction patterns, and the wavelet that bears its name.
- Egg crate \( z = \sin x \sin y \) ā periodic in two directions. Toggle wireframe on to see the grid lines align with the bumps.
- Ripples \( z = \sin\sqrt{x^2+y^2} \) ā concentric waves spreading from the origin. Try the wide ā8 to 8 domain.
Real-World Uses
- Multivariable calculus: visualise partial derivatives, gradients, critical points, and Lagrange multipliers without redrawing by hand each time.
- Physics: potential energy surfaces, electromagnetic field intensities, fluid pressure distributions and quantum wave functions all live as \( z = f(x, y) \).
- Machine learning: loss landscapes around a 2D weight subspace help build intuition for why gradient descent works (and why saddles are a problem).
- Computer graphics: heightmaps for terrain are exactly this ā a function \( h(x, y) \) sampled on a regular grid then triangulated.
- Civil engineering: elevation models for terrain analysis, dam catchments and earthworks volume estimation.
- Data visualisation: any quantity that depends on two independent variables ā temperature across a country, sales by region and month, fitness across two hyperparameters ā naturally renders as a surface.
Tips for Beautiful Plots
- Match the domain to the function. Polynomials are usually shown on ā3 to 3. Oscillating functions like sinc need a wide domain (ā8 to 8) to reveal the ripples. Use ā1 to 1 to zoom into a single saddle near the origin.
- Pick the right color map. Use cool-warm for any surface with positive and negative regions ā the white midpoint marks the zero level instantly. Use viridis or plasma for non-negative surfaces. Use terrain for landscape-style heightmaps.
- Turn wireframe off for portfolio renders. Subtle wireframe is great for teaching ("see the mesh"). For publication-quality figures, set wireframe to Off and increase resolution to High or Ultra.
- Auto-spin captures rich animations. Hit Auto-spin then start a screen recording ā perfect for embedding a rotating surface into slides without manual orchestration.
- Domains too large can flatten the surface. If your function returns huge values near the edges, the interior detail collapses. Either shrink the domain or scale the function (e.g. \( z / 100 \)) to bring the action back into view.
Frequently Asked Questions
What is a 3D surface plot?
A 3D surface plot visualises a function of two variables z = f(x, y) as a mountainous landscape over the (x, y) plane. The height at each point (x, y) is the function value z. The plotter samples a grid of (x, y) pairs, evaluates f at each point, and connects neighbouring samples into a triangulated mesh that you can rotate, zoom and re-color interactively.
What functions can I plot?
Any expression in x and y using the standard math functions: sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, exp, log, log2, log10, sqrt, abs, floor, ceil, pow, min, max ā plus the constants pi, e and tau. Trig is in radians. Implicit multiplication (2x ā 2*x), the caret ^ for powers, and Unicode Ļ are all handled automatically.
How do I rotate, zoom and pan?
Click and drag inside the viewport with the left mouse button to rotate the surface around its centre (yaw and pitch). Scroll the wheel to zoom in and out. Right-click and drag (or two-finger pan on touch) to slide the view. Tap the camera-preset buttons above the viewport to jump to standard isometric, top, front or side views.
What does the color represent?
By default, the color of each face encodes its z height ā low points use the cool end of the palette, high points use the warm end. For diverging palettes like cool-warm the midpoint is exactly z = 0, which makes saddles especially readable. Lambertian lighting also darkens faces that point away from the light, so the surface looks three-dimensional.
Does this work on mobile?
Yes. The viewport supports one-finger drag to rotate and two-finger pinch to zoom. Pick the Low resolution (30Ć30) for the smoothest interaction on phones ā that still gives a clearly shaped surface. Medium and High are recommended for laptops and desktops.
Why does my function look spiky or wrong?
Most often the domain is too small (so the function is essentially flat) or too large (so values explode and only the extremes are visible). Try a narrower range like ā2 to 2 for polynomials, or wider like ā8 to 8 for oscillating sinc and ripple functions. Singularities (like 1/x) get clipped automatically ā but the surface around them may still pull the color range. Add a small constant in the denominator (e.g. 1/(x²+y²+0.1)) to tame them.
Can I plot implicit surfaces or vector fields?
This plotter handles explicit surfaces z = f(x, y) ā one z value per (x, y) input. Implicit surfaces F(x, y, z) = 0 (like a sphere x²+y²+z²=1) and parametric surfaces require a marching-cubes or parametric grapher and are outside the scope of this tool. For vector fields and slope fields, see the related slope-field plotter.
How do I save my plot?
Click the PNG button in the viewport toolbar to download the current view as a high-resolution PNG. The file captures whatever rotation, zoom and color map you have set ā so spin the surface to your favourite angle first, then export. The image is rendered at your device pixel ratio for crisp slides.
Is this 3D surface plotter free?
Yes. The 3D Surface Plotter is free, runs entirely in your browser after the form submit, requires no signup and produces watermark-free exports. Use the plots in homework, papers, slides, blog posts and commercial projects without restriction.
Reference this content, page, or tool as:
"3D Surface Plotter" at https://MiniWebtool.com// from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: 2026-05-21
You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.