A partial derivative measures how a function of several variables changes along one chosen axis while the other variables act as parameters. For a function of x and y, differentiate by x, by y, or compute both separately. The separate results become especially useful when combined into a gradient vector. section 11.3.2
The gradient points toward the function’s greatest increase at a point. Moving against it can pull a contour vertex toward an isoline; comparing neighboring gradients can also reveal sharp features, whose tangent lines guide vertex placement. section 11.3.2 section 11.4.1
For smooth contour construction, partial derivatives supply endpoint tangent information:
- Measure dx and dy at each endpoint of a line segment in an SDF or interpolated image. section 11.4.1 section 12.4.4
- Use endpoint positions and derivative values as equations for the x and y cubic coefficients. section 11.4.1
- Normalize tangent vectors when gradient magnitudes are out of scale; their derivative ratio preserves direction, while excessive magnitude can create loops. section 12.4.4
From a segment to a smooth cubic
Given endpoints (x0, y0) and (x1, y1), take partial derivatives dx0, dy0, dx1, and dy1. With t running from 0 to 1, endpoint equations fix the cubic’s position and its derivative equations fix its tangents. Shared derivative measurements at a shared point yield C1 continuity; second partial derivatives can extend the construction toward C2 continuity with fifth-degree polynomials. section 11.4.1 section 11.6
>>> diff(y**3 + x**2 + 3*y + 4, x) #1 >>> diff(y**3 + x**2 + 3*y + 4, y) #2
Compare symbolic differentiation of the same two-variable expression with respect to x and with respect to y. section 11.3.2


