simple_polygon3D
This function takes the 3D coordinates of a planar cross section along with with its normal and calculates some of its geometric properties such as cross sectional area, perimeter and principal second moments of area. The points of the planar section may be unsorted, since the function will sort them in counter-clockwise order automatically, but need to constitute a simple polygon (a flat shape consisting of straight, non-intersecting line segments or "sides" that are joined pair-wise to form a closed path).
If called with only 2 input arguments as in the following example
[GEOM, SMoA, polyline] = simple_polygon3D
(section, normal)
Then,
section | is an matrix containing the x,y,z point coordinates of a planar cross section. |
normal | is a vector defining the unit normal of the sectioning plane. |
and,
GEOM | is a scalar structure containing the fields: |
GEOM.Area | calculated in . | ||
GEOM.Perimeter | calculated in . | ||
GEOM.Centroid | x,y,z centroid coordinates of the cross section. |
SMoA | is a scalar structure containing the fields: |
SMoA.Ixy | product of 2nd moments of area in . | ||
SMoA.Imin | minimum 2nd moment of area in . | ||
SMoA.Imax | maximum 2nd moment of area in . |
polyline | is a scalar structure containing the fields: |
polyline.poly2D | matrix containing the x,y coordinates of the cross section on the 2D local axes of the sectioning plane ordered counter. | ||
polyline.poly3D | matrix containing the original 3D coordinates of the cross section ordered counter clockwise. |
If called with 3 input arguments as in the following example
[GEOM, SMoA, polyline] = simple_polygon3D
(section, normal, direction)
Then, direction is an vector defining the unit normal of the coronal plane that provides alignment of the bone to anatomical position, while normal is assumed to point upwards. The SMoA structure contains the additional fields, as follows:
SMoA.Ix | 2nd moment of area with respect to x axis, which is collinear with the intersection of the coronal plane and the sectioning plane. Calculated in . | ||
SMoA.Iy | 2nd moment of area with respect to y axis, which is collinear with the intersection of the sagital plane and the sectioning plane. Calculated in . | ||
SMoA.theta | angle of rotation of the principal axis Imax of 2nd moment of area with respect to x axis expressed in degrees in the range . |
See also: meshArea, meshBarycenter, meshSection, longbone_CustomGeometry, longbone_FragmentGeometry, longbone_Geometry
Source Code: simple_polygon3D