Resources Numerical accuracy

Calculations

Every calculation under our calculation policies: what it works out, its formula and the precision it runs at. Open one to see its code as it is in the released app.

  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • Last reviewed

Calculations

  • Sine, cosine, tangent and angle

    Trigonometry with angles in degrees.

    sin(x·π ÷ 180), cos(x·π ÷ 180), tan(x·π ÷ 180); angle = atan2(y, x) ÷ (π ÷ 180)

    Node graph functions nodes/library.js
    • ModelCraft
    • PartCraft
    64-bit
  • Series and range

    A list of evenly stepped numbers, by step or between two ends.

    series: start + k·step; range: start + (end − start)·k ÷ (n − 1)

    Node graph functions nodes/library.js
    • ModelCraft
    • PartCraft
    64-bit
  • Sum of a list

    Adds the numbers of a list.

    Σ xᵢ

    Node graph functions nodes/library.js
    • ModelCraft
    • PartCraft
    64-bit
  • Vector length and distance

    The length of a vector and the distance between two points.

    √(Δx² + Δy² + Δz²)

    Node graph functions nodes/library.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point on a circle

    A point at a radius and an angle from a center, in the plane z = center z.

    [c_x + r·cos(a·π ÷ 180), c_y + r·sin(a·π ÷ 180), c_z]

    Node graph functions nodes/library.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point on curve and divide curve

    A point at a fraction of a curve, and the points that divide a curve into a number of parts.

    u = u₀ + (u₁ − u₀)·t; divide: u = u₀ + (u₁ − u₀)·k ÷ n

    Node graph functions nodes/library.js
    • ModelCraft
    • PartCraft
    64-bit
  • Array around an axis

    Copies of geometry turned round an axis in equal steps of a full circle.

    copy k: rotate by 360·k ÷ n degrees

    Node graph functions nodes/library.js
    • ModelCraft
    • PartCraft
    64-bit
  • Surface to mesh

    A triangle mesh of a surface within a tolerance.

    Node graph functions nodes/library.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point on a curve

    The point of a NURBS curve at parameter u.

    C(u) = Σ Nᵢ(u)·wᵢ·Pᵢ ÷ Σ Nᵢ(u)·wᵢ

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Derivatives of a curve

    The point and the first d derivatives of a curve at u.

    C⁽ʳ⁾ = (A⁽ʳ⁾ − Σᵢ₌₁..ᵣ C(r, i)·w⁽ⁱ⁾·C⁽ʳ⁻ⁱ⁾) ÷ w

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curvature of a curve

    The curvature at u.

    κ = |C′ × C″| ÷ |C′|³

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curvature vector

    The vector that points to the center of curvature with length equal to the curvature.

    κN = (C″ − t·(C″·t)) ÷ |C′|², t = C′ ÷ |C′|

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Torsion

    The torsion of a curve at u.

    τ = (C′ × C″)·C‴ ÷ |C′ × C″|²

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • From homogeneous points

    Turns weighted (homogeneous) control points back into control points and weights.

    P = (wx, wy, wz) ÷ w

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Arc and circle

    A circular arc, or a full circle, as an exact rational quadratic curve.

    pieces of at most 90°; Δθ = θ ÷ pieces; middle weight = cos(Δθ ÷ 2); P₁ = P₀ + T₀·r·tan(Δθ ÷ 2)

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Polyline as a curve

    A degree 1 curve through given points, with knots in proportion to the lengths of its segments.

    Lᵢ = Lᵢ₋₁ + max(1e-12, |Pᵢ − Pᵢ₋₁|); knotᵢ = Lᵢ ÷ L(last)

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Transforming a curve

    Moves a curve by a 4 × 4 matrix.

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point on a surface

    The point of a NURBS surface at (u, v).

    S(u, v) = Σᵢ Σⱼ Nᵢ(u)·Nⱼ(v)·wᵢⱼ·Pᵢⱼ ÷ Σᵢ Σⱼ Nᵢ(u)·Nⱼ(v)·wᵢⱼ

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Derivatives of a surface

    The point and the partial derivatives up to total order d at (u, v).

    S⁽ᵏˡ⁾ = (A⁽ᵏˡ⁾ − lower-order terms weighted by binomials and derivatives of w) ÷ w

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Surface normal

    The unit normal at (u, v), including at poles and collapsed edges.

    n = unit(S_u × S_v)

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Moving off a collapsed edge

    Chooses where curvature is evaluated when the point asked for lies on a collapsed edge.

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Surface curvature

    Gaussian and mean curvature, the two principal curvatures and their directions.

    K = (LN − M²) ÷ (EG − F²); H = (EN − 2FM + GL) ÷ (2(EG − F²)); k₁,₂ = H ± √(H² − K)

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Normal curvature in a direction

    The curvature of the surface along a given tangent direction.

    a, b from t = a·S_u + b·S_v; κₙ = (L·a² + 2M·ab + N·b²) ÷ (E·a² + 2F·ab + G·b²)

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Iso-curve of a surface

    The curve on a surface at a fixed u or v, as an exact NURBS curve.

    row j = Σₐ Nₐ(t)·Pwₐⱼ in homogeneous coordinates

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Angle between two vectors

    The angle between two vectors, 0 to π.

    angle = atan2(|a × b|, a·b)

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/vec.js
    • ModelCraft
    • PartCraft
    64-bit
  • Applying a 4 × 4 matrix

    A point or a direction multiplied by a row-major affine matrix.

    p′ᵢ = mᵢ₀·x + mᵢ₁·y + mᵢ₂·z + mᵢ₃·w

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/vec.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curvature maps

    Gaussian, mean and largest principal curvature at every vertex of a surface's tessellation, with their ranges.

    k_max = max(|H + d|, |H − d|), d = √(max(0, H² − K))

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/analysis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curvature comb

    Teeth along a curve whose length shows the curvature, and the largest curvature found.

    u = a + (b − a)·i ÷ samples; q = p − scale·κN; max = largest |κN| at the samples

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/analysis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curvature range for the legend

    The Gaussian curvature range that the curvature colors and their legend span.

    max = largest |K| over all shown surfaces; range = [−max, max]

    NURBS curves and surfaces: points, derivatives, normals and curvature nurbs-ui/display.js
    • ModelCraft
    • PartCraft
    64-bit
  • Knot insertion

    Adds a knot to a curve r times without changing its shape.

    α = (u − U[L + i]) ÷ (U[i + k + 1] − U[L + i]); Q = α·R[i + 1] + (1 − α)·R[i]

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Tolerance in homogeneous space

    Converts a distance tolerance into one for weighted control points.

    TOL = tol·w_min ÷ (1 + max |P|)

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Knot removal

    Removes copies of an interior knot while the curve moves no more than a tolerance.

    candidates: (P[i] − (1 − α)·T[i − 1]) ÷ α and (P[j] − α·T[j + 1]) ÷ (1 − α); removed when they agree within TOL

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Bézier pieces

    The curve as one Bézier piece per knot span.

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Degree elevation

    Raises the degree of a curve by t.

    Qᵢ = Σⱼ C(p, j)·C(t, i − j) ÷ C(p + t, i) · Pⱼ on each Bézier piece

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Degree reduction

    Lowers the degree by one if the curve moves no more than a tolerance, and reports a bound on the change.

    left and right reduced points blended by λ = i ÷ q; error = largest distance between the re-elevated and the original control points

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Splitting a curve

    Cuts a curve in two at a parameter.

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Rescaling the parameter

    Maps a curve's knots onto a new interval.

    knot′ = a + (knot − c_a)·(b − a) ÷ (c_b − c_a)

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Reversing a curve

    The same curve run the other way.

    knot′ = a + b − knot, in reverse order

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Joining curves

    Makes one curve from curves that meet end to end.

    joint point = (end of one + start of the next) ÷ 2 in homogeneous coordinates; knot ranges in proportion to arc length

    NURBS knot insertion and removal, degree change, split and join nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Rows back into a surface

    Rebuilds a surface from its rows after a curve operation was applied to each row.

    NURBS knot insertion and removal, degree change, split and join nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Degree elevation of a surface

    Raises the degree of a surface in one direction.

    NURBS knot insertion and removal, degree change, split and join nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Rescaling a surface's parameters

    Maps the knots of one direction onto a new interval.

    knot′ = a + (knot − k_a)·(b − a) ÷ (k_b − k_a)

    NURBS knot insertion and removal, degree change, split and join nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit
  • Uniform knots for a curve from control points

    The knot vector given to a curve drawn by its control points when none is supplied.

    p + 1 zeros; i ÷ (n − p) for i = 1 … n − p − 1; p + 1 ones

    NURBS knot insertion and removal, degree change, split and join nurbs/tools.js
    • ModelCraft
    • PartCraft
    64-bit
  • Parameter from a fraction

    The curve parameter for a command's position given as a fraction 0 to 1.

    u = a + (b − a)·f

    NURBS knot insertion and removal, degree change, split and join nurbs/tools.js
    • ModelCraft
    • PartCraft
    64-bit
  • Closest point on a curve

    The parameter, point and distance of the point of a curve nearest a given point.

    f(u) = (C − P)·C′; u ← u − f ÷ (C″·(C − P) + C′·C′)

    NURBS lengths, areas, closest points and tessellation nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Length of a curve

    The length of a curve, or of a part of it between two parameters.

    s = Σ pieces Σ₈ wᵍ·h·|C′(x₀ + h·(1 + xᵍ))|, 4 pieces per knot span

    NURBS lengths, areas, closest points and tessellation nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Parameter at a length

    The parameter at which the curve has run a given length from its start.

    f(u) = length(a … u) − s; u ← u − f ÷ |C′(u)|, or the middle of the bracket

    NURBS lengths, areas, closest points and tessellation nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curve to polyline

    Points along a curve such that the curve stays within a tolerance of the chords between them.

    a segment is kept when the curve at 1/4, 1/2 and 3/4 of its parameter range lies within tol of the chord; else it is halved

    NURBS lengths, areas, closest points and tessellation nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Are two curves the same

    Decides whether one curve lies on another within a tolerance.

    33 points of a, each within tol of its closest point on b

    NURBS lengths, areas, closest points and tessellation nurbs/curve.js
    • ModelCraft
    • PartCraft
    64-bit
  • Area of a surface

    The area of an untrimmed surface.

    A = Σ cells Σ₅ₓ₅ wₐ·w_b·h_u·h_v·|S_u × S_v|, 2 × 2 pieces per knot-span cell

    NURBS lengths, areas, closest points and tessellation nurbs/surface.js
    • ModelCraft
    • PartCraft
    64-bit

A calculation is added only after its source was read. Each statement can be checked in the code shown on its policy's page; the app repositories are public. When a release changes a calculation, its page says so until it has been read again.