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.
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.js32-bit, display only- BimCraft
- ModelCraft
-
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.js32-bit, display only- BimCraft
- ModelCraft
-
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.js32-bit, display only- BimCraft
- ModelCraft
-
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.js32-bit, display only- BimCraft
- ModelCraft
-
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.js32-bit, display only- BimCraft
- ModelCraft
-
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.js32-bit, display only- BimCraft
- ModelCraft
-
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.js32-bit, display only- BimCraft
- ModelCraft
-
Scene for the standalone viewer
Packs the drawn scene into the viewer's file.
Real-time view and render bench rt/rt-export.js32-bit, display only- BimCraft
- ModelCraft
-
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.js64-bit- ModelCraft
-
Number of copies
How many placements the enabled Array items make together.
copies = Π countᵢ
Group modifiers: scale and array placements group-mods.jsExact- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
Edge flip
Flips an edge while the opposite corner lies inside the circumcircle.
Triangles inside a trimmed face io/3dm/cdt.js64-bit- ModelCraft
- PartCraft
-
Flips with no new points
Makes an existing triangulation Delaunay by flipping edges.
Triangles inside a trimmed face io/3dm/cdt.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
-
Single values by type
Reads one property value with the width the file states.
FBX reader: number types as stored io/fbx-parse.js64-bit- ModelCraft
-
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.jsExact- ModelCraft
-
Arrays by type
Reads an array of floats, doubles or whole numbers.
FBX reader: number types as stored io/fbx-parse.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
Face points
The new point in the middle of each face.
F = Σ corners ÷ n
Subdivision surfaces mesh/subdiv.js64-bit- ModelCraft
-
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.js32-bit in part- ModelCraft
-
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.js32-bit in part- ModelCraft
-
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.js32-bit in part- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
-
Clamped uniform knot vector
A knot vector with evenly spaced interior knots.
uᵢ = a + (b − a) × i ÷ (inner + 1)
Knot vectors nurbs/basis.js64-bit- ModelCraft
- PartCraft
-
Knot vector check
Checks a knot vector read from a file: count, order, clamping and multiplicities.
Knot vectors nurbs/basis.js64-bit- ModelCraft
- PartCraft
-
Greville abscissae
One parameter value per control point.
gᵢ = (Uᵢ₊₁ + … + Uᵢ₊ₚ) ÷ p
Knot vectors nurbs/basis.js64-bit- ModelCraft
- PartCraft
-
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.jsExact- ModelCraft
- PartCraft
-
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.js64-bit- ModelCraft
- PartCraft
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.