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
-
Smallest rectangle round a wall's plan points
The minimum-area bounding rectangle of a set of plan points.
for each hull edge direction u: area = (max u − min u) × (max v − min v); keep the smallest
Wall faces and plan frames from element meshes ifc-place.js64-bit- BimCraft
-
Snapping an item to the nearest wall face
The position and rotation that put an item's back against the nearest wall face.
t = clamp((p − a)·(b − a) ÷ |b − a|², 0, 1); q = a + t (b − a); position = q + n × maxY; rot = atan2(−n_y, −n_x) − 90°
Wall faces and plan frames from element meshes ifc-place.js32-bit in part- BimCraft
-
Plan frame of copied elements
The turn of the first copied element and the box of all copied meshes measured in those turned axes.
rot = atan2(W[1], W[0]) in degrees, rounded to 6 decimals; box from orientedBox
Wall faces and plan frames from element meshes ifc-place.js32-bit in part- BimCraft
-
Box of points in turned plan axes
The bounds of a point list in plan axes turned by an angle, and the box center in model millimeters.
u = x cos r + y sin r; v = −x sin r + y cos r; center = ((u₀ + u₁) ÷ 2, (v₀ + v₁) ÷ 2) turned back
Wall faces and plan frames from element meshes ifc-place.js64-bit- BimCraft
-
Reading WAV samples
The first channel of a WAV file as numbers between −1 and 1.
x = sample ÷ 2^(bits − 1)
Room acoustic measures from an impulse response metrics.js32-bit in part- BimCraft
-
Decay time from a line fit
A decay time from the slope of the least-squares line through part of the decay curve.
slope = (m Σ t d − Σ t Σ d) ÷ (m Σ t² − (Σ t)²); T = 60 ÷ −slope
Room acoustic measures from an impulse response metrics.js64-bit- BimCraft
-
Decay curve, clarity, definition and center time
The energy decay curve and the measures read from it.
curve = 10 lg(∫ₜ p² ÷ ∫₀ p²); C = 10 lg(early ÷ late); D50 = early ÷ total; Ts = Σ t p² ÷ Σ p²
Room acoustic measures from an impulse response metrics.js64-bit- BimCraft
-
Predicted against measured
The difference between a predicted and a measured value in each band, against the just-noticeable difference.
within when |predicted − measured| ≤ JND
Room acoustic measures from an impulse response metrics.js64-bit- BimCraft
-
Mode frequencies of a box room
Every standing-wave frequency of a rigid box up to a top frequency, with its kind.
f = c ÷ 2 × √((i ÷ L_x)² + (j ÷ L_y)² + (k ÷ L_z)²), c = 343 m/s
Room modes and low-frequency wave solver modes.js64-bit- BimCraft
-
Schroeder frequency
The frequency below which the sound field is separate modes, from reverberation time and volume.
f_S = 2000 × √(T ÷ V)
Room modes and low-frequency wave solver modes.js64-bit- BimCraft
-
Smallest gap between modes
The smallest difference between neighboring mode frequencies below a limit.
min(fᵢ − fᵢ₋₁)
Room modes and low-frequency wave solver modes.js64-bit- BimCraft
-
Wave simulation of a box room
The pressure over time at a listener after a pulse at a source, and its spectrum.
pⁿ⁺¹ = damp × (2pⁿ − pⁿ⁻¹) + Σ_axes (c·Δt ÷ Δ)² × (p₋ + p₊ − 2pⁿ); Δt = 0.9 × Δ_min ÷ (c √3)
Room modes and low-frequency wave solver modes.js32-bit in part- BimCraft
-
Resonance peaks of the spectrum
The frequencies and sizes of the local maxima of the spectrum.
offset = ½ (y₀ − y₂) ÷ (y₀ − 2y₁ + y₂); f = (i + offset) × Δf
Room modes and low-frequency wave solver modes.js32-bit in part- BimCraft
-
Resampling the chosen part of the photo
Averages the chosen part of the photo down, or interpolates it up, to the tile size.
Material maps and statistics from a photo photo-material.js32-bit, display only- BimCraft
- ModelCraft
-
Normal map from the height estimate
The surface direction at each pixel of the tile.
v = (−Δh_x × S, −Δh_y × S, 1) ÷ |v|, S = 4 × bump; stored as (v ÷ 2 + ½) × 255
Material maps and statistics from a photo photo-material.js32-bit, display only- BimCraft
- ModelCraft
-
Seam ratio
How big the jump across the tile's join is compared with the usual jump between neighboring pixels.
ratio = mean |jump across the join| ÷ max(mean |jump between neighbors|, 1e-6)
Material maps and statistics from a photo photo-material.js32-bit in part- BimCraft
- ModelCraft
-
Statistics returned with the maps
The crop, seam ratios, mean color, height spread and mean roughness reported for the material.
σ = √(Σ band² ÷ n); seam and σ rounded to 0.01, mean roughness to 0.001, crop to 0.001
Material maps and statistics from a photo photo-material.js32-bit in part- BimCraft
- ModelCraft
-
Site position and time zone
The latitude, longitude, north direction and time zone used for the sun.
time zone = round(longitude ÷ 15) unless given
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Model triangles in millimeters
Every placed triangle of the model that can shade or carry modules.
mm = mesh position × unit in mm
Solar arrays on the model pv-calc.js32-bit in part- BimCraft
-
Array tilt and power
The tilt, azimuth and peak power recorded for a planned array.
tilt = acos(clamp(n_z, −1, 1)) × 180 ÷ π; kWp = modules × Wp ÷ 1000
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Array definition stored in the file
The text that records an array's plane, module size and module centers.
normal, u, v: round to 1e-6; module centers and table corners: round to 0.1 mm
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Arrays read back from the file
Rebuilds each array's modules and corners from its stored definition.
corner = c ± u × across ÷ 2 ± v × along ÷ 2
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Module frames in the level's axes
Turns module centers and the array's directions from model axes into the level's own axes for the stored solids.
point′ = S⁻¹ · p; direction′ = S⁻¹ · d − S⁻¹ · 0
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Shade fraction of an array
The shaded share of each array for every month and hour.
fraction = Σ (table fraction × table samples) ÷ Σ samples
Solar arrays on the model pv-calc.js64-bit- BimCraft
-
Millimeters per survey unit
The factor from a survey file's length unit to millimeters.
m = 1000; ft = 304.8; US survey ft = 1200 ÷ 3937 × 1000
Ground read from a survey file res-ui.jsExact- BimCraft
-
Ground points from a LAS or LAZ cloud
Takes the ground-class points of a cloud and thins them to the lowest point in each 1 m cell.
x = pos[3i] + origin_x; cell = 1000 ÷ (mm per unit)
Ground read from a survey file res-ui.js32-bit in part- BimCraft
-
Thinning an elevation grid
Chooses every how many cells of a GeoTIFF or ASCII grid to read so that about 15000 points remain.
step = max(1, ⌈√(width × height ÷ 15000)⌉)
Ground read from a survey file res-ui.js64-bit- BimCraft
-
Unit, offset and datum of an imported ground
Sets the unit factor, moves far-off coordinates to the building and picks the datum so the ground near the building sits 200 mm under the first floor.
datum = median(z near the building) + 200 ÷ k
Ground read from a survey file res-ui.js64-bit- BimCraft
-
Scan points into the model's space
Moves every scan point through the cloud's placement matrix into the model's space.
p′ = M × (x, y, z, 1), stored in a Float32Array
Scan compared with the model scan-progress.js32-bit in part- BimCraft
-
Signed distance of a point from a box
The distance from a scan point to an element's box surface, positive outside and negative inside, and the running sums for the mean and RMS.
outside: d = √Σ gapₖ²; inside: d = −min distance to a face
Scan compared with the model scan-progress.js32-bit in part- BimCraft
-
Coverage, state and deviation of an element
An element's covered share, its state, and the mean offset and RMS of the scan from its surface.
coverage = max over large faces of covered cells ÷ cells; mean = Σd ÷ n; rms = √(Σd² ÷ n)
Scan compared with the model scan-progress.js32-bit in part- BimCraft
-
Percent complete
The share of judged elements that are built, by count and by box volume.
pct = round(1000 × built ÷ judged) ÷ 10; by volume: round(1000 × V_built ÷ V_judged) ÷ 10
Scan compared with the model scan-progress.js64-bit- BimCraft
-
Progress report as CSV
Writes one row per element with its state, coverage, mean offset, RMS, point count and volume.
coverage: 3 decimals; mean, rms, volume: 4 decimals
Scan compared with the model scan-progress.js32-bit in part- BimCraft
-
Slice turned square
Turns the slice's points by the walls' angle so that every wall runs along one of two axes.
u = x cos(−α) − y sin(−α); v = x sin(−α) + y cos(−α)
Walls, doors and rooms proposed from a scan scan-walls.js64-bit- BimCraft
-
Wall line from a histogram peak
Finds where a wall lies across its direction: a peak in the histogram of the points, then the mean of the points in that peak.
peak: h_b ≥ h_b₋₁, h_b > h_b₊₁, three-cell sum ≥ 2 × minimum points; position = mean of the points in the three cells
Walls, doors and rooms proposed from a scan scan-walls.js64-bit- BimCraft
-
Wall runs and their ends
Splits the points on a wall line into runs and keeps the runs that are long, thin and denser than what lies beside them.
split at gaps > 450 mm; keep when length ≥ 800 mm, min(side counts) ≤ 0.25 × count, core density ≥ 3 × side density
Walls, doors and rooms proposed from a scan scan-walls.js64-bit- BimCraft
-
Door gaps
Finds a door where two wall runs on one line are a door's width apart.
gap = second.from − first.to; door when 600 ≤ gap ≤ 1300; width = Math.round(gap)
Walls, doors and rooms proposed from a scan scan-walls.js64-bit- BimCraft
-
Plan slice of a scanned mesh
Finds where a horizontal plane cuts each triangle of a mesh and samples points along the cut.
f = (z_cut − z_a) ÷ (z_b − z_a); samples every 20 mm along each cut segment
Walls, doors and rooms proposed from a scan scan-propose.js64-bit- BimCraft
-
Plan slice of a point cloud
Takes the cloud's points in a band above the floor as the plan slice, in millimeters from the cloud's origin.
k = 304.8 for feet, 304.8006 for US survey feet, 1000 otherwise
Walls, doors and rooms proposed from a scan scan-propose.js32-bit in part- BimCraft
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.