NURBS curves and surfaces
28 pages
-
nurbsCurve.createA NURBS curve from control points and a degree, with optional weights and knots, checked by the kernel’s rules. -
nurbsCurve.arcAn exact circular arc on a plane, counter-clockwise about its normal from an angle measured from its x axis. -
nurbsCurve.circleAn exact full circle on a plane, starting on its x axis and running counter-clockwise about its normal. -
nurbsCurve.controlPointThe Euclidean position of control point i. -
nurbsCurve.pointAtThe point on the curve at a knot parameter. -
nurbsCurve.derivativeAtThe first derivative dC/dt at a knot parameter, with respect to knot units. -
nurbsCurve.tangentAtThe unit tangent at a knot parameter, or null where the derivative vanishes. -
nurbsCurve.lengthThe arc length between two knot parameters, by Gauss–Legendre quadrature. -
nurbsCurve.samplePoints at evenly spaced knot parameters along the whole curve, both ends included. -
nurbsCurve.transformedThe curve with an affine transform applied to its control points, weights and knots kept. -
nurbsCurve.insertKnotThe same curve with knot t inserted times times: more control points, the shape unchanged. -
nurbsCurve.removeKnotThe curve with up to times copies of knot t removed, where the shape moves by at most tolerance × the control net’s extent. -
nurbsCurve.elevateDegreeThe same curve at degree + times, with the control points that shape needs. -
nurbsCurve.toJSONThe curve as plain JSON: degree, Euclidean control points, weights and knots. -
nurbsSurface.createA NURBS surface from a grid of control points and two degrees, with optional weights and knots, checked by the kernel’s rules. -
nurbsSurface.sphereAn exact sphere of a radius about a centre, as a rational degree-(2, 2) surface. -
nurbsSurface.cylinderThe exact side of a cylinder standing on a plane, its axis along the plane’s normal and its seam on the plane’s x axis. -
nurbsSurface.diskAn exact flat disk on a plane, centred on its origin, its normal the plane’s normal. -
nurbsSurface.controlPointThe Euclidean position of control point (i, j): row i along u, column j along v. -
nurbsSurface.pointAtThe point on the surface at knot parameters (u, v). -
nurbsSurface.derivativesAtThe partial derivatives ∂S/∂u and ∂S/∂v at (u, v), with respect to knot units. -
nurbsSurface.normalAtThe unit normal ∂S/∂u × ∂S/∂v at (u, v), or null where it vanishes, as at a pole. -
nurbsSurface.tessellateA quad mesh of the surface sampled on a uniform uDivs × vDivs parameter grid. -
nurbsSurface.transformedThe surface with an affine transform applied to its control points, weights and knots kept. -
nurbsSurface.insertKnotThe same surface with knot t inserted times times in one direction: more control rows or columns, the shape unchanged. -
nurbsSurface.removeKnotThe surface with up to times copies of knot t removed in one direction, within tolerance × the net’s extent. -
nurbsSurface.elevateDegreeThe same surface with its degree in one direction raised by times. -
nurbsSurface.toJSONThe surface as plain JSON: degrees, net size, row-major control points, weights and both knot vectors.