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
-
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.js64-bit- BimCraft
- ModelCraft
- CivilCraft
-
Supplied sizes read from CSV
The same cell read back into numbers.
Plant sizes, spacing and symbols plants/plants.js64-bit- BimCraft
- ModelCraft
- CivilCraft
-
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.js64-bit- BimCraft
- ModelCraft
- CivilCraft
-
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.js64-bit- BimCraft
- ModelCraft
- CivilCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Object placement at a time
A moving object's placement matrix between two matrix keys.
Animation keys, curves and poses render/anim.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Driver expression
The value of a property worked out from other properties by a typed expression.
Animation keys, curves and poses render/anim.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
Material values
The OpenPBR parameters written for each material, where they differ from the defaults.
Render hand-off manifest render/handoff.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
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.js64-bit- BimCraft
- ModelCraft
-
Angle of a point on an ellipse
The ellipse parameter of the point on the ellipse nearest a given point.
f(t) = (E(t) − q)·E′(t) = 0, solved by t ← t − f ÷ f′
STEP curves and surfaces: parameters from points step/geom.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Parameter of a point on a B-spline curve
The curve parameter nearest a given point.
STEP curves and surfaces: parameters from points step/geom.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Parameters of a point on a B-spline surface
The (u, v) of the surface point nearest a given point.
[S_u·S_u S_u·S_v; S_u·S_v S_v·S_v] d = −[r·S_u; r·S_v], r = S(u, v) − q
STEP curves and surfaces: parameters from points step/geom.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Surface of linear extrusion
The point of a curve swept along a vector, and the (u, v) of a point.
S(u, v) = C(u) + v · vec; v = (q − C(u))·d ÷ |vec|, u = project(q − v · vec)
STEP curves and surfaces: parameters from points step/geom.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Offset surface
The point of a surface moved a distance along its normal.
S_off(u, v) = S(u, v) + d · n, n = (ΔS_u × ΔS_v) ÷ |…|
STEP curves and surfaces: parameters from points step/geom.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Points along an edge
The points of an edge from its start vertex to its end vertex along its curve.
STEP import: triangles for curved faces step/tess.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
How finely a curve is divided
The parameters at which an edge curve is sampled.
circle step = min(π ÷ 24, 2 acos(1 − tol ÷ r)); else halve while the middle is more than tol from the chord or the turn exceeds π ÷ 24
STEP import: triangles for curved faces step/tess.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Turn and crossing tests
Whether three points turn left, right or run straight, and whether two segments cross.
x = (a − o) × (b − o); left when x > 1e-9 × |ab| × |bc|, right when x < −1e-9 × |ab| × |bc|
STEP import: triangles for curved faces step/tess.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Holes joined to the outer ring
One ring made from a face's outer loop and its holes by bridges, ready for ear clipping.
STEP import: triangles for curved faces step/tess.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
Ear clipping
Triangles of a simple polygon in the plane.
STEP import: triangles for curved faces step/tess.js64-bit- BimCraft
- ModelCraft
- PartCraft
-
A loop in the surface's (u, v)
The parameters of each boundary point, with periodic directions unwrapped and poles split.
uᵢ ← uᵢ + round((uⱼ − uᵢ) ÷ period) × period
STEP import: triangles for curved faces step/tess.js64-bit- BimCraft
- 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.