Function File: Iz = inertiamoment (pp, m)
Moment of intertia of a plane shape.
Calculates the moment of inertia respect to an axis perpendicular to the plane passing through the center of mass of the body.
The shape is defined with piecewise smooth polynomials. pp is a cell where each elements is a 2-by-(poly_degree+1) matrix containing
px(i,:) =pp{i}(1,:)
andpy(i,:) = pp{i}(2,:)
.See also: masscenter principalaxis
The following code
% non-convex bezier shape weirdhearth ={[-17.6816 -34.3989 7.8580 3.7971; ... 15.4585 -28.3820 -18.7645 9.8519]; ... [-27.7359 18.1039 -34.5718 3.7878; ... -40.7440 49.7999 -25.5011 2.2304]}; Iz = inertiamoment (weirdhearth,1)
Produces the following output
Iz = 485.18