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
-
Packing: island scale
Scales each island so that its UV area matches its area on the mesh.
A₃ = Σ |(b − a) × (c − a)| ÷ 2; A₂ = Σ |UV triangle area|; k = √(A₃ ÷ A₂)
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Packing: placing the islands
Places the islands' rectangles on shelves and scales the whole layout into the unit square.
pad = margin·√(total area)·1.1; widths tried: max(widest, √(sum of areas)·(0.7 + 0.05·k)), k = 0…23; uv = (offset + pad + point) ÷ side
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Stretch per face
How much each face's UVs distort it, from 0 for none to 1 for a lot.
σ₁,₂ = √(tr ÷ 2 ± √(tr² ÷ 4 − det)); angle: 1 − σ₂ ÷ σ₁; area: min(1, |ln(σ₁·σ₂)| ÷ ln 4); per face: area-weighted mean over its triangles
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv.js32-bit in part- ModelCraft
-
Move, rotate and scale UVs
Moves, turns or scales the selected faces' UVs about their mean as the pointer moves in the UV editor.
move: (u + Δu, v + Δv); rotate by a = atan2(v₁ − c_v, u₁ − c_u) − atan2(v₀ − c_v, u₀ − c_u); scale by k = |p₁ − c| ÷ max(1e-9, |p₀ − c|)
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/uv-editor.js32-bit in part- ModelCraft
-
UVs and sharp edges of a primitive
Stores a new primitive's positions, its UVs per face corner and the flags of its sharp edges.
sharp when n₁·n₂ < cos(sharpDeg·π ÷ 180)
UV coordinates: unwrap result, projections, packing, stretch and editing mesh/primitives.js32-bit in part- ModelCraft
-
Rotation matrix
The matrix that turns geometry by an angle about an axis through a point.
R = c·I + s·[axis]ₓ + (1 − c)·axis·axisᵀ, c = cos(angle·π ÷ 180), s = sin(angle·π ÷ 180); t = p − R·p
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Scale matrix
The matrix that scales geometry by a factor about a center.
p′ = f·p + c·(1 − f)
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Applying a matrix to geometry
Moves a point, a curve, a surface, a mesh or a list of them by a 4 × 4 matrix.
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Divide, power and remainder
The Divide, Power, Smaller, Larger and Remainder nodes.
a ÷ b; aᵇ; remainder = a − b·floor(a ÷ b)
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Sine, cosine, tangent and angle
Trigonometry with angles in degrees.
sin(x·π ÷ 180), cos(x·π ÷ 180), tan(x·π ÷ 180); angle = atan2(y, x) ÷ (π ÷ 180)
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Series and range
A list of evenly stepped numbers, by step or between two ends.
series: start + k·step; range: start + (end − start)·k ÷ (n − 1)
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Sum of a list
Adds the numbers of a list.
Σ xᵢ
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Vector length and distance
The length of a vector and the distance between two points.
√(Δx² + Δy² + Δz²)
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Point on a circle
A point at a radius and an angle from a center, in the plane z = center z.
[c_x + r·cos(a·π ÷ 180), c_y + r·sin(a·π ÷ 180), c_z]
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Point on curve and divide curve
A point at a fraction of a curve, and the points that divide a curve into a number of parts.
u = u₀ + (u₁ − u₀)·t; divide: u = u₀ + (u₁ − u₀)·k ÷ n
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Array around an axis
Copies of geometry turned round an axis in equal steps of a full circle.
copy k: rotate by 360·k ÷ n degrees
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Surface to mesh
A triangle mesh of a surface within a tolerance.
Node graph functions nodes/library.js64-bit- ModelCraft
- PartCraft
-
Point on a curve
The point of a NURBS curve at parameter u.
C(u) = Σ Nᵢ(u)·wᵢ·Pᵢ ÷ Σ Nᵢ(u)·wᵢ
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Derivatives of a curve
The point and the first d derivatives of a curve at u.
C⁽ʳ⁾ = (A⁽ʳ⁾ − Σᵢ₌₁..ᵣ C(r, i)·w⁽ⁱ⁾·C⁽ʳ⁻ⁱ⁾) ÷ w
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Curvature of a curve
The curvature at u.
κ = |C′ × C″| ÷ |C′|³
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Curvature vector
The vector that points to the center of curvature with length equal to the curvature.
κN = (C″ − t·(C″·t)) ÷ |C′|², t = C′ ÷ |C′|
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Torsion
The torsion of a curve at u.
τ = (C′ × C″)·C‴ ÷ |C′ × C″|²
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
From homogeneous points
Turns weighted (homogeneous) control points back into control points and weights.
P = (wx, wy, wz) ÷ w
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Arc and circle
A circular arc, or a full circle, as an exact rational quadratic curve.
pieces of at most 90°; Δθ = θ ÷ pieces; middle weight = cos(Δθ ÷ 2); P₁ = P₀ + T₀·r·tan(Δθ ÷ 2)
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Polyline as a curve
A degree 1 curve through given points, with knots in proportion to the lengths of its segments.
Lᵢ = Lᵢ₋₁ + max(1e-12, |Pᵢ − Pᵢ₋₁|); knotᵢ = Lᵢ ÷ L(last)
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Transforming a curve
Moves a curve by a 4 × 4 matrix.
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Point on a surface
The point of a NURBS surface at (u, v).
S(u, v) = Σᵢ Σⱼ Nᵢ(u)·Nⱼ(v)·wᵢⱼ·Pᵢⱼ ÷ Σᵢ Σⱼ Nᵢ(u)·Nⱼ(v)·wᵢⱼ
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js64-bit- ModelCraft
- PartCraft
-
Derivatives of a surface
The point and the partial derivatives up to total order d at (u, v).
S⁽ᵏˡ⁾ = (A⁽ᵏˡ⁾ − lower-order terms weighted by binomials and derivatives of w) ÷ w
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js64-bit- ModelCraft
- PartCraft
-
Surface normal
The unit normal at (u, v), including at poles and collapsed edges.
n = unit(S_u × S_v)
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js64-bit- ModelCraft
- PartCraft
-
Moving off a collapsed edge
Chooses where curvature is evaluated when the point asked for lies on a collapsed edge.
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js64-bit- ModelCraft
- PartCraft
-
Surface curvature
Gaussian and mean curvature, the two principal curvatures and their directions.
K = (LN − M²) ÷ (EG − F²); H = (EN − 2FM + GL) ÷ (2(EG − F²)); k₁,₂ = H ± √(H² − K)
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js64-bit- ModelCraft
- PartCraft
-
Normal curvature in a direction
The curvature of the surface along a given tangent direction.
a, b from t = a·S_u + b·S_v; κₙ = (L·a² + 2M·ab + N·b²) ÷ (E·a² + 2F·ab + G·b²)
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js64-bit- ModelCraft
- PartCraft
-
Iso-curve of a surface
The curve on a surface at a fixed u or v, as an exact NURBS curve.
row j = Σₐ Nₐ(t)·Pwₐⱼ in homogeneous coordinates
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/surface.js64-bit- ModelCraft
- PartCraft
-
Angle between two vectors
The angle between two vectors, 0 to π.
angle = atan2(|a × b|, a·b)
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/vec.js64-bit- ModelCraft
- PartCraft
-
Applying a 4 × 4 matrix
A point or a direction multiplied by a row-major affine matrix.
p′ᵢ = mᵢ₀·x + mᵢ₁·y + mᵢ₂·z + mᵢ₃·w
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/vec.js64-bit- ModelCraft
- PartCraft
-
Curvature maps
Gaussian, mean and largest principal curvature at every vertex of a surface's tessellation, with their ranges.
k_max = max(|H + d|, |H − d|), d = √(max(0, H² − K))
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/analysis.js64-bit- ModelCraft
- PartCraft
-
Curvature comb
Teeth along a curve whose length shows the curvature, and the largest curvature found.
u = a + (b − a)·i ÷ samples; q = p − scale·κN; max = largest |κN| at the samples
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs/analysis.js64-bit- ModelCraft
- PartCraft
-
Curvature range for the legend
The Gaussian curvature range that the curvature colors and their legend span.
max = largest |K| over all shown surfaces; range = [−max, max]
NURBS curves and surfaces: points, derivatives, normals and curvature nurbs-ui/display.js64-bit- ModelCraft
- PartCraft
-
Knot insertion
Adds a knot to a curve r times without changing its shape.
α = (u − U[L + i]) ÷ (U[i + k + 1] − U[L + i]); Q = α·R[i + 1] + (1 − α)·R[i]
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Tolerance in homogeneous space
Converts a distance tolerance into one for weighted control points.
TOL = tol·w_min ÷ (1 + max |P|)
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Knot removal
Removes copies of an interior knot while the curve moves no more than a tolerance.
candidates: (P[i] − (1 − α)·T[i − 1]) ÷ α and (P[j] − α·T[j + 1]) ÷ (1 − α); removed when they agree within TOL
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Bézier pieces
The curve as one Bézier piece per knot span.
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Degree elevation
Raises the degree of a curve by t.
Qᵢ = Σⱼ C(p, j)·C(t, i − j) ÷ C(p + t, i) · Pⱼ on each Bézier piece
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Degree reduction
Lowers the degree by one if the curve moves no more than a tolerance, and reports a bound on the change.
left and right reduced points blended by λ = i ÷ q; error = largest distance between the re-elevated and the original control points
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Splitting a curve
Cuts a curve in two at a parameter.
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Rescaling the parameter
Maps a curve's knots onto a new interval.
knot′ = a + (knot − c_a)·(b − a) ÷ (c_b − c_a)
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Reversing a curve
The same curve run the other way.
knot′ = a + b − knot, in reverse order
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Joining curves
Makes one curve from curves that meet end to end.
joint point = (end of one + start of the next) ÷ 2 in homogeneous coordinates; knot ranges in proportion to arc length
NURBS knot insertion and removal, degree change, split and join nurbs/curve.js64-bit- ModelCraft
- PartCraft
-
Rows back into a surface
Rebuilds a surface from its rows after a curve operation was applied to each row.
NURBS knot insertion and removal, degree change, split and join nurbs/surface.js64-bit- ModelCraft
- PartCraft
-
Degree elevation of a surface
Raises the degree of a surface in one direction.
NURBS knot insertion and removal, degree change, split and join nurbs/surface.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.