rust_nurbs#

Evaluation of NURBS objects in Python (implemented in Rust)

Functions#

bernstein_poly(→ float)

Evaluates the Bernstein polynomial at a single \(t\)-value. The Bernstein polynomial is given by

bezier_curve_eval(→ List[float])

Evaluates a Bézier curve with \(n+1\) control points at a single \(t\)-value according to

bezier_curve_eval_dp(→ List[float])

Evaluates the derivative of the Bézier curve with respect to an individual control point at a given \(t\)-value

bezier_curve_dcdt(→ List[float])

Evaluates the first derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control

bezier_curve_dcdt_dp(→ List[float])

Evaluates the derivative of the Bézier curve first derivative with respect to an individual control point

bezier_curve_d2cdt2(→ List[float])

Evaluates the second derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control

bezier_curve_d2cdt2_dp(→ List[float])

Evaluates the derivative of the Bézier curve second derivative with respect to an individual control point

bezier_curve_eval_grid(→ List[List[float]])

Evaluates a Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points according to

bezier_curve_eval_dp_grid(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a Bézier curve with

bezier_curve_dcdt_grid(→ List[List[float]])

Evaluates the first derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control

bezier_curve_dcdt_dp_grid(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a Bézier curve first derivative with

bezier_curve_d2cdt2_grid(→ List[List[float]])

Evaluates the second derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control

bezier_curve_d2cdt2_dp_grid(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a Bézier curve second derivative with

bezier_curve_eval_tvec(→ List[List[float]])

Evaluates a Bézier curve with \(n+1\) control points along a vector of \(t\)-values according to

bezier_curve_eval_dp_tvec(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a Bézier curve with

bezier_curve_dcdt_tvec(→ List[List[float]])

Evaluates the first derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control

bezier_curve_dcdt_dp_tvec(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a Bézier curve first derivative with

bezier_curve_d2cdt2_tvec(→ List[List[float]])

Evaluates the second derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control

bezier_curve_d2cdt2_dp_tvec(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a Bézier curve second derivative with

bezier_surf_eval(→ List[float])

Evaluates a Bézier surface with \(n+1\) control points in the \(u\)-direction

bezier_surf_dsdu(→ List[float])

Evaluates the first derivative with respect to \(u\) of a Bézier surface with \(n+1\)

bezier_surf_dsdv(→ List[float])

Evaluates the first derivative with respect to \(v\) of a Bézier surface with \(n+1\)

bezier_surf_d2sdu2(→ List[float])

Evaluates the second derivative with respect to \(u\) of a Bézier surface with \(n+1\)

bezier_surf_d2sdv2(→ List[float])

Evaluates the first derivative with respect to \(v\) of a Bézier surface with \(n+1\)

bezier_surf_eval_dp(→ List[float])

Evaluates the derivative of the Bézier surface with respect to an individual control point at a given \((u,v)\)-pair:

bezier_surf_dsdu_dp(→ List[float])

Evaluates the derivative of the Bézier surface first \(u\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

bezier_surf_dsdv_dp(→ List[float])

Evaluates the derivative of the Bézier surface first \(v\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

bezier_surf_d2sdu2_dp(→ List[float])

Evaluates the derivative of the Bézier surface second \(u\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

bezier_surf_d2sdv2_dp(→ List[float])

Evaluates the derivative of the Bézier surface second \(v\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

bezier_surf_eval_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the Bézier surface with respect to an individual control point along a \(u\)-isoparametric curve

bezier_surf_eval_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the Bézier surface with respect to an individual control point along a \(v\)-isoparametric curve

bezier_surf_dsdu_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the Bézier surface first \(u\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

bezier_surf_dsdu_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the Bézier surface first \(u\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

bezier_surf_dsdv_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the Bézier surface first \(v\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

bezier_surf_dsdv_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the Bézier surface first \(v\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

bezier_surf_d2sdu2_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the Bézier surface second \(u\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

bezier_surf_d2sdu2_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the Bézier surface second \(u\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

bezier_surf_d2sdv2_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the Bézier surface second \(v\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

bezier_surf_d2sdv2_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the Bézier surface second \(v\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

bezier_surf_eval_dp_grid(→ List[List[List[float]]])

Evaluates the derivative of the Bézier surface with respect to an individual control point on a \((u,v)\) grid

bezier_surf_dsdu_dp_grid(→ List[List[List[float]]])

Evaluates the derivative of the Bézier surface first \(u\)-derivative with respect to an individual control point on a \((u,v)\) grid

bezier_surf_dsdv_dp_grid(→ List[List[List[float]]])

Evaluates the derivative of the Bézier surface first \(v\)-derivative with respect to an individual control point on a \((u,v)\) grid

bezier_surf_d2sdu2_dp_grid(→ List[List[List[float]]])

Evaluates the derivative of the Bézier surface second \(u\)-derivative with respect to an individual control point on a \((u,v)\) grid

bezier_surf_d2sdv2_dp_grid(→ List[List[List[float]]])

Evaluates the derivative of the Bézier surface second \(v\)-derivative with respect to an individual control point on a \((u,v)\) grid

bezier_surf_eval_iso_u(→ List[List[float]])

Evaluates an isoparametric curve in \(u\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction

bezier_surf_eval_iso_v(→ List[List[float]])

Evaluates an isoparametric curve in \(v\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction

bezier_surf_dsdu_iso_u(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a

bezier_surf_dsdu_iso_v(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a

bezier_surf_dsdv_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a

bezier_surf_dsdv_iso_v(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a

bezier_surf_d2sdu2_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a

bezier_surf_d2sdu2_iso_v(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a

bezier_surf_d2sdv2_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a

bezier_surf_d2sdv2_iso_v(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a

bezier_surf_eval_grid(→ List[List[List[float]]])

Evaluates a Bézier surface with \(n+1\) control points in the \(u\)-direction

bezier_surf_dsdu_grid(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(u\) on a Bézier surface with \(n+1\)

bezier_surf_dsdv_grid(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(v\) on a Bézier surface with \(n+1\)

bezier_surf_d2sdu2_grid(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(u\) on a Bézier surface with \(n+1\)

bezier_surf_d2sdv2_grid(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(v\) on a Bézier surface with \(n+1\)

bezier_surf_eval_uvvecs(→ List[List[List[float]]])

Evaluates a Bézier surface with \(n+1\) control points in the \(u\)-direction

bezier_surf_dsdu_uvvecs(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(u\) on a Bézier surface with \(n+1\)

bezier_surf_dsdv_uvvecs(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(v\) on a Bézier surface with \(n+1\)

bezier_surf_d2sdu2_uvvecs(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(u\) on a Bézier surface with \(n+1\)

bezier_surf_d2sdv2_uvvecs(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(v\) on a Bézier surface with \(n+1\)

rational_bezier_curve_eval(→ List[float])

Evaluates a rational Bézier curve with \(n+1\) control points at a single \(t\)-value according to

rational_bezier_curve_eval_dp(→ List[float])

Evaluates the derivative of the rational Bézier curve with respect to an individual control point at a given \(t\)-value

rational_bezier_curve_dcdt(→ List[float])

Evaluates the first derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control

rational_bezier_curve_dcdt_dp(→ List[float])

Evaluates the sensitivity of the rational Bézier curve first derivative with respect to an individual control point at a given \(t\)-value

rational_bezier_curve_d2cdt2(→ List[float])

Evaluates the second derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control

rational_bezier_curve_d2cdt2_dp(→ List[float])

Evaluates the sensitivity of the rational Bézier curve second derivative with respect to an individual control point at a given \(t\)-value

rational_bezier_curve_eval_grid(→ List[List[float]])

Evaluates a rational Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points according to

rational_bezier_curve_eval_dp_grid(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a rational Bézier curve with

rational_bezier_curve_dcdt_grid(→ List[List[float]])

Evaluates the first derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control

rational_bezier_curve_dcdt_dp_grid(→ List[List[float]])

Evaluates the first derivative sensitivity with respect to an individual control point of a rational Bézier curve with

rational_bezier_curve_d2cdt2_grid(→ List[List[float]])

Evaluates the second derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control

rational_bezier_curve_d2cdt2_dp_grid(→ List[List[float]])

Evaluates the second derivative sensitivity with respect to an individual control point of a rational Bézier curve with

rational_bezier_curve_eval_tvec(→ List[List[float]])

Evaluates a rational Bézier curve with \(n+1\) control points along a vector of \(t\)-values according to

rational_bezier_curve_eval_dp_tvec(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a rational Bézier curve with

rational_bezier_curve_dcdt_tvec(→ List[List[float]])

Evaluates the first derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control

rational_bezier_curve_dcdt_dp_tvec(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a rational Bézier curve first derivative with

rational_bezier_curve_d2cdt2_tvec(→ List[List[float]])

Evaluates the second derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control

rational_bezier_curve_d2cdt2_dp_tvec(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a rational Bézier curve second derivative with

rational_bezier_surf_eval(→ List[float])

Evaluates a rational Bézier surface with \(n+1\) control points in the \(u\)-direction

rational_bezier_surf_dsdu(→ List[float])

Evaluates the first derivative w.r.t. \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction

rational_bezier_surf_dsdv(→ List[float])

Evaluates the first derivative w.r.t. \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction

rational_bezier_surf_d2sdu2(→ List[float])

Evaluates the second derivative w.r.t. \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction

rational_bezier_surf_d2sdv2(→ List[float])

Evaluates the second derivative w.r.t. \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction

rational_bezier_surf_eval_dp(→ List[float])

Evaluates the derivative of the rational Bézier surface with respect to an individual control point at a given \((u,v)\)-pair:

rational_bezier_surf_dsdu_dp(→ List[float])

Evaluates the derivative of the rational Bézier surface first \(u\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

rational_bezier_surf_dsdv_dp(→ List[float])

Evaluates the derivative of the rational Bézier surface first \(v\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

rational_bezier_surf_d2sdu2_dp(→ List[float])

Evaluates the derivative of the rational Bézier surface second \(u\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

rational_bezier_surf_d2sdv2_dp(→ List[float])

Evaluates the derivative of the rational Bézier surface second \(v\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

rational_bezier_surf_eval_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface with respect to an individual control point along a \(u\)-isoparametric curve

rational_bezier_surf_eval_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface with respect to an individual control point along a \(v\)-isoparametric curve

rational_bezier_surf_dsdu_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface first \(u\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

rational_bezier_surf_dsdu_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface first \(u\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

rational_bezier_surf_dsdv_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface first \(v\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

rational_bezier_surf_dsdv_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface first \(v\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

rational_bezier_surf_d2sdu2_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface second \(u\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

rational_bezier_surf_d2sdu2_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface second \(u\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

rational_bezier_surf_d2sdv2_dp_iso_u(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface second \(v\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

rational_bezier_surf_d2sdv2_dp_iso_v(→ List[List[float]])

Evaluates the derivative of the rational Bézier surface second \(v\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

rational_bezier_surf_eval_dp_grid(...)

Evaluates the derivative of the rational Bézier surface with respect to an individual control point on a \((u,v)\) grid

rational_bezier_surf_dsdu_dp_grid(...)

Evaluates the derivative of the rational Bézier surface first \(u\)-derivative with respect to an individual control point on a \((u,v)\) grid

rational_bezier_surf_dsdv_dp_grid(...)

Evaluates the derivative of the rational Bézier surface first \(v\)-derivative with respect to an individual control point on a \((u,v)\) grid

rational_bezier_surf_d2sdu2_dp_grid(...)

Evaluates the derivative of the rational Bézier surface second \(u\)-derivative with respect to an individual control point on a \((u,v)\) grid

rational_bezier_surf_d2sdv2_dp_grid(...)

Evaluates the derivative of the rational Bézier surface second \(v\)-derivative with respect to an individual control point on a \((u,v)\) grid

rational_bezier_surf_eval_iso_u(→ List[List[float]])

Evaluates an isoparametric curve in \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction

rational_bezier_surf_eval_iso_v(→ List[List[float]])

Evaluates an isoparametric curve in \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction

rational_bezier_surf_dsdu_iso_u(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a rational Bézier

rational_bezier_surf_dsdu_iso_v(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a rational Bézier

rational_bezier_surf_dsdv_iso_u(→ List[List[float]])

Evaluates the first derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a rational Bézier

rational_bezier_surf_dsdv_iso_v(→ List[List[float]])

Evaluates the first derivative w.r.t. \(v\) along an isoparametric curve in \(v\) of a rational Bézier

rational_bezier_surf_d2sdu2_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a rational Bézier

rational_bezier_surf_d2sdu2_iso_v(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a rational Bézier

rational_bezier_surf_d2sdv2_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a rational Bézier

rational_bezier_surf_d2sdv2_iso_v(→ List[List[float]])

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(v\) of a rational Bézier

rational_bezier_surf_eval_grid(→ List[List[List[float]]])

Evaluates a rational Bézier surface with \(n+1\) control points in the \(u\)-direction

rational_bezier_surf_dsdu_grid(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(u\) on a rational Bézier surface with \(n+1\)

rational_bezier_surf_dsdv_grid(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(v\) on a rational Bézier surface with \(n+1\)

rational_bezier_surf_d2sdu2_grid(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(u\) on a rational Bézier surface with \(n+1\)

rational_bezier_surf_d2sdv2_grid(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(v\) on a rational Bézier surface with \(n+1\)

rational_bezier_surf_eval_uvvecs(→ List[List[List[float]]])

Evaluates a rational Bézier surface with \(n+1\) control points in the \(u\)-direction

rational_bezier_surf_dsdu_uvvecs(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(u\) on a rational Bézier surface with \(n+1\)

rational_bezier_surf_dsdv_uvvecs(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(v\) on a rational Bézier surface with \(n+1\)

rational_bezier_surf_d2sdu2_uvvecs(...)

Evaluates the second derivative with respect to \(u\) on a rational Bézier surface with \(n+1\)

rational_bezier_surf_d2sdv2_uvvecs(...)

Evaluates the second derivative with respect to \(v\) on a rational Bézier surface with \(n+1\)

bspline_curve_eval(→ List[float])

Evaluates a B-spline curve with \(n+1\) control points at a single \(t\)-value according to

bspline_curve_eval_dp(→ List[float])

Evaluates the derivative of the B-spline curve with respect to an individual control point at a given \(t\)-value

bspline_curve_dcdt(→ List[float])

Evaluates the first derivative with respect to \(t\) of a B-spline curve with \(n+1\)

bspline_curve_dcdt_dp(→ List[float])

Evaluates the derivative of the B-spline curve first derivative with respect to an individual control point

bspline_curve_d2cdt2(→ List[float])

Evaluates the second derivative with respect to \(t\) of a B-spline curve with \(n+1\)

bspline_curve_d2cdt2_dp(→ List[float])

Evaluates the derivative of the Bézier curve second derivative with respect to an individual control point

bspline_curve_eval_grid(→ List[List[float]])

Evaluates a B-spline curve with \(n+1\) control points on a

bspline_curve_eval_dp_grid(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a B-spline curve with

bspline_curve_dcdt_grid(→ List[List[float]])

Evaluates the first derivative with respect to \(t\) of a B-spline curve

bspline_curve_dcdt_dp_grid(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a B-spline curve first derivative with

bspline_curve_d2cdt2_grid(→ List[List[float]])

Evaluates the second derivative with respect to \(t\) of a B-spline curve

bspline_curve_d2cdt2_dp_grid(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a B-spline curve second derivative with

bspline_curve_eval_tvec(→ List[List[float]])

Evaluates a B-spline curve with \(n+1\) control points on a

bspline_curve_eval_dp_tvec(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a B-spline curve with

bspline_curve_dcdt_tvec(→ List[List[float]])

Evaluates the first derivative with respect to \(t\) of a B-spline curve

bspline_curve_dcdt_dp_tvec(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a B-spline curve first derivative with

bspline_curve_d2cdt2_tvec(→ List[List[float]])

Evaluates the second derivative with respect to \(t\) of a B-spline curve

bspline_curve_d2cdt2_dp_tvec(→ List[List[float]])

Evaluates the sensitivity with respect to an individual control point of a B-spline curve second derivative with

bspline_surf_eval(→ List[float])

Evaluates a B-spline surface with \(n+1\) control points in the \(u\)-direction

bspline_surf_dsdu(→ List[float])

Evaluates a the first derivative w.r.t. \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction

bspline_surf_dsdv(→ List[float])

Evaluates a the first derivative w.r.t. \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction

bspline_surf_d2sdu2(→ List[float])

Evaluates a the second derivative w.r.t. \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction

bspline_surf_d2sdv2(→ List[float])

Evaluates a the second derivative w.r.t. \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction

bspline_surf_eval_dp(→ List[float])

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

bspline_surf_dsdu_dp(→ List[float])

Evaluates the sensitivity of a B-spline surface first derivative with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

bspline_surf_dsdv_dp(→ List[float])

Evaluates the sensitivity of a B-spline surface first derivative with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

bspline_surf_d2sdu2_dp(→ List[float])

Evaluates the sensitivity of a B-spline surface second derivative with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

bspline_surf_d2sdv2_dp(→ List[float])

Evaluates the sensitivity of a B-spline surface second derivative with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

bspline_surf_eval_iso_u(→ List[List[float]])

Evaluates an isoparametric curve in \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction

bspline_surf_eval_iso_v(→ List[List[float]])

Evaluates an isoparametric curve in \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction

bspline_surf_dsdu_iso_u(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a

bspline_surf_dsdu_iso_v(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a

bspline_surf_dsdv_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a

bspline_surf_dsdv_iso_v(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a

bspline_surf_d2sdu2_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a

bspline_surf_d2sdu2_iso_v(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a

bspline_surf_d2sdv2_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a

bspline_surf_d2sdv2_iso_v(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a

bspline_surf_eval_dp_iso_u(ku, kv, i, j, q, r, dim, u, nv)

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\)

bspline_surf_eval_dp_iso_v(ku, kv, i, j, q, r, dim, nu, v)

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\)

bspline_surf_dsdu_dp_iso_u(ku, kv, i, j, q, r, dim, u, nv)

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(u\)

bspline_surf_dsdu_dp_iso_v(ku, kv, i, j, q, r, dim, nu, v)

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(u\)

bspline_surf_dsdv_dp_iso_u(ku, kv, i, j, q, r, dim, u, nv)

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(v\)

bspline_surf_dsdv_dp_iso_v(ku, kv, i, j, q, r, dim, nu, v)

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(v\)

bspline_surf_d2sdu2_dp_iso_u(ku, kv, i, j, q, r, dim, ...)

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(u\)

bspline_surf_d2sdu2_dp_iso_v(ku, kv, i, j, q, r, dim, ...)

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(u\)

bspline_surf_d2sdv2_dp_iso_u(ku, kv, i, j, q, r, dim, ...)

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(v\)

bspline_surf_d2sdv2_dp_iso_v(ku, kv, i, j, q, r, dim, ...)

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(v\)

bspline_surf_eval_grid(→ List[List[List[float]]])

Evaluates a B-spline surface with \(n+1\) control points in the \(u\)-direction

bspline_surf_dsdu_grid(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(u\) on a B-spline surface with \(n+1\)

bspline_surf_dsdv_grid(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(v\) on a B-spline surface with \(n+1\)

bspline_surf_d2sdu2_grid(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(u\) on a B-spline surface with \(n+1\)

bspline_surf_d2sdv2_grid(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(v\) on a B-spline surface with \(n+1\)

bspline_surf_eval_uvvecs(→ List[List[List[float]]])

Evaluates a B-spline surface with \(n+1\) control points in the \(u\)-direction

bspline_surf_dsdu_uvvecs(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(u\) on a B-spline surface with \(n+1\)

bspline_surf_dsdv_uvvecs(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(v\) on a B-spline surface with \(n+1\)

bspline_surf_d2sdu2_uvvecs(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(u\) on a B-spline surface with \(n+1\)

bspline_surf_d2sdv2_uvvecs(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(v\) on a B-spline surface with \(n+1\)

bspline_surf_eval_dp_grid(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\)

bspline_surf_dsdu_dp_grid(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\)

bspline_surf_dsdv_dp_grid(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(u\)

bspline_surf_d2sdu2_dp_grid(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(u\)

bspline_surf_d2sdv2_dp_grid(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(v\)

bspline_surf_eval_dp_uvvecs(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(v\)

bspline_surf_dsdu_dp_uvvecs(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(u\)

bspline_surf_dsdv_dp_uvvecs(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(u\)

bspline_surf_d2sdu2_dp_uvvecs(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(v\)

bspline_surf_d2sdv2_dp_iuvvecs(→ List[List[List[float]]])

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(v\)

nurbs_curve_eval(→ List[float])

Evaluates a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points at a

nurbs_curve_eval_dp(→ List[float])

Evaluates the derivative of the NURBS curve with respect to an individual control point at a given \(t\)-value

nurbs_curve_dcdt(→ List[float])

Evaluates a the first derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve

nurbs_curve_dcdt_dp(→ List[float])

Evaluates the sensitivity of the NURBS curve first derivative with respect to an individual control point at a given \(t\)-value

nurbs_curve_d2cdt2(→ List[float])

Evaluates a the second derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve

nurbs_curve_d2cdt2_dp(→ List[float])

Evaluates the sensitivity of the NURBS curve second derivative with respect to an individual control point at a given \(t\)-value

nurbs_curve_eval_grid(→ List[List[float]])

Evaluates a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points on a

nurbs_curve_eval_dp_grid(→ List[float])

Evaluates the derivative of the NURBS curve with respect to an individual control point at a given \(t\)-value

nurbs_curve_dcdt_grid(→ List[List[float]])

Evaluates a the first derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve

nurbs_curve_dcdt_dp_grid(→ List[float])

Evaluates the sensitivity of the NURBS curve first derivative with respect to an individual control point at a given \(t\)-value

nurbs_curve_d2cdt2_grid(→ List[List[float]])

Evaluates a the second derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve

nurbs_curve_d2cdt2_dp_grid(→ List[float])

Evaluates the sensitivity of the NURBS curve second derivative with respect to an individual control point at a given \(t\)-value

nurbs_curve_eval_tvec(→ List[List[float]])

Evaluates a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points on a

nurbs_curve_eval_dp_tvec(→ List[float])

Evaluates the derivative of the NURBS curve with respect to an individual control point at a given \(t\)-value

nurbs_curve_dcdt_tvec(→ List[List[float]])

Evaluates a the first derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve

nurbs_curve_dcdt_dp_tvec(→ List[float])

Evaluates the sensitivity of the NURBS curve first derivative with respect to an individual control point at a given \(t\)-value

nurbs_curve_d2cdt2_tvec(→ List[List[float]])

Evaluates a the second derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve

nurbs_curve_d2cdt2_dp_tvec(→ List[float])

Evaluates the sensitivity of the NURBS curve second derivative with respect to an individual control point at a given \(t\)-value

nurbs_surf_eval(→ List[float])

Evaluates a Non-Uniform Rational B-Spline (NURBS) surface with \(n+1\) control points in the \(u\)-direction

nurbs_surf_dsdu(→ List[float])

Evaluates the first derivative w.r.t. \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction

nurbs_surf_dsdv(→ List[float])

Evaluates the first derivative w.r.t. \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction

nurbs_surf_d2sdu2(→ List[float])

Evaluates the second derivative w.r.t. \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction

nurbs_surf_d2sdv2(→ List[float])

Evaluates the second derivative w.r.t. \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction

nurbs_surf_eval_iso_u(→ List[List[float]])

Evaluates an isoparametric curve in \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction

nurbs_surf_eval_iso_v(→ List[List[float]])

Evaluates an isoparametric curve in \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction

nurbs_surf_dsdu_iso_u(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a NURBS

nurbs_surf_dsdu_iso_v(→ List[List[float]])

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a NURBS

nurbs_surf_dsdv_iso_u(→ List[List[float]])

Evaluates the first derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a NURBS

nurbs_surf_dsdv_iso_v(→ List[List[float]])

Evaluates the first derivative w.r.t. \(v\) along an isoparametric curve in \(v\) of a NURBS

nurbs_surf_d2sdu2_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a NURBS

nurbs_surf_d2sdu2_iso_v(→ List[List[float]])

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a NURBS

nurbs_surf_d2sdv2_iso_u(→ List[List[float]])

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a NURBS

nurbs_surf_d2sdv2_iso_v(→ List[List[float]])

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(v\) of a NURBS

nurbs_surf_eval_grid(→ List[List[List[float]]])

Evaluates a Non-Uniform Rational B-Spline (NURBS) surface with \(n+1\) control points in the \(u\)-direction

nurbs_surf_dsdu_grid(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(u\) on a NURBS surface with \(n+1\)

nurbs_surf_dsdv_grid(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(v\) on a NURBS surface with \(n+1\)

nurbs_surf_d2sdu2_grid(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(u\) on a NURBS surface with \(n+1\)

nurbs_surf_d2sdv2_grid(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(v\) on a NURBS surface with \(n+1\)

nurbs_surf_eval_uvvecs(→ List[List[List[float]]])

Evaluates a NURBS surface with \(n+1\) control points in the \(u\)-direction

nurbs_surf_dsdu_uvvecs(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(u\) on a NURBS surface with \(n+1\)

nurbs_surf_dsdv_uvvecs(→ List[List[List[float]]])

Evaluates the first derivative with respect to \(v\) on a NURBS surface with \(n+1\)

nurbs_surf_d2sdu2_uvvecs(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(u\) on a NURBS surface with \(n+1\)

nurbs_surf_d2sdv2_uvvecs(→ List[List[List[float]]])

Evaluates the second derivative with respect to \(v\) on a NURBS surface with \(n+1\)

Module Contents#

rust_nurbs.bernstein_poly(n: int, i: int, t: float) float#

Evaluates the Bernstein polynomial at a single \(t\)-value. The Bernstein polynomial is given by

\[B_{i,n}(t)={n \choose i} t^i (1-t)^{n-i}\]
Parameters:
  • n (int) – Degree of the polynomial

  • i (int) – Index

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the Bernstein polynomial at \(t\)

Return type:

float

rust_nurbs.bezier_curve_eval(p: Iterable[Iterable[float]], t: float) List[float]#

Evaluates a Bézier curve with \(n+1\) control points at a single \(t\)-value according to

\[\mathbf{C}(t) = \sum\limits_{i=0}^n B_{i,n}(t) \mathbf{P}_i\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the Bézier curve at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.bezier_curve_eval_dp(i: int, n: int, dim: int, t: float) List[float]#

Evaluates the derivative of the Bézier curve with respect to an individual control point at a given \(t\)-value

Parameters:
  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve sensitivity

Returns:

1-D list representing the curve sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.bezier_curve_dcdt(p: Iterable[Iterable[float]], t: float) List[float]#

Evaluates the first derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control points at a single \(t\)-value according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \sum\limits_{i=0}^{n-1} B_{i,n-1}(t) \left[n\left( \mathbf{P}_{i+1} - \mathbf{P}_i \right)\right]\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the Bézier curve first derivative at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.bezier_curve_dcdt_dp(i: int, n: int, dim: int, t: float) List[float]#

Evaluates the derivative of the Bézier curve first derivative with respect to an individual control point

Parameters:
  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve derivative sensitivity

Returns:

1-D list representing the curve derivative sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.bezier_curve_d2cdt2(p: Iterable[Iterable[float]], t: float) List[float]#

Evaluates the second derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control points at a single \(t\)-value according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \sum\limits_{i=0}^{n-2} B_{i,n-2}(t) \left[n(n-1)\left(\mathbf{P}_{i+2} - 2 \mathbf{P}_{i+1} + \mathbf{P}_i \right)\right]\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the Bézier curve first derivative at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.bezier_curve_d2cdt2_dp(i: int, n: int, dim: int, t: float) List[float]#

Evaluates the derivative of the Bézier curve second derivative with respect to an individual control point

Parameters:
  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve derivative sensitivity

Returns:

1-D list representing the curve derivative sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.bezier_curve_eval_grid(p: Iterable[Iterable[float]], nt: int) List[List[float]]#

Evaluates a Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points according to

\[\mathbf{C}(t) = \sum\limits_{i=0}^n B_{i,n}(t) \mathbf{P}_i\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the Bézier curve at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_eval_dp_grid(i: int, n: int, dim: int, nt: int) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the control point sensitivity of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the Bézier curve control point sensitivity at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_dcdt_grid(p: Iterable[Iterable[float]], nt: int) List[List[float]]#

Evaluates the first derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \sum\limits_{i=0}^{n-1} B_{i,n-1}(t) \left[n\left( \mathbf{P}_{i+1} - \mathbf{P}_i \right)\right]\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the Bézier curve first derivative at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_dcdt_dp_grid(i: int, n: int, dim: int, nt: int) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a Bézier curve first derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the control point sensitivity of the curve first derivative at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the Bézier curve first derivative control point sensitivity at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_d2cdt2_grid(p: Iterable[Iterable[float]], nt: int) List[List[float]]#

Evaluates the second derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \sum\limits_{i=0}^{n-2} B_{i,n-2}(t) \left[n(n-1)\left(\mathbf{P}_{i+2} - 2 \mathbf{P}_{i+1} + \mathbf{P}_i \right)\right]\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the Bézier curve first derivative at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_d2cdt2_dp_grid(i: int, n: int, dim: int, nt: int) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a Bézier curve second derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the control point sensitivity of the curve second derivative at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the Bézier curve second derivative control point sensitivity at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_eval_tvec(p: Iterable[Iterable[float]], t: Iterable[float]) List[List[float]]#

Evaluates a Bézier curve with \(n+1\) control points along a vector of \(t\)-values according to

\[\mathbf{C}(t) = \sum\limits_{i=0}^n B_{i,n}(t) \mathbf{P}_i\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • t (Iterable[float]) – Parameter vector along which to evaluate the curve

Returns:

Value of the Bézier curve along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_eval_dp_tvec(i: int, n: int, dim: int, t: Iterable[float]) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Parameter vector along which to evaluate the curve control point sensitivity

Returns:

Value of the Bézier curve control point sensitivity along parameter vector \(\mathbf{t}\). Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_dcdt_tvec(p: Iterable[Iterable[float]], t: Iterable[float]) List[List[float]]#

Evaluates the first derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control points along a vector of \(t\)-values according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \sum\limits_{i=0}^{n-1} B_{i,n-1}(t) \left[n\left( \mathbf{P}_{i+1} - \mathbf{P}_i \right)\right]\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • t (Iterable[float]) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the Bézier curve first derivative along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_dcdt_dp_tvec(i: int, n: int, dim: int, t: Iterable[float]) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a Bézier curve first derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Parameter vector along which to evaluate the curve first derivative control point sensitivity

Returns:

Value of the Bézier curve first derivative control point sensitivity along parameter vector \(\mathbf{t}\). Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_d2cdt2_tvec(p: Iterable[Iterable[float]], t: Iterable[float]) List[List[float]]#

Evaluates the second derivative (with respect to \(t\)) of a Bézier curve with \(n+1\) control points along a vector of \(t\)-values according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \sum\limits_{i=0}^{n-2} B_{i,n-2}(t) \left[n(n-1)\left(\mathbf{P}_{i+2} - 2 \mathbf{P}_{i+1} + \mathbf{P}_i \right)\right]\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • t (Iterable[float]) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the Bézier curve first derivative along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_curve_d2cdt2_dp_tvec(i: int, n: int, dim: int, t: Iterable[float]) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a Bézier curve second derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Parameter vector along which to evaluate the curve second derivative control point sensitivity

Returns:

Value of the Bézier curve second derivative control point sensitivity along parameter vector \(\mathbf{t}\). Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_eval(p: Iterable[Iterable[Iterable[float]]], u: float, v: float) List[float]#

Evaluates a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the Bézier surface at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bezier_surf_dsdu(p: Iterable[Iterable[Iterable[float]]], u: float, v: float) List[float]#

Evaluates the first derivative with respect to \(u\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\frac{\text{d}}{\text{d}u} \mathbf{S}(u,v) = n \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 1,n - 1}(u) - B_{i,n - 1}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the Bézier surface first derivative with respect to \(u\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bezier_surf_dsdv(p: Iterable[Iterable[Iterable[float]]], u: float, v: float) List[float]#

Evaluates the first derivative with respect to \(v\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\frac{\text{d}}{\text{d}v} \mathbf{S}(u,v) = m \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 1,m - 1}(v) - B_{j,m - 1}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the Bézier surface first derivative with respect to \(v\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bezier_surf_d2sdu2(p: Iterable[Iterable[Iterable[float]]], u: float, v: float) List[float]#

Evaluates the second derivative with respect to \(u\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\frac{\text{d}^2}{\text{d}u^2} \mathbf{S}(u,v) = n(n-1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 2,n - 2}(u) - 2B_{i - 1,n - 2}(u) + B_{i,n - 2}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the Bézier surface second derivative with respect to \(u\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bezier_surf_d2sdv2(p: Iterable[Iterable[Iterable[float]]], u: float, v: float) List[float]#

Evaluates the first derivative with respect to \(v\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\frac{\text{d}^2}{\text{d}v^2} \mathbf{S}(u,v) = m(m - 1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 2,m - 2}(v) - 2B_{j - 1,m - 2}(v) - B_{j,m - 2}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the Bézier surface second derivative with respect to \(v\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bezier_surf_eval_dp(i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the Bézier surface with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \mathbf{S}(u,v) = B_{i,n}(u) B_{j,m}(v)\]
Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.bezier_surf_dsdu_dp(i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the Bézier surface first \(u\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \left(\partial \frac{\mathbf{S}(u,v)}{\partial u} \right) = n \left[ B_{i - 1,n - 1}(u) - B_{i,n - 1}(u) \right] B_{j,m}(v)\]
Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface derivative sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.bezier_surf_dsdv_dp(i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the Bézier surface first \(v\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \left(\partial \frac{\mathbf{S}(u,v)}{\partial v} \right) = m B_{i,n}(u) \left[ B_{j - 1,m - 1}(v) - B_{j,m - 1}(v) \right]\]
Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface derivative sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.bezier_surf_d2sdu2_dp(i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the Bézier surface second \(u\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \left(\partial^2 \frac{\mathbf{S}(u,v)}{\partial u^2} \right) = n (n-1) \left[ B_{i - 2,n - 2}(u) - 2B_{i - 1,n - 2}(u) + B_{i,n - 2}(u) \right] B_{j,m}(v)\]
Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface derivative sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.bezier_surf_d2sdv2_dp(i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the Bézier surface second \(v\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \left(\partial^2 \frac{\mathbf{S}(u,v)}{\partial v^2} \right) = m (m-1) B_{i,n}(u) \left[ B_{j - 2,m - 2}(v) - 2B_{j - 1,m - 2}(v) - B_{j,m - 2}(v) \right]\]
Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface derivative sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.bezier_surf_eval_dp_iso_u(i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the Bézier surface with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_eval_dp_iso_v(i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the Bézier surface with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_dsdu_dp_iso_u(i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the Bézier surface first \(u\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_dsdu_dp_iso_v(i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the Bézier surface first \(u\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_dsdv_dp_iso_u(i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the Bézier surface first \(v\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_dsdv_dp_iso_v(i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the Bézier surface first \(v\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_d2sdu2_dp_iso_u(i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the Bézier surface second \(u\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_d2sdu2_dp_iso_v(i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the Bézier surface second \(u\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_d2sdv2_dp_iso_u(i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the Bézier surface second \(v\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_d2sdv2_dp_iso_v(i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the Bézier surface second \(v\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bezier_surf_eval_dp_grid(i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the Bézier surface with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_dsdu_dp_grid(i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the Bézier surface first \(u\)-derivative with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface derivative sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface derivative sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_dsdv_dp_grid(i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the Bézier surface first \(v\)-derivative with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface derivative sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface derivative sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_d2sdu2_dp_grid(i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the Bézier surface second \(u\)-derivative with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface derivative sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface derivative sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_d2sdv2_dp_grid(i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the Bézier surface second \(v\)-derivative with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface derivative sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface derivative sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_eval_iso_u(p: Iterable[Iterable[Iterable[float]]], u: float, nv: int) List[List[float]]#

Evaluates an isoparametric curve in \(u\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) points along the \(u\)-isoparametric curve of the Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_eval_iso_v(p: Iterable[Iterable[Iterable[float]]], nu: int, v: float) List[List[float]]#

Evaluates an isoparametric curve in \(v\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) points along the \(v\)-isoparametric curve of the Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_dsdu_iso_u(p: Iterable[Iterable[Iterable[float]]], u: float, nv: int) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\frac{\text{d}}{\text{d}u} \mathbf{S}(u,v) = n \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 1,n - 1}(u) - B_{i,n - 1}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) first derivatives w.r.t. \(u\) along the \(u\)-isoparametric curve of the Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_dsdu_iso_v(p: Iterable[Iterable[Iterable[float]]], nu: int, v: float) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\frac{\text{d}}{\text{d}u} \mathbf{S}(u,v) = n \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 1,n - 1}(u) - B_{i,n - 1}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) first derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_dsdv_iso_u(p: Iterable[Iterable[Iterable[float]]], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\frac{\text{d}}{\text{d}v} \mathbf{S}(u,v) = m \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 1,m - 1}(v) - B_{j,m - 1}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) first derivatives w.r.t. \(v\) along the \(u\)-isoparametric curve of the Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_dsdv_iso_v(p: Iterable[Iterable[Iterable[float]]], nu: int, v: float) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\frac{\text{d}}{\text{d}v} \mathbf{S}(u,v) = m \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 1,m - 1}(v) - B_{j,m - 1}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) first derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_d2sdu2_iso_u(p: Iterable[Iterable[Iterable[float]]], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\frac{\text{d}^2}{\text{d}u^2} \mathbf{S}(u,v) = n(n-1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 2,n - 2} - 2B_{i - 1,n - 2}(u) + B_{i,n - 2}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) second derivatives w.r.t. \(u\) along the \(u\)-isoparametric curve of the Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_d2sdu2_iso_v(p: Iterable[Iterable[Iterable[float]]], nu: int, v: float) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\frac{\text{d}^2}{\text{d}u^2} \mathbf{S}(u,v) = n(n-1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 2,n - 2} - 2B_{i - 1,n - 2}(u) + B_{i,n - 2}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) second derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_d2sdv2_iso_u(p: Iterable[Iterable[Iterable[float]]], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\frac{\text{d}^2}{\text{d}v^2} \mathbf{S}(u,v) = m(m - 1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 2,m - 2} - 2B_{j - 1,m - 2}(v) - B_{j,m - 2}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) second derivatives w.r.t. \(v\) along the \(u\)-isoparametric curve of the Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_d2sdv2_iso_v(p: Iterable[Iterable[Iterable[float]]], nu: int, v: float) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\frac{\text{d}^2}{\text{d}v^2} \mathbf{S}(u,v) = m(m - 1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 2,m - 2} - 2B_{j - 1,m - 2}(v) - B_{j,m - 2}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) second derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bezier_surf_eval_grid(p: Iterable[Iterable[Iterable[float]]], nu: int, nv: int) List[List[List[float]]]#

Evaluates a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) points on the Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_dsdu_grid(p: Iterable[Iterable[Iterable[float]]], nu: int, nv: int) List[List[List[float]]]#

Evaluates the first derivative with respect to \(u\) on a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\frac{\text{d}}{\text{d}u} \mathbf{S}(u,v) = n \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 1,n - 1}(u) - B_{i,n - 1}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(u\) on the Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_dsdv_grid(p: Iterable[Iterable[Iterable[float]]], nu: int, nv: int) List[List[List[float]]]#

Evaluates the first derivative with respect to \(v\) on a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\frac{\text{d}}{\text{d}v} \mathbf{S}(u,v) = m \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 1,m - 1}(v) - B_{j,m - 1}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(v\) on the Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_d2sdu2_grid(p: Iterable[Iterable[Iterable[float]]], nu: int, nv: int) List[List[List[float]]]#

Evaluates the second derivative with respect to \(u\) on a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\frac{\text{d}^2}{\text{d}u^2} \mathbf{S}(u,v) = n(n-1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 2,n - 2} - 2B_{i - 1,n - 2}(u) + B_{i,n - 2}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(u\) on the Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_d2sdv2_grid(p: Iterable[Iterable[Iterable[float]]], nu: int, nv: int) List[List[List[float]]]#

Evaluates the second derivative with respect to \(v\) on a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\frac{\text{d}^2}{\text{d}v^2} \mathbf{S}(u,v) = m(m - 1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 2,m - 2} - 2B_{j - 1,m - 2}(v) - B_{j,m - 2}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(v\) on the Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_eval_uvvecs(p: Iterable[Iterable[Iterable[float]]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of points on the Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_dsdu_uvvecs(p: Iterable[Iterable[Iterable[float]]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the first derivative with respect to \(u\) on a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\frac{\text{d}}{\text{d}u} \mathbf{S}(u,v) = n \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 1,n - 1}(u) - B_{i,n - 1}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(u\) on the Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_dsdv_uvvecs(p: Iterable[Iterable[Iterable[float]]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the first derivative with respect to \(v\) on a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\frac{\text{d}}{\text{d}v} \mathbf{S}(u,v) = m \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 1,m - 1}(v) - B_{j,m - 1}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(v\) on the Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_d2sdu2_uvvecs(p: Iterable[Iterable[Iterable[float]]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the second derivative with respect to \(u\) on a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\frac{\text{d}^2}{\text{d}u^2} \mathbf{S}(u,v) = n(n-1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m \left[ B_{i - 2,n - 2} - 2B_{i - 1,n - 2}(u) + B_{i,n - 2}(u) \right] B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(u\) on the Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bezier_surf_d2sdv2_uvvecs(p: Iterable[Iterable[Iterable[float]]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the second derivative with respect to \(v\) on a Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\frac{\text{d}^2}{\text{d}v^2} \mathbf{S}(u,v) = m(m - 1) \sum\limits_{i=0}^n \sum\limits_{j=0}^m B_{i,n}(u) \left[ B_{j - 2,m - 2} - 2B_{j - 1,m - 2}(v) - B_{j,m - 2}(v) \right] \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(v\) on the Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_curve_eval(p: Iterable[Iterable[float]], w: Iterable[float], t: float) List[float]#

Evaluates a rational Bézier curve with \(n+1\) control points at a single \(t\)-value according to

\[\mathbf{C}(t) = \frac{\sum_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i}{\sum_{i=0}^n B_{i,n}(t) w_i}\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the rational Bézier curve at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.rational_bezier_curve_eval_dp(w: Iterable[float], i: int, n: int, dim: int, t: float) List[float]#

Evaluates the derivative of the rational Bézier curve with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve sensitivity

Returns:

1-D list representing the curve sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.rational_bezier_curve_dcdt(p: Iterable[Iterable[float]], w: Iterable[float], t: float) List[float]#

Evaluates the first derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control points at a single \(t\)-value according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \frac{f'(t)g(t) - f(t)g'(t)}{g^2(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \\ f'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \mathbf{P}_i \\ g'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \end{align}\end{split}\]

and \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the rational Bézier curve first derivative at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.rational_bezier_curve_dcdt_dp(w: Iterable[float], i: int, n: int, dim: int, t: float) List[float]#

Evaluates the sensitivity of the rational Bézier curve first derivative with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve first derivative sensitivity

Returns:

1-D list representing the curve first derivative sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.rational_bezier_curve_d2cdt2(p: Iterable[Iterable[float]], w: Iterable[float], t: float) List[float]#

Evaluates the second derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control points at a single \(t\)-value according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \frac{f''(t)g^2(t) - f(t)g(t)g''(t) - 2f'(t)g(t)g'(t) + 2f(t)[g'(t)]^2}{g^3(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \\ f'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \mathbf{P}_i \\ g'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \\ f''(t) &= n (n-1) \sum\limits_{i=0}^n \left[ B_{i-2,n-2}(t) - 2B_{i-1,n-2}(t) + B_{i,n-2}(t) \right] w_i \mathbf{P}_i \\ g''(t) &= n (n-1) \sum\limits_{i=0}^n \left[ B_{i-2,n-2}(t) - 2B_{i-1,n-2}(t) + B_{i,n-2}(t) \right] w_i \end{align}\end{split}\]

and \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the rational Bézier curve first derivative at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.rational_bezier_curve_d2cdt2_dp(w: Iterable[float], i: int, n: int, dim: int, t: float) List[float]#

Evaluates the sensitivity of the rational Bézier curve second derivative with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve second derivative sensitivity

Returns:

1-D list representing the curve second derivative sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.rational_bezier_curve_eval_grid(p: Iterable[Iterable[float]], w: Iterable[float], nt: int) List[List[float]]#

Evaluates a rational Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points according to

\[\mathbf{C}(t) = \frac{\sum_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i}{\sum_{i=0}^n B_{i,n}(t) w_i}\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the rational Bézier curve at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_eval_dp_grid(w: Iterable[float], i: int, n: int, dim: int, nt: int) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a rational Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the control point sensitivity of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the rational Bézier curve control point sensitivity at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_dcdt_grid(p: Iterable[Iterable[float]], w: Iterable[float], nt: int) List[List[float]]#

Evaluates the first derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \frac{f'(t)g(t) - f(t)g'(t)}{g^2(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \\ f'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \mathbf{P}_i \\ g'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \end{align}\end{split}\]

and \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the rational Bézier curve first derivative at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_dcdt_dp_grid(w: Iterable[float], i: int, n: int, dim: int, nt: int) List[List[float]]#

Evaluates the first derivative sensitivity with respect to an individual control point of a rational Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the first derivative control point sensitivity of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the rational Bézier curve first derivative control point sensitivity at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_d2cdt2_grid(p: Iterable[Iterable[float]], w: Iterable[float], nt: int) List[List[float]]#

Evaluates the second derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points according to

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \\ f'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \mathbf{P}_i \\ g'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \\ f''(t) &= n (n-1) \sum\limits_{i=0}^n \left[ B_{i-2,n-2}(t) - 2B_{i-1,n-2}(t) + B_{i,n-2}(t) \right] w_i \mathbf{P}_i \\ g''(t) &= n (n-1) \sum\limits_{i=0}^n \left[ B_{i-2,n-2}(t) - 2B_{i-1,n-2}(t) + B_{i,n-2}(t) \right] w_i \end{align}\end{split}\]

and \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the rational Bézier curve first derivative at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_d2cdt2_dp_grid(w: Iterable[float], i: int, n: int, dim: int, nt: int) List[List[float]]#

Evaluates the second derivative sensitivity with respect to an individual control point of a rational Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the second derivative control point sensitivity of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the rational Bézier curve second derivative control point sensitivity at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_eval_tvec(p: Iterable[Iterable[float]], w: Iterable[float], t: Iterable[float]) List[List[float]]#

Evaluates a rational Bézier curve with \(n+1\) control points along a vector of \(t\)-values according to

\[\mathbf{C}(t) = \frac{\sum_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i}{\sum_{i=0}^n B_{i,n}(t) w_i}\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • t (Iterable[float]) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the rational Bézier curve along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_eval_dp_tvec(w: Iterable[float], i: int, n: int, dim: int, t: Iterable[float]) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a rational Bézier curve with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Parameter vector along which to evaluate the curve control point sensitivity

Returns:

Value of the rational Bézier curve control point sensitivity along parameter vector \(\mathbf{t}\). Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_dcdt_tvec(p: Iterable[Iterable[float]], w: Iterable[float], t: Iterable[float]) List[List[float]]#

Evaluates the first derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control points along a vector of \(t\)-values according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \frac{f'(t)g(t) - f(t)g'(t)}{g^2(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \\ f'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \mathbf{P}_i \\ g'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \end{align}\end{split}\]

and \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • t (Iterable[float]) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the rational Bézier curve first derivative along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_dcdt_dp_tvec(w: Iterable[float], i: int, n: int, dim: int, t: Iterable[float]) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a rational Bézier curve first derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Parameter vector along which to evaluate the curve first derivative control point sensitivity

Returns:

Value of the rational Bézier curve first derivative control point sensitivity along parameter vector \(\mathbf{t}\). Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_d2cdt2_tvec(p: Iterable[Iterable[float]], w: Iterable[float], t: Iterable[float]) List[List[float]]#

Evaluates the second derivative (with respect to \(t\)) of a rational Bézier curve with \(n+1\) control points along a vector of \(t\)-values according to

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n B_{i,n}(t) w_i \\ f'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \mathbf{P}_i \\ g'(t) &= n \sum\limits_{i=0}^n \left[ B_{i-1,n-1}(t) - B_{i,n-1}(t) \right] w_i \\ f''(t) &= n (n-1) \sum\limits_{i=0}^n \left[ B_{i-2,n-2}(t) - 2B_{i-1,n-2}(t) + B_{i,n-2}(t) \right] w_i \mathbf{P}_i \\ g''(t) &= n (n-1) \sum\limits_{i=0}^n \left[ B_{i-2,n-2}(t) - 2B_{i-1,n-2}(t) + B_{i,n-2}(t) \right] w_i \end{align}\end{split}\]

and \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • t (Iterable[float]) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the rational Bézier curve first derivative along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_curve_d2cdt2_dp_tvec(w: Iterable[float], i: int, n: int, dim: int, t: Iterable[float]) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a rational Bézier curve second derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • i (int) – Index of the control point

  • n (int) – Degree of the curve (number of control points minus one)

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Parameter vector along which to evaluate the curve second derivative control point sensitivity

Returns:

Value of the rational Bézier curve second derivative control point sensitivity along parameter vector \(\mathbf{t}\). Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_eval(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, v: float) List[float]#

Evaluates a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\mathbf{S}(u,v) = \frac{\sum_{i=0}^n \sum_{j=0}^m B_{i,n}(u) B_{j,m}(v) w_{i,j} \mathbf{P}_{i,j}}{\sum_{i=0}^n \sum_{j=0}^m B_{i,n}(u) B_{j,m}(v) w_{i,j}}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the rational Bézier surface at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.rational_bezier_surf_dsdu(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, v: float) List[float]#

Evaluates the first derivative w.r.t. \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the rational Bézier surface first derivative w.r.t. \(u\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.rational_bezier_surf_dsdv(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, v: float) List[float]#

Evaluates the first derivative w.r.t. \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the rational Bézier surface first derivative w.r.t. \(v\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.rational_bezier_surf_d2sdu2(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, v: float) List[float]#

Evaluates the second derivative w.r.t. \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the rational Bézier surface second derivative w.r.t. \(u\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.rational_bezier_surf_d2sdv2(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, v: float) List[float]#

Evaluates the second derivative w.r.t. \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the rational Bézier surface second derivative w.r.t. \(v\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.rational_bezier_surf_eval_dp(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the rational Bézier surface with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \mathbf{S}(u,v) = \frac{B_{i,n}(u) B_{j,m}(v) w_{i,j}}{\sum\limits_{ii=0}^n \sum\limits_{jj=0}^m B_{ii,n}(u) B_{jj,m}(v) w_{ii,jj}}\]
Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.rational_bezier_surf_dsdu_dp(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the rational Bézier surface first \(u\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \left( \frac{\partial \mathbf{S}(u,v)}{\partial u} \right) = \frac{\frac{\partial f(u,v)}{\partial u} g(u,v) - f(u,v) \frac{\partial g(u,v)}{\partial u}}{g^2(u,v)}\]

where

\[\begin{split}\begin{align} f(u,v) &= B_{i,n}(u) B_{j,m}(v) w_{i,j} \\ g(u,v) &= \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m B_{ii,n}(u) B_{jj,m}(v) w_{ii,jj} \\ \frac{\partial f(u,v)}{\partial u} &= n [B_{i-1,n-1}(u) - B_{i,n-1}(u)] B_{j,m}(v) w_{i,j} \\ \frac{\partial g(u,v)}{\partial u} &= n \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m [B_{ii-1,n-1}(u) - B_{ii,n-1}(u)] B_{jj,m}(v) w_{ii,jj} \end{align}\end{split}\]
Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface derivative sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.rational_bezier_surf_dsdv_dp(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the rational Bézier surface first \(v\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \left( \frac{\partial \mathbf{S}(u,v)}{\partial v} \right) = \frac{\frac{\partial f(u,v)}{\partial v} g(u,v) - f(u,v) \frac{\partial g(u,v)}{\partial v}}{g^2(u,v)}\]

where

\[\begin{split}\begin{align} f(u,v) &= B_{i,n}(u) B_{j,m}(v) w_{i,j} \\ g(u,v) &= \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m B_{ii,n}(u) B_{jj,m}(v) w_{ii,jj} \\ \frac{\partial f(u,v)}{\partial v} &= m B_{i,n}(u) [B_{j-1,m-1}(v) - B_{j,m-1}(v)] w_{i,j} \\ \frac{\partial g(u,v)}{\partial v} &= m \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m B_{ii,n}(u) [B_{jj-1,m-1}(v) - B_{jj,m-1}(v)] w_{ii,jj} \end{align}\end{split}\]
Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface derivative sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.rational_bezier_surf_d2sdu2_dp(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the rational Bézier surface second \(u\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \left( \frac{\partial^2 \mathbf{S}(u,v)}{\partial u^2} \right) = \frac{\frac{\partial^2 f(u,v)}{\partial u^2} g^2(u, v) - f(u, v)g(u, v)\frac{\partial^2 g(u,v)}{\partial u^2} - 2\frac{\partial f(u,v)}{\partial u} g(u,v) \frac{\partial g(u,v)}{\partial u} + 2f(u, v)\left[ \frac{\partial g(u,v)}{\partial u} \right]^2}{g^3(u, v)}\]

where

\[\begin{split}\begin{align} f(u,v) &= B_{i,n}(u) B_{j,m}(v) w_{i,j} \\ g(u,v) &= \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m B_{ii,n}(u) B_{jj,m}(v) w_{ii,jj} \\ \frac{\partial f(u,v)}{\partial u} &= n [B_{i-1,n-1}(u) - B_{i,n-1}(u)] B_{j,m}(v) w_{i,j} \\ \frac{\partial g(u,v)}{\partial u} &= n \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m [B_{ii-1,n-1}(u) - B_{ii,n-1}(u)] B_{jj,m}(v) w_{ii,jj} \\ \frac{\partial^2 f(u,v)}{\partial u^2} &= n(n-1) [B_{i-2,n-2}(u) - 2 B_{i-1,n-2}(u) + B_{i,n-2}(u)] B_{j,m}(v) w_{i,j} \\ \frac{\partial^2 g(u,v)}{\partial u^2} &= n(n-1) \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m [B_{ii-2,n-2}(u)-2B_{ii-1,n-2}(u) + B_{ii,n-2}(u)] B_{jj,m}(v) w_{ii,jj} \end{align}\end{split}\]
Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface derivative sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.rational_bezier_surf_d2sdv2_dp(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, v: float) List[float]#

Evaluates the derivative of the rational Bézier surface second \(v\)-derivative with respect to an individual control point at a given \((u,v)\)-pair:

\[\frac{\partial}{\partial \mathbf{P}_{i,j}} \left( \frac{\partial^2 \mathbf{S}(u,v)}{\partial v^2} \right) = \frac{\frac{\partial^2 f(u,v)}{\partial v^2} g^2(u, v) - f(u, v)g(u, v)\frac{\partial^2 g(u,v)}{\partial v^2} - 2\frac{\partial f(u,v)}{\partial v} g(u,v) \frac{\partial g(u,v)}{\partial v} + 2f(u, v)\left[ \frac{\partial g(u,v)}{\partial v} \right]^2}{g^3(u, v)}\]

where

\[\begin{split}\begin{align} f(u,v) &= B_{i,n}(u) B_{j,m}(v) w_{i,j} \\ g(u,v) &= \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m B_{ii,n}(u) B_{jj,m}(v) w_{ii,jj} \\ \frac{\partial f(u,v)}{\partial v} &= m B_{i,n}(u) [B_{j-1,m-1}(v) - B_{j,m-1}(v)] w_{i,j} \\ \frac{\partial g(u,v)}{\partial v} &= m \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m B_{ii,n}(u) [B_{jj-1,m-1}(v) - B_{jj,m-1}(v)] w_{ii,jj} \\ \frac{\partial^2 f(u,v)}{\partial v^2} &= m(m-1) B_{i,n}(u) [B_{j-2,m-2}(v) - 2 B_{j-1,m-2}(v) + B_{j,m-2}(v)] w_{i,j} \\ \frac{\partial^2 g(u,v)}{\partial v^2} &= m(m-1) \sum\limits_{ii=0}^n \sum\limits_{jj=0}^m B_{ii,n}(u) [B_{jj-2,m-2}(v)-2B_{jj-1,m-2}(v) + B_{jj,m-2}(v)] w_{ii,jj} \end{align}\end{split}\]
Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

1-D list representing the surface derivative sensitivity at \((u,v)\) to the control point \(\mathbf{P}_{i,j}\)

Return type:

List[float]

rust_nurbs.rational_bezier_surf_eval_dp_iso_u(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the rational Bézier surface with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_eval_dp_iso_v(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the rational Bézier surface with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_dsdu_dp_iso_u(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the rational Bézier surface first \(u\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_dsdu_dp_iso_v(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the rational Bézier surface first \(u\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_dsdv_dp_iso_u(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the rational Bézier surface first \(v\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_dsdv_dp_iso_v(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the rational Bézier surface first \(v\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_d2sdu2_dp_iso_u(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the rational Bézier surface second \(u\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_d2sdu2_dp_iso_v(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the rational Bézier surface second \(u\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_d2sdv2_dp_iso_u(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, u: float, nv: int) List[List[float]]#

Evaluates the derivative of the rational Bézier surface second \(v\)-derivative with respect to an individual control point along a \(u\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface sensitivity

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_d2sdv2_dp_iso_v(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, v: float) List[List[float]]#

Evaluates the derivative of the rational Bézier surface second \(v\)-derivative with respect to an individual control point along a \(v\)-isoparametric curve

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitivities

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface sensitivity

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_eval_dp_grid(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the rational Bézier surface with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_dsdu_dp_grid(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the rational Bézier surface first \(u\)-derivative with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface derivative sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface derivative sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_dsdv_dp_grid(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the rational Bézier surface first \(v\)-derivative with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface derivative sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface derivative sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_d2sdu2_dp_grid(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the rational Bézier surface second \(u\)-derivative with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface derivative sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface derivative sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_d2sdv2_dp_grid(w: Iterable[Iterable[float]], i: int, j: int, n: int, m: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the derivative of the rational Bézier surface second \(v\)-derivative with respect to an individual control point on a \((u,v)\) grid

Parameters:
  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • n (int) – Degree of the surface in the \(u\)-direction

  • m (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly-spaced \(u\)-values at which to evaluate the surface derivative sensitiviies

  • nv (int) – Number of linearly-spaced \(v\)-values at which to evaluate the surface derivative sensitiviies

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_eval_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, nv: int) List[List[float]]#

Evaluates an isoparametric curve in \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) points along the \(u\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_eval_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, v: float) List[List[float]]#

Evaluates an isoparametric curve in \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) points along the \(v\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_dsdu_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, nv: int) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) first derivatives w.r.t. \(u\) along the \(u\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_dsdu_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, v: float) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) first derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_dsdv_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, nv: int) List[List[float]]#

Evaluates the first derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) first derivatives w.r.t. \(v\) along the \(u\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_dsdv_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, v: float) List[List[float]]#

Evaluates the first derivative w.r.t. \(v\) along an isoparametric curve in \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) first derivatives w.r.t. \(v\) along the \(v\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_d2sdu2_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) second derivatives w.r.t. \(u\) along the \(u\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_d2sdu2_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, v: float) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) second derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_d2sdv2_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) second derivatives w.r.t. \(v\) along the \(u\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_d2sdv2_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, v: float) List[List[float]]#

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(v\) of a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) second derivatives w.r.t. \(v\) along the \(v\)-isoparametric curve of the rational Bézier surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.rational_bezier_surf_eval_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, nv: int) List[List[List[float]]]#

Evaluates a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\mathbf{S}(u,v) = \frac{\sum_{i=0}^n \sum_{j=0}^m B_{i,n}(u) B_{j,m}(v) w_{i,j} \mathbf{P}_{i,j}}{\sum_{i=0}^n \sum_{j=0}^m B_{i,n}(u) B_{j,m}(v) w_{i,j}}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) points on the rational Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_dsdu_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, nv: int) List[List[List[float]]]#

Evaluates the first derivative with respect to \(u\) on a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(u\) on the rational Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_dsdv_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, nv: int) List[List[List[float]]]#

Evaluates the first derivative with respect to \(v\) on a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(v\) on the rational Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_d2sdu2_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, nv: int) List[List[List[float]]]#

Evaluates the second derivative with respect to \(u\) on a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(u\) on the rational Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_d2sdv2_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], nu: int, nv: int) List[List[List[float]]]#

Evaluates the second derivative with respect to \(v\) on a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(v\) on the rational Bézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_eval_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of points on the rational Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_dsdu_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the first derivative with respect to \(u\) on a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(u\) on the rational Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_dsdv_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the first derivative with respect to \(v\) on a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(v\) on the rational Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_d2sdu2_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the second derivative with respect to \(u\) on a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(u\) on the rational Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.rational_bezier_surf_d2sdv2_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the second derivative with respect to \(v\) on a rational Bézier surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(v\) on the rational Bézier surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_curve_eval(p: Iterable[Iterable[float]], k: Iterable[float], t: float) List[float]#

Evaluates a B-spline curve with \(n+1\) control points at a single \(t\)-value according to

\[\mathbf{C}(t) = \sum\limits_{i=0}^n N_{i,q}(t) \mathbf{P}_i\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\), defined recursively as

\[N_{i,q} = \frac{t - t_i}{t_{i+q} - t_i} N_{i,q-1}(t) + \frac{t_{i+q+1} - t}{t_{i+q+1} - t_{i+1}} N_{i+1, q-1}(t)\]

with base case

\[\begin{split}N_{i,0} = \begin{cases} 1, & \text{if } t_i \leq t < t_{i+1} \text{ and } t_i < t_{i+1} \\ 0, & \text{otherwise} \end{cases}\end{split}\]

The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • k (Iterable[float]) – 1-D list or array of knots

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the B-spline curve at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.bspline_curve_eval_dp(k: Iterable[float], i: int, q: int, dim: int, t: float) List[float]#

Evaluates the derivative of the B-spline curve with respect to an individual control point at a given \(t\)-value

Parameters:
  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve sensitivity

Returns:

1-D list representing the curve sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.bspline_curve_dcdt(p: Iterable[Iterable[float]], k: Iterable[float], t: float) List[float]#

Evaluates the first derivative with respect to \(t\) of a B-spline curve with \(n+1\) control points at a single \(t\)-value according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \sum\limits_{i=0}^n N'_{i,q}(t) \mathbf{P}_i\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\) and its derivative is given by

\[N'_{i,q}(t) = \frac{q}{k_{i+q} - k_i} N_{i,q-1}(t) - \frac{q}{k_{i+q+1} - k_{i+1}} N_{i+1,q-1}(t)\]

The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • k (Iterable[float]) – 1-D list or array of knots

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the first derivative w.r.t. \(t\) of the B-spline curve at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.bspline_curve_dcdt_dp(k: Iterable[float], i: int, q: int, dim: int, t: float) List[float]#

Evaluates the derivative of the B-spline curve first derivative with respect to an individual control point

Parameters:
  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve derivative sensitivity

Returns:

1-D list representing the curve derivative sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.bspline_curve_d2cdt2(p: Iterable[Iterable[float]], k: Iterable[float], t: float) List[float]#

Evaluates the second derivative with respect to \(t\) of a B-spline curve with \(n+1\) control points at a single \(t\)-value according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \sum\limits_{i=0}^n N''_{i,q}(t) \mathbf{P}_i\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\) and its second derivative is given by

\[N''_{i,q}(t) = \frac{q}{k_{i+q} - k_i} \left[ \frac{q-1}{k_{i+q-1}-k_i} N_{i,q-2}(t) - \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) \right] - \frac{q}{k_{i+q+1} - k_{i+1}} \left[ \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) - \frac{q-1}{k_{i+q+1}-k_{i+2}} N_{i+2,q-2}(t) \right]\]

The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • k (Iterable[float]) – 1-D list or array of knots

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the second derivative w.r.t. \(t\) of the B-spline curve at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.bspline_curve_d2cdt2_dp(k: Iterable[float], i: int, q: int, dim: int, t: float) List[float]#

Evaluates the derivative of the Bézier curve second derivative with respect to an individual control point

Parameters:
  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve derivative sensitivity

Returns:

1-D list representing the curve derivative sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.bspline_curve_eval_grid(p: Iterable[Iterable[float]], k: Iterable[float], nt: int) List[List[float]]#

Evaluates a B-spline curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\mathbf{C}(t) = \sum\limits_{i=0}^n N_{i,q}(t) \mathbf{P}_i\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • k (Iterable[float]) – 1-D list or array of knots

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the B-spline curve at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_eval_dp_grid(k: Iterable[float], i: int, q: int, dim: int, nt: int) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a B-spline curve with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the control point sensitivity of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the B-spline curve control point sensitivity at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_dcdt_grid(p: Iterable[Iterable[float]], k: Iterable[float], nt: int) List[List[float]]#

Evaluates the first derivative with respect to \(t\) of a B-spline curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \sum\limits_{i=0}^n N'_{i,q}(t) \mathbf{P}_i\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\) and its derivative is given by

\[N'_{i,q}(t) = \frac{q}{k_{i+q} - k_i} N_{i,q-1}(t) - \frac{q}{k_{i+q+1} - k_{i+1}} N_{i+1,q-1}(t)\]

The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • k (Iterable[float]) – 1-D list or array of knots

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the B-spline curve first derivatve w.r.t. \(t\) at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_dcdt_dp_grid(k: Iterable[float], i: int, q: int, dim: int, nt: int) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a B-spline curve first derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the control point sensitivity of the curve first derivative at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the B-spline curve first derivative control point sensitivity at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_d2cdt2_grid(p: Iterable[Iterable[float]], k: Iterable[float], nt: int) List[List[float]]#

Evaluates the second derivative with respect to \(t\) of a B-spline curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \sum\limits_{i=0}^n N''_{i,q}(t) \mathbf{P}_i\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\) and its second derivative is given by

\[N''_{i,q}(t) = \frac{q}{k_{i+q} - k_i} \left[ \frac{q-1}{k_{i+q-1}-k_i} N_{i,q-2}(t) - \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) \right] - \frac{q}{k_{i+q+1} - k_{i+1}} \left[ \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) - \frac{q-1}{k_{i+q+1}-k_{i+2}} N_{i+2,q-2}(t) \right]\]

The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • k (Iterable[float]) – 1-D list or array of knots

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the B-spline curve second derivative w.r.t. \(t\) at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_d2cdt2_dp_grid(k: Iterable[float], i: int, q: int, dim: int, nt: int) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a B-spline curve second derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the control point sensitivity of the curve second derivative at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the B-spline curve second derivative control point sensitivity at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_eval_tvec(p: Iterable[Iterable[float]], k: Iterable[float], t: Iterable[float]) List[List[float]]#

Evaluates a B-spline curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\mathbf{C}(t) = \sum\limits_{i=0}^n N_{i,q}(t) \mathbf{P}_i\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • k (Iterable[float]) – 1-D list or array of knots

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the B-spline curve along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_eval_dp_tvec(k: Iterable[float], i: int, q: int, dim: int, t: Iterable[float]) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a B-spline curve with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the B-spline curve control point sensitivity along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_dcdt_tvec(p: Iterable[Iterable[float]], k: Iterable[float], t: Iterable[float]) List[List[float]]#

Evaluates the first derivative with respect to \(t\) of a B-spline curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \sum\limits_{i=0}^n N'_{i,q}(t) \mathbf{P}_i\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\) and its derivative is given by

\[N'_{i,q}(t) = \frac{q}{k_{i+q} - k_i} N_{i,q-1}(t) - \frac{q}{k_{i+q+1} - k_{i+1}} N_{i+1,q-1}(t)\]

The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • k (Iterable[float]) – 1-D list or array of knots

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the B-spline curve first derivatve w.r.t. \(t\) along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_dcdt_dp_tvec(k: Iterable[float], i: int, q: int, dim: int, t: Iterable[float]) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a B-spline curve first derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the B-spline curve first derivative control point sensitivity along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_d2cdt2_tvec(p: Iterable[Iterable[float]], k: Iterable[float], t: Iterable[float]) List[List[float]]#

Evaluates the second derivative with respect to \(t\) of a B-spline curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \sum\limits_{i=0}^n N''_{i,q}(t) \mathbf{P}_i\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\) and its second derivative is given by

\[N''_{i,q}(t) = \frac{q}{k_{i+q} - k_i} \left[ \frac{q-1}{k_{i+q-1}-k_i} N_{i,q-2}(t) - \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) \right] - \frac{q}{k_{i+q+1} - k_{i+1}} \left[ \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) - \frac{q-1}{k_{i+q+1}-k_{i+2}} N_{i+2,q-2}(t) \right]\]

The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • k (Iterable[float]) – 1-D list or array of knots

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the B-spline curve second derivative w.r.t. \(t\) along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_curve_d2cdt2_dp_tvec(k: Iterable[float], i: int, q: int, dim: int, t: Iterable[float]) List[List[float]]#

Evaluates the sensitivity with respect to an individual control point of a B-spline curve second derivative with \(n+1\) control points at \(N_t\) linearly-spaced points in \(t\)

Parameters:
  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the B-spline curve second derivative control point sensitivity along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 2 or 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_eval(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline in the \(u\)-direction is computed as q = len(ku) - len(p) - 1, and the degree of the B-spline surface in the \(v\)-direction is computed as r = len(kv) - len(p[0]) - 1.

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the B-spline surface at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_dsdu(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates a the first derivative w.r.t. \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\frac{\partial}{\partial u} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N'_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline in the \(u\)-direction is computed as q = len(ku) - len(p) - 1, and the degree of the B-spline surface in the \(v\)-direction is computed as r = len(kv) - len(p[0]) - 1.

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the first derivative w.r.t. \(u\) of the B-spline surface at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_dsdv(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates a the first derivative w.r.t. \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\frac{\partial}{\partial v} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N'_{j,r}(v) \mathbf{P}_{i,j}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline in the \(u\)-direction is computed as q = len(ku) - len(p) - 1, and the degree of the B-spline surface in the \(v\)-direction is computed as r = len(kv) - len(p[0]) - 1.

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the first derivative w.r.t. \(v\) of the B-spline surface at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_d2sdu2(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates a the second derivative w.r.t. \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\frac{\partial^2}{\partial u^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N''_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline in the \(u\)-direction is computed as q = len(ku) - len(p) - 1, and the degree of the B-spline surface in the \(v\)-direction is computed as r = len(kv) - len(p[0]) - 1.

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the second derivative w.r.t. \(u\) of the B-spline surface at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_d2sdv2(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates a the second derivative w.r.t. \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\frac{\partial^2}{\partial v^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N''_{j,r}(v) \mathbf{P}_{i,j}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline in the \(u\)-direction is computed as q = len(ku) - len(p) - 1, and the degree of the B-spline surface in the \(v\)-direction is computed as r = len(kv) - len(p[0]) - 1.

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the second derivative w.r.t. \(v\) of the B-spline surface at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_eval_dp(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, v: float) List[float]#

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the B-spline surface sensitivity at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_dsdu_dp(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, v: float) List[float]#

Evaluates the sensitivity of a B-spline surface first derivative with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the sensitivity of the first derivative w.r.t. \(u\) of the B-spline surface at \((u,v)\) with respect to control point \(\mathbf{P}_{i,j}\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_dsdv_dp(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, v: float) List[float]#

Evaluates the sensitivity of a B-spline surface first derivative with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the sensitivity of the first derivative w.r.t. \(v\) of the B-spline surface at \((u,v)\) with respect to control point \(\mathbf{P}_{i,j}\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_d2sdu2_dp(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, v: float) List[float]#

Evaluates the sensitivity of a B-spline surface second derivative with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the sensitivity of the second derivative w.r.t. \(u\) of the B-spline surface at \((u,v)\) with respect to control point \(\mathbf{P}_{i,j}\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_d2sdv2_dp(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, v: float) List[float]#

Evaluates the sensitivity of a B-spline surface second derivative with respect to control point \(\mathbf{P}_{i,j}\) at a \((u,v)\) parameter pair

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the sensitivity of the second derivative w.r.t. \(v\) of the B-spline surface at \((u,v)\) with respect to control point \(\mathbf{P}_{i,j}\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.bspline_surf_eval_iso_u(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates an isoparametric curve in \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) points along the \(u\)-isoparametric curve of the B-spline surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_eval_iso_v(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates an isoparametric curve in \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) points along the \(v\)-isoparametric curve of the B-spline surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_dsdu_iso_u(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\frac{\partial}{\partial u} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N'_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) first derivatives w.r.t. \(u\) along the \(u\)-isoparametric curve of the B-spline surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_dsdu_iso_v(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\frac{\partial}{\partial u} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N'_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) first derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the B-spline surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_dsdv_iso_u(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\frac{\partial}{\partial v} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N'_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) first derivatives w.r.t. \(v\) along the \(u\)-isoparametric curve of the B-spline surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_dsdv_iso_v(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\frac{\partial}{\partial v} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N'_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) first derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the B-spline surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_d2sdu2_iso_u(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\frac{\partial^2}{\partial u^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N''_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) second derivatives w.r.t. \(u\) along the \(u\)-isoparametric curve of the B-spline surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_d2sdu2_iso_v(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\frac{\partial^2}{\partial u^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N''_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) second derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the B-spline surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_d2sdv2_iso_u(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction according to

\[\frac{\partial^2}{\partial v^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N''_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) second derivatives w.r.t. \(v\) along the \(u\)-isoparametric curve of the B-spline surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_d2sdv2_iso_v(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u\) linearly-spaced points along the \(u\)-direction according to

\[\frac{\partial^2}{\partial v^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N''_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) second derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the B-spline surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.bspline_surf_eval_dp_iso_u(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, nv: int)#

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_eval_dp_iso_v(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, v: float)#

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_dsdu_dp_iso_u(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, nv: int)#

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(u\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_dsdu_dp_iso_v(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, v: float)#

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(u\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_dsdv_dp_iso_u(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, nv: int)#

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(v\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_dsdv_dp_iso_v(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, v: float)#

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(v\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_d2sdu2_dp_iso_u(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, nv: int)#

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(u\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_d2sdu2_dp_iso_v(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, v: float)#

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(u\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_d2sdv2_dp_iso_u(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: float, nv: int)#

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(v\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

2-D array of size \(N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_d2sdv2_dp_iso_v(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, v: float)#

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(v\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

2-D array of size \(N_u \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[float]]

rust_nurbs.bspline_surf_eval_grid(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline in the \(u\)-direction is computed as q = len(ku) - len(p) - 1, and the degree of the B-spline surface in the \(v\)-direction is computed as r = len(kv) - len(p[0]) - 1.

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) points on the B-spline surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_dsdu_grid(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates the first derivative with respect to \(u\) on a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\frac{\partial}{\partial u} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N'_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(u\) on the B-spline surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_dsdv_grid(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates the first derivative with respect to \(v\) on a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\frac{\partial}{\partial v} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N'_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(v\) on the B-spline surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_d2sdu2_grid(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates the second derivative with respect to \(u\) on a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\frac{\partial^2}{\partial u^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N''_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(u\) on the B-spline surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_d2sdv2_grid(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates the second derivative with respect to \(v\) on a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\frac{\partial^2}{\partial v^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N''_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(v\) on the B-spline surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_eval_uvvecs(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of points on the B-spline surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_dsdu_uvvecs(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the first derivative with respect to \(u\) on a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\frac{\partial}{\partial u} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N'_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(u\) on the B-spline surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_dsdv_uvvecs(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the first derivative with respect to \(v\) on a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\frac{\partial}{\partial v} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N'_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(v\) on the B-spline surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_d2sdu2_uvvecs(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the second derivative with respect to \(u\) on a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\frac{\partial^2}{\partial u^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N''_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(u\) on the B-spline surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_d2sdv2_uvvecs(p: Iterable[Iterable[Iterable[float]]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the second derivative with respect to \(v\) on a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs according to

\[\frac{\partial^2}{\partial v^2} \mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N''_{j,r}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(v\) on the B-spline surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_eval_dp_grid(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_dsdu_dp_grid(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_dsdv_dp_grid(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(u\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_d2sdu2_dp_grid(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(u\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_d2sdv2_dp_grid(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, nu: int, nv: int) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(v\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • nu (int) – Number of linearly spaced points in the \(u\)-direction

  • nv (int) – Number of linearly spaced points in the \(v\)-direction

Returns:

3-D array of size \(N_u \times N_v \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_eval_dp_uvvecs(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface first derivative w.r.t. \(v\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (Iterable[float]:) – Parameter vector in the \(u\)-direction

  • v (Iterable[float]:) – Parameter vector in the \(v\)-direction

Returns:

3-D array of size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_dsdu_dp_uvvecs(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(u\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (Iterable[float]:) – Parameter vector in the \(u\)-direction

  • v (Iterable[float]:) – Parameter vector in the \(v\)-direction

Returns:

3-D array of size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_dsdv_dp_uvvecs(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(u\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (Iterable[float]:) – Parameter vector in the \(u\)-direction

  • v (Iterable[float]:) – Parameter vector in the \(v\)-direction

Returns:

3-D array of size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_d2sdu2_dp_uvvecs(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(v\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (Iterable[float]:) – Parameter vector in the \(u\)-direction

  • v (Iterable[float]:) – Parameter vector in the \(v\)-direction

Returns:

3-D array of size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.bspline_surf_d2sdv2_dp_iuvvecs(ku: Iterable[float], kv: Iterable[float], i: int, j: int, q: int, r: int, dim: int, u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the sensitivity of a B-spline surface second derivative w.r.t. \(v\) with respect to control point \(\mathbf{P}_{i,j}\) at \(N_u\) linearly-spaced points along the \(u\)-direction

Parameters:
  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • i (int) – Index \(i\) (\(u\)-direction) of the control point

  • j (int) – Index \(j\) (\(v\)-direction) of the control point

  • q (int) – Degree of the surface in the \(u\)-direction

  • r (int) – Degree of the surface in the \(v\)-direction

  • dim (int) – Number of spatial dimensions in the surface. Usually 3

  • u (Iterable[float]:) – Parameter vector in the \(u\)-direction

  • v (Iterable[float]:) – Parameter vector in the \(v\)-direction

Returns:

3-D array of size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the number of spatial dimensions

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_curve_eval(p: Iterable[Iterable[float]], w: Iterable[float], k: Iterable[float], t: float) List[float]#

Evaluates a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points at a single \(t\)-value according to

\[\mathbf{C}(t) = \frac{\sum_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i}{\sum_{i=0}^n N_{i,q}(t) w_i}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the NURBS curve at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.nurbs_curve_eval_dp(w: Iterable[float], k: Iterable[float], i: int, q: int, dim: int, t: float) List[float]#

Evaluates the derivative of the NURBS curve with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve sensitivity

Returns:

1-D list representing the curve sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.nurbs_curve_dcdt(p: Iterable[Iterable[float]], w: Iterable[float], k: Iterable[float], t: float) List[float]#

Evaluates a the first derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points at a single \(t\)-value according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \frac{f'(t)g(t)-f(t)g'(t)}{g^2(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \\ f'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \mathbf{P}_i \\ g'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \\ N'_{i,q}(t) &= \frac{q}{k_{i+q} - k_i} N_{i,q-1}(t) - \frac{q}{k_{i+q+1} - k_{i+1}} N_{i+1,q-1}(t) \\ \end{align}\end{split}\]

and \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the NURBS curve derivative w.r.t. \(t\) at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.nurbs_curve_dcdt_dp(w: Iterable[float], k: Iterable[float], i: int, q: int, dim: int, t: float) List[float]#

Evaluates the sensitivity of the NURBS curve first derivative with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve sensitivity

Returns:

1-D list representing the curve first derivative sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.nurbs_curve_d2cdt2(p: Iterable[Iterable[float]], w: Iterable[float], k: Iterable[float], t: float) List[float]#

Evaluates a the second derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points at a single \(t\)-value according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \frac{f''(t)g^2(t) - f(t)g(t)g''(t) - 2f'(t)g(t)g'(t) + 2f(t)[g'(t)]^2}{g^3(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \\ f'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \mathbf{P}_i \\ g'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \\ f''(t) &= \sum\limits_{i=0}^n N''_{i,q}(t) w_i \mathbf{P}_i \\ g''(t) &= \sum\limits_{i=0}^n N''_{i,q}(t) w_i \\ N'_{i,q}(t) &= \frac{q}{k_{i+q} - k_i} N_{i,q-1}(t) - \frac{q}{k_{i+q+1} - k_{i+1}} N_{i+1,q-1}(t) \\ N''_{i,q}(t) &= \frac{q}{k_{i+q} - k_i} \left[ \frac{q-1}{k_{i+q-1}-k_i} N_{i,q-2}(t) - \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) \right] - \frac{q}{k_{i+q+1} - k_{i+1}} \left[ \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) - \frac{q-1}{k_{i+q+1}-k_{i+2}} N_{i+2,q-2}(t) \right] \end{align}\end{split}\]

and \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the NURBS curve second derivative w.r.t. \(t\) at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]

rust_nurbs.nurbs_curve_d2cdt2_dp(w: Iterable[float], k: Iterable[float], i: int, q: int, dim: int, t: float) List[float]#

Evaluates the sensitivity of the NURBS curve second derivative with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (float) – Parameter value at which to evaluate the curve sensitivity

Returns:

1-D list representing the curve second derivative sensitivity at \(t\) to the control point \(\mathbf{P}_i\)

Return type:

List[float]

rust_nurbs.nurbs_curve_eval_grid(p: Iterable[Iterable[float]], w: Iterable[float], k: Iterable[float], nt: int) List[List[float]]#

Evaluates a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\mathbf{C}(t) = \frac{\sum_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i}{\sum_{i=0}^n N_{i,q}(t) w_i}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the NURBS curve at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_eval_dp_grid(w: Iterable[float], k: Iterable[float], i: int, q: int, dim: int, nt: int) List[float]#

Evaluates the derivative of the NURBS curve with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the NURBS curve sensitivity w.r.t. \(\mathbf{P}_i\) at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_dcdt_grid(p: Iterable[Iterable[float]], w: Iterable[float], k: Iterable[float], nt: int) List[List[float]]#

Evaluates a the first derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \frac{f'(t)g(t)-f(t)g'(t)}{g^2(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \\ f'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \mathbf{P}_i \\ g'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \\ N'_{i,q}(t) &= \frac{q}{k_{i+q} - k_i} N_{i,q-1}(t) - \frac{q}{k_{i+q+1} - k_{i+1}} N_{i+1,q-1}(t) \\ \end{align}\end{split}\]

and \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the NURBS curve first derivatve w.r.t. \(t\) at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_dcdt_dp_grid(w: Iterable[float], k: Iterable[float], i: int, q: int, dim: int, nt: int) List[float]#

Evaluates the sensitivity of the NURBS curve first derivative with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the NURBS curve first derivative sensitivity w.r.t. \(\mathbf{P}_i\) at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_d2cdt2_grid(p: Iterable[Iterable[float]], w: Iterable[float], k: Iterable[float], nt: int) List[List[float]]#

Evaluates a the second derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \frac{f''(t)g^2(t) - f(t)g(t)g''(t) - 2f'(t)g(t)g'(t) + 2f(t)[g'(t)]^2}{g^3(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \\ f'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \mathbf{P}_i \\ g'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \\ f''(t) &= \sum\limits_{i=0}^n N''_{i,q}(t) w_i \mathbf{P}_i \\ g''(t) &= \sum\limits_{i=0}^n N''_{i,q}(t) w_i \\ N'_{i,q}(t) &= \frac{q}{k_{i+q} - k_i} N_{i,q-1}(t) - \frac{q}{k_{i+q+1} - k_{i+1}} N_{i+1,q-1}(t) \\ N''_{i,q}(t) &= \frac{q}{k_{i+q} - k_i} \left[ \frac{q-1}{k_{i+q-1}-k_i} N_{i,q-2}(t) - \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) \right] - \frac{q}{k_{i+q+1} - k_{i+1}} \left[ \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) - \frac{q-1}{k_{i+q+1}-k_{i+2}} N_{i+2,q-2}(t) \right] \end{align}\end{split}\]

and \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the NURBS curve second derivative w.r.t. \(t\) at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_d2cdt2_dp_grid(w: Iterable[float], k: Iterable[float], i: int, q: int, dim: int, nt: int) List[float]#

Evaluates the sensitivity of the NURBS curve second derivative with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3 1-D list or array of knots

  • nt (int) – Number of linearly-spaced points in \(t\). E.g., nt=3 outputs the evaluation of the curve at \(t=0.0\), \(t=0.5\), and \(t=1.0\).

Returns:

Value of the NURBS curve second derivative sensitivity w.r.t. \(\mathbf{P}_i\) at \(N_t\) linearly-spaced points. Output array has size \(N_t \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_eval_tvec(p: Iterable[Iterable[float]], w: Iterable[float], k: Iterable[float], t: Iterable[float]) List[List[float]]#

Evaluates a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\mathbf{C}(t) = \frac{\sum_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i}{\sum_{i=0}^n N_{i,q}(t) w_i}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the NURBS curve along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_eval_dp_tvec(w: Iterable[float], k: Iterable[float], i: int, q: int, dim: int, t: Iterable[float]) List[float]#

Evaluates the derivative of the NURBS curve with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the NURBS curve sensitivity w.r.t. \(\mathbf{P}_i\) along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_dcdt_tvec(p: Iterable[Iterable[float]], w: Iterable[float], k: Iterable[float], t: Iterable[float]) List[List[float]]#

Evaluates a the first derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\frac{\text{d}}{\text{d}t} \mathbf{C}(t) = \frac{f'(t)g(t)-f(t)g'(t)}{g^2(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \\ f'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \mathbf{P}_i \\ g'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \\ N'_{i,q}(t) &= \frac{q}{k_{i+q} - k_i} N_{i,q-1}(t) - \frac{q}{k_{i+q+1} - k_{i+1}} N_{i+1,q-1}(t) \\ \end{align}\end{split}\]

and \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the NURBS curve first derivatve w.r.t. \(t\) along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_dcdt_dp_tvec(w: Iterable[float], k: Iterable[float], i: int, q: int, dim: int, t: Iterable[float]) List[float]#

Evaluates the sensitivity of the NURBS curve first derivative with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the NURBS curve first derivative sensitivity w.r.t. \(\mathbf{P}_i\) along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_d2cdt2_tvec(p: Iterable[Iterable[float]], w: Iterable[float], k: Iterable[float], t: Iterable[float]) List[List[float]]#

Evaluates a the second derivative with respect to \(t\) of a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points on a grid of linearly-spaced \(t\)-values according to

\[\frac{\text{d}^2}{\text{d}t^2} \mathbf{C}(t) = \frac{f''(t)g^2(t) - f(t)g(t)g''(t) - 2f'(t)g(t)g'(t) + 2f(t)[g'(t)]^2}{g^3(t)}\]

where

\[\begin{split}\begin{align} f(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i \\ g(t) &= \sum\limits_{i=0}^n N_{i,q}(t) w_i \\ f'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \mathbf{P}_i \\ g'(t) &= \sum\limits_{i=0}^n N'_{i,q}(t) w_i \\ f''(t) &= \sum\limits_{i=0}^n N''_{i,q}(t) w_i \mathbf{P}_i \\ g''(t) &= \sum\limits_{i=0}^n N''_{i,q}(t) w_i \\ N'_{i,q}(t) &= \frac{q}{k_{i+q} - k_i} N_{i,q-1}(t) - \frac{q}{k_{i+q+1} - k_{i+1}} N_{i+1,q-1}(t) \\ N''_{i,q}(t) &= \frac{q}{k_{i+q} - k_i} \left[ \frac{q-1}{k_{i+q-1}-k_i} N_{i,q-2}(t) - \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) \right] - \frac{q}{k_{i+q+1} - k_{i+1}} \left[ \frac{q-1}{k_{i+q}-k_{i+1}} N_{i+1,q-2}(t) - \frac{q-1}{k_{i+q+1}-k_{i+2}} N_{i+2,q-2}(t) \right] \end{align}\end{split}\]

and \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as q = len(k) - len(p) - 1.

Parameters:
  • p (Iterable[Iterable[float]]) – 2-D list or array of control points where the inner dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the NURBS curve second derivative w.r.t. \(t\) along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_curve_d2cdt2_dp_tvec(w: Iterable[float], k: Iterable[float], i: int, q: int, dim: int, t: Iterable[float]) List[float]#

Evaluates the sensitivity of the NURBS curve second derivative with respect to an individual control point at a given \(t\)-value

Parameters:
  • w (Iterable[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of p.

  • k (Iterable[float]) – 1-D list or array of knots

  • i (int) – Index of the control point

  • q (int) – Degree of the curve

  • dim (int) – Number of spatial dimensions in the curve. Usually 2 or 3 1-D list or array of knots

  • t (Iterable[float]) – Vector of parameter values

Returns:

Value of the NURBS curve second derivative sensitivity w.r.t. \(\mathbf{P}_i\) along a vector of \(t\)-values. Output array has size \(\text{len}(t) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_eval(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates a Non-Uniform Rational B-Spline (NURBS) surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to

\[\mathbf{S}(u,v) = \frac{\sum_{i=0}^n \sum_{j=0}^m N_{i,q}(u) N_{j,r}(v) w_{i,j} \mathbf{P}_{i,j}}{\sum_{i=0}^n \sum_{j=0}^m N_{i,q}(u) N_{j,r}(v) w_{i,j}}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline in the \(u\)-direction is computed as q = len(ku) - len(p) - 1, and the degree of the B-spline surface in the \(v\)-direction is computed as r = len(kv) - len(p[0]) - 1.

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the NURBS surface at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.nurbs_surf_dsdu(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates the first derivative w.r.t. \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the NURBS surface first derivative w.r.t. \(u\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.nurbs_surf_dsdv(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates the first derivative w.r.t. \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the NURBS surface first derivative w.r.t. \(v\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.nurbs_surf_d2sdu2(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates the second derivative w.r.t. \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the NURBS surface second derivative w.r.t. \(u\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.nurbs_surf_d2sdv2(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, v: float) List[float]#

Evaluates the second derivative w.r.t. \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface

  • v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface

Returns:

Value of the NURBS surface second derivative w.r.t. \(v\) at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]

rust_nurbs.nurbs_surf_eval_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates an isoparametric curve in \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) points along the \(u\)-isoparametric curve of the NURBS surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_eval_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates an isoparametric curve in \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) points along the \(v\)-isoparametric curve of the NURBS surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_dsdu_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) first derivatives w.r.t. \(u\) along the \(u\)-isoparametric curve of the NURBS surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_dsdu_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates the first derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) first derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the NURBS surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_dsdv_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates the first derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) first derivatives w.r.t. \(v\) along the \(u\)-isoparametric curve of the NURBS surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_dsdv_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates the first derivative w.r.t. \(v\) along an isoparametric curve in \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) first derivatives w.r.t. \(v\) along the \(v\)-isoparametric curve of the NURBS surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_d2sdu2_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) second derivatives w.r.t. \(u\) along the \(u\)-isoparametric curve of the NURBS surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_d2sdu2_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates the second derivative w.r.t. \(u\) along an isoparametric curve in \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) second derivatives w.r.t. \(u\) along the \(v\)-isoparametric curve of the NURBS surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_d2sdv2_iso_u(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: float, nv: int) List[List[float]]#

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(u\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (float) – Parameter value in the \(u\)-direction defining the isoparametric curve

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_v\) second derivatives w.r.t. \(v\) along the \(u\)-isoparametric curve of the NURBS surface. Output array has size \(N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_d2sdv2_iso_v(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, v: float) List[List[float]]#

Evaluates the second derivative w.r.t. \(v\) along an isoparametric curve in \(v\) of a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_v\) linearly-spaced points along the \(v\)-direction

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • v (float) – Parameter value in the \(v\)-direction defining the isoparametric curve

Returns:

Values of \(N_u\) second derivatives w.r.t. \(v\) along the \(v\)-isoparametric curve of the NURBS surface. Output array has size \(N_u \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[float]]

rust_nurbs.nurbs_surf_eval_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates a Non-Uniform Rational B-Spline (NURBS) surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space according to

\[\mathbf{S}(u,v) = \frac{\sum_{i=0}^n \sum_{j=0}^m N_{i,q}(u) N_{j,r}(v) w_{i,j} \mathbf{P}_{i,j}}{\sum_{i=0}^n \sum_{j=0}^m N_{i,q}(u) N_{j,r}(v) w_{i,j}}\]

where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline in the \(u\)-direction is computed as q = len(ku) - len(p) - 1, and the degree of the B-spline surface in the \(v\)-direction is computed as r = len(kv) - len(p[0]) - 1.

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) points on the NURBS surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_surf_dsdu_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates the first derivative with respect to \(u\) on a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(u\) on the NURBS surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_surf_dsdv_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates the first derivative with respect to \(v\) on a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(v\) on the NURBS surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_surf_d2sdu2_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates the second derivative with respect to \(u\) on a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(u\) on the NURBS surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_surf_d2sdv2_grid(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], nu: int, nv: int) List[List[List[float]]]#

Evaluates the second derivative with respect to \(v\) on a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(v\) on the NURBS surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_surf_eval_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of points on the NURBS surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_surf_dsdu_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the first derivative with respect to \(u\) on a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(u\) on the NURBS surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_surf_dsdv_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the first derivative with respect to \(v\) on a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) first derivatives with respsect to \(v\) on the NURBS surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_surf_d2sdu2_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the second derivative with respect to \(u\) on a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(u\) on the NURBS surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]

rust_nurbs.nurbs_surf_d2sdv2_uvvecs(p: Iterable[Iterable[Iterable[float]]], w: Iterable[Iterable[float]], ku: Iterable[float], kv: Iterable[float], u: Iterable[float], v: Iterable[float]) List[List[List[float]]]#

Evaluates the second derivative with respect to \(v\) on a NURBS surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at any number of \((u,v)\) pairs

Parameters:
  • p (Iterable[Iterable[Iterable[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (Iterable[Iterable[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

  • ku (Iterable[float]) – 1-D list or array of knots in the \(u\)-parametric direction

  • kv (Iterable[float]) – 1-D list or array of knots in the \(v\)-parametric direction

  • u (Iterable[float]) – Vector of \(u\)-values at which to evaluate the surface

  • v (Iterable[float]) – Vector of \(v\)-values at which to evaluate the surface

Returns:

Values of \(N_u \times N_v\) second derivatives with respsect to \(v\) on the NURBS surface at each of the \((u,v)\) pairs. Output array has size \(\text{len}(u) \times \text{len}(v) \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]