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
-
Origin of the cached paths
The point the cached drawing paths are stored relative to.
origin = middle of the extents of the visible objects; path point = point − origin
2D drawing on screen view.js32-bit, display only- CadCraft
-
Grid spacing
The spacing of the background grid: 1, 2 or 5 times a power of ten, at least 14 pixels apart.
target = 14 ÷ zoom; p = 10^⌊log₁₀ target⌋; step = first of p, 2p, 5p, 10p that is ≥ target; major = 5 × step
2D drawing on screen view.js32-bit, display only- CadCraft
-
Pixels per paper millimeter
How many CSS pixels one millimeter of the sheet takes, used to draw lineweights at their paper width.
√(T₀² + T₁²) ÷ (25.4 when the paper is in inches, else 1)
2D drawing on screen view.js32-bit, display only- CadCraft
-
Kept solids as screen meshes
The vertex positions and edge lines of the kept 3D solids as drawn on the 3D tab.
position = (P − corner) × k, stored as 32-bit
3D tab drawing of the 2D lines and kept solids ws3d.js32-bit, display only- CadCraft
-
2D lines as screen lines
The 2D drawing's line pieces as drawn on the ground of the 3D tab.
position = (x − min x, y − min y, 0), stored as 32-bit
3D tab drawing of the 2D lines and kept solids ws3d.js32-bit, display only- CadCraft
-
Triangles of a panel outline
Cuts a panel's outline into triangles for drawing.
ear when (b − a) × (c − a) > 1e-9 and no other point is inside the triangle
Cabinets as 3D viewport bodies addons/cabinetcraft/lib/bodies3d.js32-bit, display only- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Room coordinates to viewport coordinates
A point of the room in the viewport's axes and millimeters.
k = 25.4 (inch job) or 1; (x, y, z) → (x·k, z·k, −y·k)
Cabinets as 3D viewport bodies addons/cabinetcraft/lib/bodies3d.js32-bit, display only- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Member lines for the picture
The 3D end points of every member, for drawing.
Truss layout 3D picture addons/trusscraft/lib/view3d.js32-bit, display only- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
View projection
Turns 3D points into picture coordinates for a view direction.
x′ = x cos A − y sin A; y′ = −(z cos E + (x sin A + y cos A) sin E)
Truss layout 3D picture addons/trusscraft/lib/view3d.js32-bit, display only- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Picture output
Scales the projected lines to the picture size and writes them as SVG.
Truss layout 3D picture addons/trusscraft/lib/view3d.js32-bit, display only- CadCraft
- BimCraft
- ModelCraft
- PartCraft
-
Deflected shape
The members' deflected shape, enlarged so it can be seen.
drawn point = point + scale × displacement; scale = 0.015 × model size ÷ largest displacement
Analysis results drawn on the model frame/frame-draw.js32-bit, display only- CadCraft
- BimCraft
- DetailCraft
-
Force diagram beside a member
A filled diagram of one internal force drawn square to each member, with its largest value labeled.
height = value × 0.08 × model size ÷ largest value
Analysis results drawn on the model frame/frame-draw.js32-bit, display only- CadCraft
- BimCraft
- DetailCraft
-
Plate contours
Each plate as two triangles colored by its corner values, with the largest values labeled.
color = ramp(|value| ÷ largest |value|); kN·m/m = N·mm/mm ÷ 1000
Analysis results drawn on the model frame/plate-draw.js32-bit, display only- CadCraft
- BimCraft
- DetailCraft
-
Smooth shading normals
The normal at each corner of faces joined by soft edges.
n = normalize(Σ n_f × area_f) over the joined faces that meet at the corner
Smooth shading and texture placement m3d/model.js32-bit, display only- CadCraft
- ModelCraft
-
Fitting a texture to a face
The map from a point on a face to its place on an imported image.
u = U · p + u₀, v = V · p + v₀, with U · n = 0 and V · n = 0
Smooth shading and texture placement m3d/model.js32-bit, display only- CadCraft
- ModelCraft
-
Texture coefficients as stored
The eight numbers of a texture's placement as they are kept in the face's paint.
text = x rounded to 7 significant digits
Smooth shading and texture placement m3d/model.js32-bit, display only- CadCraft
- ModelCraft
-
Normal per corner
A unit normal for every corner of every face.
n = normalize(Σ N_f) over the faces of a smooth group
Polygon mesh: shading normals m3d/mesh.js32-bit, display only- CadCraft
- ModelCraft
-
Mesh buffers for the graphics card
The vertex positions, normals and colors of a definition's faces as the arrays the graphics card draws.
3D view drawing m3d/view3d.js32-bit, display only- CadCraft
- ModelCraft
-
Box of a placement as drawn
The world-space box of one placed definition, used to frame the view and place the lights.
3D view drawing m3d/view3d.js32-bit, display only- CadCraft
- ModelCraft
-
Overlay line clipped to the near plane
A 3D line cut at the camera's near plane and projected to screen points for the 2D overlay.
cut at depth 1.01 × near: a′ = a + (b − a) × (near′ − da) ÷ (db − da)
3D view drawing m3d/view3d.js32-bit, display only- CadCraft
- ModelCraft
-
Mass prism mesh
The triangles of the walls and roof of a mass.
Building mass mesh for the 3D view massing.js32-bit, display only- CivilCraft
-
Ground mesh with elevation bands
The triangles, normals and colors of a ground surface, cut at the elevation band levels.
position = (x + dx, y + dy, (z − origin z) × exaggeration); normal = normalized sum of face normals
3D site view scene site3d.js32-bit, display only- CivilCraft
-
Map picture coordinates on the ground
Where each ground vertex falls in the map picture draped over it.
u = (x + origin x − min x) ÷ width; v = (y + origin y − min y) ÷ height
3D site view scene site3d.js32-bit, display only- CivilCraft
-
Road body mesh
The lanes, shoulders, curbs and walks of a corridor as triangles between neighboring sections.
3D site view scene site3d-landscape.js32-bit, display only- CivilCraft
-
Rail mesh
Each rail as a swept I-shaped outline along the track's sections.
3D site view scene site3d-rail.js32-bit, display only- CivilCraft
-
Positions and indices from an accessor
Reads a primitive's vertex positions and triangle indices from the file's binary chunk.
Plant 3D models for the 3D view landscape/glb.js32-bit, display only- CivilCraft
-
Node transform
The 4×4 matrix of a node from its matrix, or from its translation, rotation and scale.
M = T · R(q ÷ |q|) · S
Plant 3D models for the 3D view landscape/glb.js32-bit, display only- CivilCraft
-
Transform to the model's frame, Y up to Z up
Applies each node's transform to its vertices and gathers all triangles into one mesh.
p′ = M·p; (x, y, z) → (x, −z, y)
Plant 3D models for the 3D view landscape/glb.js32-bit, display only- CivilCraft
-
Scale a model to the unit box
Centers a model in plan, sets its base at zero and scales it to one unit wide and one unit tall, with a normal per triangle.
x′ = (x − cx) ÷ w; z′ = (z − z min) ÷ h; n = (b − a) × (c − a) ÷ |…|
Plant 3D models for the 3D view landscape/symbols.js32-bit, display only- CivilCraft
-
Model point to screen
Where a model point is drawn on the canvas.
Erection movie player erection-html.js32-bit, display only- DetailCraft
-
Where a pick is at a given minute
The offset of a lifted piece from its final place while the movie plays.
Erection movie player erection-html.js32-bit, display only- DetailCraft
-
A part's solid for drawing
The mesh of a part: its profile extruded, with copes cut.
3D view view3d.js32-bit, display only- DetailCraft
-
Mitre ends on the mesh
Moves the end vertices of a mesh onto the mitre's cut plane.
3D view view3d.js32-bit, display only- DetailCraft
-
The part under the pointer
Which part a click hits and where the ray meets it.
3D view view3d.js32-bit, display only- DetailCraft
-
Open or closed surface
The elements of a batch whose triangles do not close.
key = round(x × 1e4), round(y × 1e4), round(z × 1e4); open if any edge count is odd
Section caps: which elements are closed solids caps-closed.js32-bit, display only- BimCraft
-
Elements split over several batches
Checks again, over all its parts, an element that is drawn in more than one batch.
Section caps: which elements are closed solids caps-closed.js32-bit, display only- BimCraft
-
Adding tile results to the picture
The sums of red, green, blue and sample count of every pixel after a pass.
out[pixel] += tile[pixel]
Rendered picture: sample sums and color tables compute/cpu-render.js32-bit, display only- BimCraft
- ModelCraft
-
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
-
Part geometry for the view
Builds the triangles and feature lines of a part for drawing.
Manual scene in the 3D view illustrate/scene3d.js32-bit, display only- PartCraft
-
Cut faces lifted off the section plane
Places the filled cut faces so they are not hidden by the plane that cut them.
Manual scene in the 3D view illustrate/scene3d.js32-bit, display only- PartCraft
-
Old and new sheet mixed per pixel
The color of each pixel of the compare picture, and counts of removed, added and unchanged pixels.
Sheet compare picture compare.js32-bit, display only- MarkupCraft
-
Bench rim line segments
Segment pairs for the rim of each bench.
Pit and solar table meshes in the 3D view site3d-pit.js32-bit, display only- CivilCraft
-
Haul ramp ribbon
A road-wide ribbon on the pit walls for the haul ramp.
offset = (−dy, dx) ÷ length × width ÷ 2; lift = 0.02 × width
Pit and solar table meshes in the 3D view site3d-pit.js32-bit, display only- CivilCraft
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.