By · Updated

Parametric Surface Plotter

x(u,v), y(u,v), z(u,v) in 3D Online, Free

No ratings yet

Drag to orbit, scroll to zoom, right-drag to pan

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Parametric Surface Plotter works

This parametric surface plotter draws x, y and z from two parameters. Give x, y and z each as a formula in two parameters u and v and this page sweeps the parameters over their ranges to draw the surface they trace, coloured by height or by either parameter. Seven classic shapes are built in: sphere, torus, Möbius strip, Klein bottle, helicoid, seashell and Dini's surface. Pick one, read its equations, then change them. Orbit the result, raise the resolution for a smooth finish, and download a PNG.

Parametric surface plotter: why parametric

A height function z = f(x, y) can only draw surfaces that a vertical line crosses once, so it cannot make a sphere, a tube or anything that folds back on itself. A parametric surface drops that limit: every point is produced by two numbers u and v run through three formulas, so the surface can close up, twist or pass through itself freely. A sphere is cos(u) sin(v), sin(u) sin(v), cos(v) with u around the equator and v from pole to pole; a torus adds a tube radius to a ring radius; the Möbius strip is a band whose cross-section rotates half a turn as u goes round.

Writing the formulas

Each of the three boxes takes ordinary maths in u and v: + - * / ^, brackets, the trigonometric and hyperbolic functions, sqrt, abs, exp, log, min, max, pow and the constants pi and e. Write every multiplication out with * and keep function names lower case. Choosing a preset fills all three boxes and the four range fields, so the easiest way to learn the form is to pick a shape and edit it: change the 2 + in the torus to 3 + for a fatter ring, or multiply z by 2 to stretch a sphere into an egg.

Ranges and resolution

The u and v ranges are the interval each parameter runs over. Closed surfaces need a full turn, 0 to 2π (6.2832), in the angular parameter; the sphere needs only 0 to π in v because that already reaches from pole to pole. Cutting a range short opens the surface: a torus with u from 0 to π is a half ring, which is a useful way to see inside. Resolution is the number of grid cells along each parameter, so 100 gives ten thousand quads; the seashell and Dini surface look better at 150 or more because they wrap tightly.

Colour and style

By z colours from the lowest point to the highest, which reads as lighting-independent height. By u and By v colour along the parameter instead, which shows how the surface is swept and makes the half-twist of the Möbius strip and the self-intersection of the Klein bottle far easier to follow. Solid + wireframe shows the parameter grid lines on the surface; Faceted flattens the shading per triangle. Points where a formula is undefined, such as log(tan(v/2)) at v = 0 on Dini's surface, are dropped and counted in the rail.

FAQ

Which presets are there and what are their equations?

Sphere, torus, Möbius strip, Klein bottle (the figure-8 immersion), helicoid, a logarithmic seashell and Dini's surface. Selecting one writes its x, y, z formulas and u, v ranges into the fields, so the equations are always on screen and can be edited straight away; the preset menu switches to your edits without resetting them until you choose another shape.

Why does part of my surface vanish?

Any grid point where one of the three formulas is not a finite real number is skipped, and the quads that touch it are not drawn. Division by zero, square roots of negatives and logarithms of zero are the usual reasons; the Points line in the rail counts how many samples were undefined. Nudge the range slightly, for example v from 0.1 instead of 0.

Can I plot a curve rather than a surface?

Use a very thin second parameter: set y to v * 0.01 or so, and the surface collapses to a ribbon that reads as a curve. For a proper tube around a space curve, write the curve in u and add a small circle in v, which is how the torus is built.

How high can the resolution go?

Up to 300 cells per side, about 180 000 triangles, which redraws instantly on a laptop. Presets that wrap many times, such as the helicoid with u to 4π, benefit from more cells in u than in v, but the grid is square, so raise the total instead.

See also: all 3D Science tools, Images, Audio, Video & Screen, PDF, SVG, Simulations & Screensavers, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, Tracker Music.

People also used

Related tools