parametric surface

Surface parameterised by :

Surface element:

Scalar surface integral:

Flux (oriented — flipping reverses ):

# dS = |∂r/∂u × ∂r/∂v| du dv — tangents via jacfwd
dr_du, dr_dv = jax.jacfwd(r, argnums=(0,1))(U, V)
dS = jnp.linalg.norm(jnp.cross(dr_du, dr_dv), axis=-1)

surface as

Parameterise with : . Tangent cross product:

The square root is the area scaling factor — how much the slanted surface stretches relative to the -plane.

dS = jnp.sqrt(1 + jax.grad(z_fn)(X)**2 + jax.grad(z_fn, argnums=1)(Y)**2)

level surface

Normal from gradient: . Projected onto -plane: