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

  • Rounding to three decimals

    The rounding applied to every stored length, spacing and symbol coordinate.

    r3(v) = round(v × 1000) ÷ 1000

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Reading a length

    A height, spread, spacing, volume or girth read from a file, a CSV cell or the editor.

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Sizes, hardiness zone and spacing of one species

    The mature size, planting size, zone range and spacing kept for a species row.

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Default planting size and spacing

    The planting size, container and spacing filled in when a species row leaves them empty.

    spacing = max(q, round(k × spread ÷ q) × q), by plant type

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Spacing from planting density

    The center-to-center spacing that gives a stated number of plants per square meter.

    square: s = 1 ÷ √d; triangular: s = √(2 ÷ (√3 × d))

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Spacing used for a species

    The spacing a bed or hedge is planted at: the species' own, else from its density, else the default.

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Supplied sizes written to CSV

    Container volume, height, spread, girth and clear stem of each supplied size as one CSV cell.

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Supplied sizes read from CSV

    The same cell read back into numbers.

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • 2D planting symbol

    The circles, lines, arcs and outlines of a plant's plan symbol, sized to its spread.

    R = spread ÷ 2 × scale; point = (r cos a, r sin a)

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Library item size

    The width, depth and height of the library item placed for a plant.

    mm = round(m × 1000)

    Plant sizes, spacing and symbols plants/plants.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • Key times to one millisecond

    The rounding applied to every key time, clip start and the animation length.

    t = round(t × 1000) ÷ 1000

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Stretching an animation to a new length

    Every key time and clip start when the animation is made longer or shorter.

    k = new length ÷ old length; t′ = round₀.₀₀₁(t × k)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Spreading chosen keys about a time

    The new times of selected keys scaled away from or toward a pivot time.

    t′ = round₀.₀₀₁(pivot + (t − pivot) × f)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Frame count and frame times

    The number of frames a render of the animation has, and the time of each frame.

    frames = max(1, round(length × fps) + 1); time of frame i = i ÷ fps

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Position between two keys

    Which pair of keys a time falls between and how far along that stretch it is.

    s = (t − tᵢ) ÷ (tᵢ₊₁ − tᵢ)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Time on a repeating track

    The time inside the keys' span that a repeating, ping-pong or offset track plays at.

    x = (t − t₀) ÷ P; k = floor(x); f = x − k

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Speed through a key

    The rate of change of a value at a key, from its two neighbors.

    m = (pᵢ₊₁ − pᵢ₋₁) ÷ (tᵢ₊₁ − tᵢ₋₁)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Value between two keys

    A position or other value between two keys: held, straight, or on a smooth curve.

    p = h₀₀ p₀ + h₀₁ p₁ + h₁₀ Δt m₀ + h₁₁ Δt m₁

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Bézier handles of a property key

    The two handle points of a key on a property curve.

    automatic: handle = key ± (Δt ÷ 3, m × Δt ÷ 3)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Property value on a Bézier curve

    The value of an animated property at a time between two keys with Bézier handles.

    solve x(u) = t by bisection; v = B(v₀, p₁, p₂, v₃; u)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Property value at a time

    A property track's value at any time, with its cycles followed.

    offset cycle: v + n × (last key − first key)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Camera at a time

    The camera's eye, target, view angle and view height between camera keys.

    eye, target, fov on the curve; height = exp(curve of ln height)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Matrix to position, rotation and scale

    A placement matrix split into its position, a unit quaternion and three scale factors.

    s = column lengths; q from the rotation matrix (Shepperd)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Position, rotation and scale to matrix

    The placement matrix built from a position, a quaternion and a scale.

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Blend of two rotations

    The rotation part of a pose between two keys.

    q = (sin((1 − k)θ) a + sin(kθ) b) ÷ sin θ, θ = acos(a · b)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Angles to quaternion

    XYZ rotation angles in degrees turned into a unit quaternion.

    q = q_z × q_y × q_x, each from sin and cos of half the angle

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Quaternion to angles

    XYZ rotation angles in degrees from a unit quaternion, chosen close to the key before.

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Object placement at a time

    A moving object's placement matrix between two matrix keys.

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Time inside a clip

    The time of a saved action that a clip plays at a given timeline time.

    x = (t − start) ÷ scale; local = from + (x mod span)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Mixing a clip into a pose

    An object's placement when a clip is blended in at less than full influence or added on top.

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Driver expression

    The value of a property worked out from other properties by a typed expression.

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Camera keys from saved scenes

    The key times of a walkthrough built from saved scenes with a move time and a hold time.

    t accumulates move and hold; key time = round₀.₀₀₁(t)

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Default gravity for rigid bodies

    The gravity a physics bake starts from when the file sets none.

    g = (0, 0, −9.81) m/s²

    Animation keys, curves and poses render/anim.js
    • BimCraft
    • ModelCraft
    • PartCraft
    64-bit
  • Rounding of manifest numbers

    The rounding every number in the manifest goes through.

    round(x, k) = round(x × 10ᵏ) ÷ 10ᵏ, k = 6 unless stated

    Render hand-off manifest render/handoff.js
    • BimCraft
    • ModelCraft
    64-bit
  • Color to linear values

    A hex color turned into the linear Rec.709 triple the manifest carries.

    c ≤ 0.04045: c ÷ 12.92; else ((c + 0.055) ÷ 1.055)^2.4

    Render hand-off manifest render/handoff.js
    • BimCraft
    • ModelCraft
    64-bit
  • Points and directions on the stage

    A point or a direction of the scene moved to the USD stage's coordinates.

    p′ = M p; d′ = (M d) ÷ |M d|

    Render hand-off manifest render/handoff.js
    • BimCraft
    • ModelCraft
    64-bit
  • Camera entry

    The camera's matrices, position, view direction, aspect and view angle or height.

    fovY = 2 atan(1 ÷ |P₅|) × 180 ÷ π; ortho height = 2 ÷ |P₅|

    Render hand-off manifest render/handoff.js
    • BimCraft
    • ModelCraft
    64-bit
  • Sun and lamp entries

    The sun's direction and strength, and each lamp's lumens, color, position, aim and size.

    Render hand-off manifest render/handoff.js
    • BimCraft
    • ModelCraft
    64-bit
  • Scene, exposure and white balance entries

    The ground height, sample count, exposure in stops, shutter time and white-balance gains.

    Render hand-off manifest render/handoff.js
    • BimCraft
    • ModelCraft
    64-bit
  • Animation frames entry

    The start and end time, frame rate, frame count and the camera matrix of each frame.

    Render hand-off manifest render/handoff.js
    • BimCraft
    • ModelCraft
    64-bit
  • Material values

    The OpenPBR parameters written for each material, where they differ from the defaults.

    Render hand-off manifest render/handoff.js
    • BimCraft
    • ModelCraft
    64-bit
  • Exposure value at ISO 100

    The EV figure the render dialog shows for the chosen f-stop, shutter time and ISO.

    EV = log₂(N² ÷ t) − log₂(S ÷ 100)

    Camera exposure and white balance render/pt-camera.js
    • BimCraft
    • ModelCraft
    64-bit
  • Exposure in stops

    The stops added to the picture's exposure from the brightness slider and, in camera mode, the f-stop, shutter and ISO.

    stops = slider + log₂(t × S × 256 ÷ N²)

    Camera exposure and white balance render/pt-camera.js
    • BimCraft
    • ModelCraft
    64-bit
  • Color temperature to chromaticity

    The CIE xy color of light of a given temperature in kelvin.

    x = a ÷ T³ + b ÷ T² + c ÷ T + d; y = polynomial in x

    Camera exposure and white balance render/pt-camera.js
    • BimCraft
    • ModelCraft
    64-bit
  • White-balance gains

    The three color gains that make light of the chosen temperature show as white.

    gain = (ref ÷ w) × (Y(w) ÷ Y(ref))

    Camera exposure and white balance render/pt-camera.js
    • BimCraft
    • ModelCraft
    64-bit
  • Picked focus distance

    The distance from the camera to the clicked surface, measured along the view direction.

    focus = round(−(d · view axis ÷ |view axis|) × t × 100) ÷ 100

    Focus distance picked in the view render/ipr.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Linear picture to display values

    Each pixel's final red, green and blue from the linear picture and the post settings.

    AP1 × wb → Rec.709 × 2^exposure → vignette → highlights → contrast → view transform → sRGB → 8 bits

    Rendered picture: mixing, post and color render/pt-post.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • View transform

    The tone curve that brings scene light into the display's range.

    Rendered picture: mixing, post and color render/pt-post.js
    • BimCraft
    • ModelCraft
    64-bit
  • Blur for bloom

    The wide blur of the picture that bloom blends back in.

    r = max(1, round(√(12σ² ÷ 3 + 1) ÷ 2)); three box blurs of radius r per axis

    Rendered picture: mixing, post and color render/pt-post.js
    • BimCraft
    • ModelCraft
    32-bit in part
  • Bloom

    The picture blended with three blurs of itself.

    out = img × (1 − a) + (0.5 b₁ + 0.3 b₂ + 0.2 b₃) × a

    Rendered picture: mixing, post and color render/pt-post.js
    • BimCraft
    • ModelCraft
    32-bit in part

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.