The equations of simgeometry.objects.slanted_tube, declared on the code that implements them and checked by the tests.
A tube from start to end whose end at end is cut by a slanted plane.
- frame
- w=p−pstart,s=w⋅a,ρ=∣w−sa∣,η=w⋅n−L(n⋅a)
- inside
- p∈S⟺s≥0,η≤0,ri≤ρ≤ro
- level set
- ϕ=max(ϕtube,η),ϕtube=(max(ϱ,0),max(−s,0))+min(max(ϱ,−s),0),ϱ=max(ri−ρ,ρ−ro)
- Assumes
- unit axis a from
start, length L to the centre of the cut; cut plane through end with unit outward normal n, n⋅a>0 - the cut misses the start face: rotanθ<L; a rod (ri=0) has ϱ=ρ−ro
- ϕ, the larger of the distances to the half-infinite tube and to the cut plane, is exact away from the rim of the cut and a bound near it