coords.Coords.principal_coordsys#

Coords.principal_coordsys(mass=None)#

Return a CoordSys formed by the principal axes of inertia.

Parameters#

mass: 1-dim float array (points(),), optional

The mass to be attributed to each of the points, in the order of n_points(). If not provided, a mass 1.0 will be attributed to each point.

Returns#

CoordSys object.

Coordinate system aligned along the principal axes of the inertia, for the specified point masses. The origin of the CoordSys is the center of mass of the Coords.

See Also#

Examples#

>>> from hellotriangle.elements import Tet4
>>> print(Tet4.vertices.principal_coordsys())
CoordSys: trl=[0.25 0.25 0.25]; rot=[[ 0.5774  0.5774  0.5774]
                                     [ 0.3424 -0.8131  0.4708]
                                     [ 0.8165 -0.4082 -0.4082]]