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

  • Mean radiance of each pixel

    The picture as the average of its samples.

    color = Σ ÷ n

    Rendered picture: sample sums and color tables compute/cpu-render.js
    • BimCraft
    • ModelCraft
    32-bit, display only
  • Color through a .cube table

    A color after the table's 1D and 3D look-ups.

    x = clamp((r − lo) ÷ (hi − lo)); trilinear: c = c₀ + (c₁ − c₀) × d along each axis in turn

    Rendered picture: sample sums and color tables exr/cube.js
    • BimCraft
    • ModelCraft
    32-bit, display only
  • Table rows read from a .cube file

    The entries of a color table as they are held in memory.

    Rendered picture: sample sums and color tables exr/cube.js
    • BimCraft
    • ModelCraft
    32-bit, display only
  • Numbers written to a .cube file

    A table entry as text in a saved color table.

    text = Number(v.toPrecision(7))

    Rendered picture: sample sums and color tables exr/cube.js
    • BimCraft
    • ModelCraft
    32-bit, display only
  • Filmic tone curve

    Maps scene brightness to screen brightness for the filmic view transform.

    h(x) = (x (0.15 x + 0.05) + 0.004) ÷ (x (0.15 x + 0.5) + 0.06) − 0.02 ÷ 0.3; output = h(2 c) ÷ h(11.2)

    Real-time view and render bench rt/rt-post.js
    • BimCraft
    • ModelCraft
    32-bit, display only
  • Baked probe light

    Collects the bounce light at each probe and removes the sky's own part.

    shᵢ,ₖ = bakedᵢ,ₖ − skyₖ (k = 0…11)

    Real-time view and render bench rt/rt-gi.js
    • BimCraft
    • ModelCraft
    32-bit, display only
  • Mean radiance per pixel

    Averages the accumulated samples of each pixel for the bench and the parity comparison.

    mean = Σ samples ÷ n

    Real-time view and render bench render/bench-kernels.js
    • BimCraft
    • ModelCraft
    32-bit, display only
  • Scene for the standalone viewer

    Packs the drawn scene into the viewer's file.

    Real-time view and render bench rt/rt-export.js
    • BimCraft
    • ModelCraft
    32-bit, display only
  • Placements from the modifier stack

    The list of placement matrices for the source, first the original.

    stepₖ = (hiₖ − loₖ) × relₖ + absₖ; Mᵢ = translate(i × step) × M

    Group modifiers: scale and array placements group-mods.js
    • ModelCraft
    64-bit
  • Number of copies

    How many placements the enabled Array items make together.

    copies = Π countᵢ

    Group modifiers: scale and array placements group-mods.js
    • ModelCraft
    Exact
  • Size of a loose piece

    Decides whether a separate piece is small enough to remove.

    max(Δx, Δy, Δz) < minSize

    3D-print mesh repair print-repair.js
    • ModelCraft
    64-bit
  • Middle point of a filled hole

    The new vertex a hole's fan of triangles meets at.

    c = Σ pᵢ ÷ n

    3D-print mesh repair print-repair.js
    • ModelCraft
    64-bit
  • Signed volume and inside-out pieces

    Finds closed pieces that face inward and turns them outward.

    V = Σ a · (b × c) ÷ 6; turned when V < 0 and the piece is not inside another

    3D-print mesh repair print-repair.js
    • ModelCraft
    64-bit
  • Ray and triangle

    Where a ray meets a triangle, for the inside test.

    det = e₁ · (d × e₂); u = (s · h) ÷ det; v = (d · q) ÷ det; t = (e₂ · q) ÷ det

    3D-print mesh repair print-repair.js
    • ModelCraft
    64-bit
  • Delaunay triangulation

    Triangles over a set of points in plan.

    D = 2 (aₓ(b_y − c_y) + bₓ(c_y − a_y) + cₓ(a_y − b_y)); center = (Σ |p|² × Δ) ÷ D; inside when |p − center|² < r² (1 − 10⁻¹²)

    Terrain from contours and terrain grids terrain.js
    • ModelCraft
    64-bit
  • Terrain from contour edges

    Collects the contour points, merges close ones and triangulates them.

    key = round(100 x), round(100 y); thinning step = n ÷ 8000

    Terrain from contours and terrain grids terrain.js
    • ModelCraft
    64-bit
  • Terrain grid

    A flat grid of triangles of a given width, depth and spacing.

    nₓ = round(width ÷ spacing), 1…200; x = x₀ + width × i ÷ nₓ

    Terrain from contours and terrain grids terrain.js
    • ModelCraft
    64-bit
  • Entourage parts into the model

    Converts each part's triangles from millimeters to meters.

    p (m) = p (mm) ÷ 1000

    Starter library: plants and entourage sizes starter.js
    • ModelCraft
    64-bit
  • Plant scaled to its listed size

    The scale that makes a plant model as wide and tall as the species' data says.

    s_xy = 1000 × spread ÷ max(Δx, Δy, 1); s_z = 1000 × height ÷ max(z_max, 1)

    Starter library: plants and entourage sizes starter.js
    • ModelCraft
    64-bit
  • Unit factor

    Chooses the factor that turns the file's unit into meters.

    k = meters per file unit, or 0.001 when that is missing, zero or not finite

    3DM import: units, placements and mesh points io/3dm-import.js
    • ModelCraft
    • PartCraft
    64-bit
  • Mesh points in meters

    Scales a mesh's points and builds the model's mesh from them.

    p′ = p × k

    3DM import: units, placements and mesh points io/3dm-import.js
    • ModelCraft
    • PartCraft
    64-bit
  • Block placement matrix

    Turns a block reference's matrix into the model's placement.

    m[c × 4 + r] = x[r × 4 + c]; translation × k

    3DM import: units, placements and mesh points io/3dm-import.js
    • ModelCraft
    • PartCraft
    64-bit
  • Curve points in meters

    Scales each curve's points and drops segments of no length.

    a′ = a × k; kept when a′ ≠ b′

    3DM import: units, placements and mesh points io/3dm-import.js
    • ModelCraft
    • PartCraft
    64-bit
  • Mesh record: 32-bit and 64-bit points

    Reads a mesh's points from the file and chooses between its 32-bit and 64-bit copies.

    use the 64-bit points when |aᵢ − vᵢ| ≤ |vᵢ| × 10⁻⁶ + 10⁻⁶ × max(1, |aᵢ|) for every coordinate

    3DM import: units, placements and mesh points io/3dm/objects.js
    • ModelCraft
    • PartCraft
    64-bit
  • Orientation of three points

    Twice the signed area of a triangle: which way it turns.

    (b − a) × (c − a) = (bₓ − aₓ)(c_y − a_y) − (b_y − a_y)(cₓ − aₓ)

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point inside a circumcircle

    Whether a fourth point lies inside the circle through three others.

    determinant of the rows (pₓ − dₓ, p_y − d_y, |p − d|²) for p = a, b, c; inside when it is positive

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Triangle that holds a point

    Walks from the last triangle toward the point, then searches all triangles if the walk fails.

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Point insertion

    Splits the triangle a new point falls in, or the side it falls on.

    ε = 10⁻⁶ × orient(a, b, c); on a side when a sub-area ≤ ε

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Edge flip

    Flips an edge while the opposite corner lies inside the circumcircle.

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Flips with no new points

    Makes an existing triangulation Delaunay by flipping edges.

    Triangles inside a trimmed face io/3dm/cdt.js
    • ModelCraft
    • PartCraft
    64-bit
  • Welded corners in meters

    Merges corners that coincide and converts them from millimeters to meters.

    key = round(x ÷ q), round(y ÷ q), round(z ÷ q); p (m) = p (mm) × 0.001

    STEP import: welding and meters io/step-import.js
    • ModelCraft
    64-bit
  • Single values by type

    Reads one property value with the width the file states.

    FBX reader: number types as stored io/fbx-parse.js
    • ModelCraft
    64-bit
  • 64-bit whole numbers

    Reads a signed 64-bit whole number from two 32-bit halves.

    v = hi × 2³² + lo when −2²¹ ≤ hi < 2²¹; otherwise decimal text

    FBX reader: number types as stored io/fbx-parse.js
    • ModelCraft
    Exact
  • Arrays by type

    Reads an array of floats, doubles or whole numbers.

    FBX reader: number types as stored io/fbx-parse.js
    • ModelCraft
    64-bit
  • Triangles of a referenced object

    The target's triangles in the modified mesh's space, for booleans and similar modifiers.

    q = (toLocal × placement) × p

    Modifier references and lattice cages mesh/mod-eval.js
    • ModelCraft
    64-bit
  • Cage point displacements

    How far each cage point has been moved from its place on the even grid.

    rest = min + (max − min) × i ÷ (n − 1); disp = M × now − M × rest

    Modifier references and lattice cages mesh/mod-eval.js
    • ModelCraft
    64-bit
  • Cage around a mesh

    A box of grid points around a mesh's bounds.

    d = pad × max side; min′ = min − d; max′ = max + d; p = min′ + (max′ − min′) × i ÷ (n − 1)

    Modifier references and lattice cages mesh/mod-eval.js
    • ModelCraft
    64-bit
  • Face points

    The new point in the middle of each face.

    F = Σ corners ÷ n

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    64-bit
  • Edge points

    The new point on each edge.

    m = (a + b) ÷ 2; e = (a + b + F₁ + F₂) ÷ 4; point = e + (m − e) × s for 0 ≤ s < 1

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    32-bit in part
  • Vertex points

    Where each old vertex moves to.

    smooth = (F̄ + 2 R̄ + (n − 3) V) ÷ n; crease = (6 V + a + b) ÷ 8; k = min(1, (sₐ + s_b) ÷ 2); point = smooth + (crease − smooth) × k

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    32-bit in part
  • Edge sharpness per level

    The sharpness each new edge inherits.

    s′ = max(0, s − 1); open edge: ∞; crease layer = min(1, s′ ÷ 4)

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    32-bit in part
  • Texture coordinates and other corner layers

    Interpolates per-corner values onto the new quads.

    corner: own value; edge: mean of two; face: mean of the face's corners

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    64-bit
  • Limit positions

    Where each vertex of an all-quad mesh lies on the limit surface.

    smooth: (n² V + 4 Σ E + Σ F) ÷ (n (n + 5)); crease or border: (4 V + a + b) ÷ 6

    Subdivision surfaces mesh/subdiv.js
    • ModelCraft
    64-bit
  • Multiplicity of a knot

    How many times a value occurs in a knot vector.

    count of |Uᵢ − u| ≤ tol × (U_last − U_first)

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Distinct knots

    The different knot values with their multiplicities.

    a knot joins the previous one when |x − u_prev| ≤ tol × range

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Clamped uniform knot vector

    A knot vector with evenly spaced interior knots.

    uᵢ = a + (b − a) × i ÷ (inner + 1)

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Knot vector check

    Checks a knot vector read from a file: count, order, clamping and multiplicities.

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Greville abscissae

    One parameter value per control point.

    gᵢ = (Uᵢ₊₁ + … + Uᵢ₊ₚ) ÷ p

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    64-bit
  • Binomial coefficients

    The number of ways to choose k of n.

    C(n, k) = C(n − 1, k − 1) + C(n − 1, k)

    Knot vectors nurbs/basis.js
    • ModelCraft
    • PartCraft
    Exact
  • A number as IGES text

    Writes one real number into the file.

    whole numbers below 10¹⁵: digits and a point; otherwise String(x) with E → D

    IGES files of NURBS curves and surfaces nurbs/iges.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.