woo.comp
¶
Expose interal utility c++ functions for computing volume, centroids, inertia, coordinate transforms; mostly used for testing.

woo.comp.
cart2cyl
()¶ Convert cartesian coordinates to cylindrical; cylindrical coordinates are specified as \((r,\theta,z)\), the reference plane is the \(xy\)plane (see at Wikipedia).

woo.comp.
computePrincipalAxes
()¶ Return (pos, ori, inertia) of new coordinate system (relative to the current one), whose axes are principal, i.e. secondorder momentum is diagonal (the diagonal is returned in inertia, which is sorted to be nondecreasing). The arguments are volume (mass) V, firstorder momentum Sg and secondorder momentum Ig. If Sg is
(0,0,0)
, the reference point will not change, only rotation will occur.

woo.comp.
cyl2cart
()¶ Convert cylindrical coordinates to cartesian; cylindrical coordinates are specified as \((r,\theta,z)\), the reference plane is the \(xy\)plane (see at Wikipedia).

woo.comp.
inertiaTensorTranslate
()¶ Tensor of inertia of solid translated by off with previous inertia \(I\), volume \(V\); if \(V\) is positive, the translation is away from the centroid, if negative, towards the centroid. The computation implements Parallel axes theorem.

woo.comp.
tetraInertia
()¶ Tetrahedron inertia from covariance. If fixSign is true, the tensor is multiplied by 1 if the (0,0) entry is negative (this is caued by noncanonical vertex ordering).

woo.comp.
tetraInertia_grid
()¶ Tetrahedron inertia from grid sampling (div gives subdivision along the shortest aabb side).

woo.comp.
tetraVolume
()¶ Volume of tetrahedron, computed as \(\frac{1}{6}((AB)\cdot(BD)))\times(CD)\).

woo.comp.
triangleArea
()¶

woo.comp.
triangleInertia
()¶

woo.comp.
uniformResamplePiecewiseLinear
()¶ Resample piecewiselinear function (given by points xx and yy, where xx is nondecreasing) using a uniform grid with endpoints xRange and div points (div1 pieces), returning linearly interpolated value of yy in *div*+1 points.
Tip
Report issues or inclarities to github.