Академический Документы
Профессиональный Документы
Культура Документы
January 2006
Many engineering problems require the knowledge of the geometrical properties of a plane figure. This task can be performed by numerical integration
using, for example, the trapezoidal or Simpsons rule. Since the invention of
the planimeter by Amsler, around 1854, Naval Architects used mechanical
analog computers, specifically planimeters, integrators and integraphs to calculate the geometrical properties by following a closed contour on the lines
drawing or on intermediate, specially-prepared graphs. In this document we
describe a MATLAB function that accepts as input the array of coordinates
1
of the vertices of a polygonal figure. Let the coordinates of the i-th point be
xi , yi . Then, the function can be called as
[ PROPERTIES ] = pintegrator(X);}
where
x1
X=
x2 . . . x n x1
y1 y2 . . . yn y1
I
L
M dx + N dy =
N
M
x
y
dxdy
where L is the boundary of the area S (see, for example, Finney, 1988, pp.
102739, or ONeil, 2003, p. 5659). Functions M and N suitable for the
calculation of the geometrical properties can be found, for example, in a paper
by Ken Turkowksi available on the web. The boundary L must be followed
in the counterclockwise sense, that is so as to have the area A always on the
left of the cursor.
If a figure has an axis of symmetry, that axis is also a principal axis.
Small errors of digitization can yield wrong principal axes. The error can
3
be important if the two moments of inertia about the barycentric axes are
nearly equal.
If the coordinates of polygonal vertices must be measured in a given
drawing, scan that drawing to obtain a graphic file (for example a JPEG
file) and use the function digitizer. For waterlines or other symmetrical
figures use the function wldigitizer, for curves of statical stability use the
function scdigitizer, and for body plans the function bpdigitizer.
The function digitizer calls the function point. Therefore, the file of
the latter function must be included in the same directory as the function
digitizer.
An example
The file Zfigure.m (stored on the same site with this document) contains
the coordinates of the vertices of a Z-shaped figure as exemplified in Beer
and Johnston (1998). See Figure 1. Assuming that the dimensions are given
in m, the properties of the above figure are
Z test
4
3.5
2.5
1.5
0.5
0
2
1.5
0.5
0.5
1.5
2.5
area
4.500
m2
x-coordinate of centroid
0.250
y-coordinate of centroid
2.000
7.250
m4
28.375
m4
-4.313
m4
6.969
m4
10.375
m4
-6.563
m4
37.726
degrees
m4
m4
Above we call barycentric axes the axes with the origin of coordinates in
the centroid of the figure. Beer and Johnston (1998) call these axes centroidal.
To exercise, the reader can call the function with the commands
Zfigure
[ PROPERTIES ] = pintegrator(Z);
Bibliography
Beer, F.P., and Johnston, E.R. Jr (1998), Vector mechanics for engineers,
3d SI metric edition, Toronto, McGraw-Hill Ryerson.
Finney, R.L. (1988), Calculus and analytic geometry, 7th ed., ReadingMassachusetts, Addison Wesley publishing Company.
ONeil, P.V. (2003), Advanced engineering mathematics, 5th ed., Pacific
Grove - CA, Thomson Brooks/Cole.
Turkowski, K. (1997), Computing 2D polygon moments using Greens
Theorem, http://www.worldserver.com/turk/computergraphics/Moments.pdf.