🌐 EN

πŸ”οΈ 3D Surface Plotter

Plot 3D surfaces z = f(x, y) as a rotatable colored mesh. Choose a preset like a saddle or ripple, or enter your own function, then spin it with the rotation sliders.

z =

Allowed: + - * / ^ ( ) and sin, cos, tan, sqrt, abs, exp, log, pow; constants pi and e; variables x and y.

30
6
34Β°
52Β°
GUIDE

Learn more

01

What is a surface plot?

A surface plot visualizes a function of two variables, z = f(x, y), as a height field: for every point on the flat x/y plane the function gives a height z, and connecting those heights forms a smooth mesh floating in 3D. Color usually encodes height, so peaks and valleys stand out at a glance. It is the natural way to picture things like terrain, temperature over a plate, or the shape of a mathematical saddle.
02

How the 3D view is rendered

The tool computes a grid of points (up to 40Γ—40) by evaluating your function across the domain, then rotates them using two angles you control, projects the rotated points to 2D with a simple isometric projection, and sorts the faces back-to-front so nearer ones cover farther ones β€” the classic painter's algorithm. Everything is drawn with plain HTML canvas: there is no WebGL and no three.js, which keeps the tool small and dependency-free.
03

Safe function input

A custom whitelist parser reads your formula β€” there is no JavaScript eval β€” so only the listed functions (sin, cos, tan, sqrt, abs, exp, log, pow), the constants pi and e, and the two variables x and y are accepted. Anything else is rejected before it runs. Good starting points are the presets, such as sin(x)*cos(y) for a rolling wave field or x^2 - y^2 for a classic saddle.

Frequently asked questions

What variables can I use?
Use <strong>x</strong> and <strong>y</strong>. The tool evaluates your function to get a height <em>z</em> at each point of a grid over the chosen domain.
Which functions are allowed?
sin, cos, tan, sqrt, abs, exp, log and pow, plus the constants pi and e. Combine them with ordinary arithmetic (+ βˆ’ * /) and use ^ for powers, for example z = sin(sqrt(x^2 + y^2)).
Does this use WebGL or three.js?
No. It uses a self-contained HTML canvas projection with painter's-algorithm face sorting, so it has no external dependencies and runs anywhere a browser does β€” even on modest hardware.