Calculus 103
Orbit the surface in space
See a function of two variables as a surface, and connect that surface to its 2D traces and level curves.
Plot z = x^2 - y^2, then switch to the XZ and YZ views. One trace opens upward, the other opens downward — that is what makes the origin a saddle point.
Use the XZ view with the slice at y = 0, then the YZ view with the slice at x = 0.
Keep a surface plotted and open the XY view with contours on. Circles mean the surface is a bowl; hyperbolas mean it is a saddle.
Turn contour lines on and raise the contour count to see the pattern.
Plot z = x^2 + y^2 in Cartesian, then plot z = r^2 in polar. They are the same paraboloid written in two coordinate systems.
r^2 = x^2 + y^2, so the polar form of the paraboloid is just r^2.
Cartesian: z = f(x, y) → (x, y, z)Cylindrical: z = f(r, θ) → (r·cos θ, r·sin θ, z)Spherical: ρ = f(θ, φ) → (ρ·sin φ·cos θ, ρ·sin φ·sin θ, ρ·cos φ)Trace at y = c: the curve z = f(x, c) in the XZ planeTrace at x = c: the curve z = f(c, y) in the YZ planeLevel curve: f(x, y) = k, drawn as a contour in the XY planeOriginal expression parser, surface sampler, orbit camera and canvas renderer. No third-party maths or graphics libraries.