Information
-
Patent Grant
-
5708592
-
Patent Number
5,708,592
-
Date Filed
Wednesday, May 22, 199628 years ago
-
Date Issued
Tuesday, January 13, 199826 years ago
-
Inventors
-
Original Assignees
-
Examiners
- Voeltz; Emanuel T.
- Cole; Tony
Agents
- Greenblum & Bernstein P.L.C.
-
CPC
-
US Classifications
Field of Search
US
- 364 560
- 364 554
- 364 561
- 364 562
- 364 563
- 364 564
- 364 47429
- 364 463
- 348 172
- 033 121
- 033 122
- 033 123
- 033 124
- 033 1 C
- 033 1 M
- 033 26
- 033 2701
- 033 503
-
International Classifications
- G01B2100
- G06F1710
- G06F1900
-
Abstract
An apparatus for measuring figures having circular arc portions by obtaining coordinates of a starting point, an ending point and an intermediate point of each circular arc. The measuring apparatus measures at least one of coordinates or an area of a figure. The measuring apparatus has a main body and a measuring lever. The main body has a pair of rollers that drive the measuring apparatus in a running direction. The measuring lever is pivotally supported on the main body so as to be rotatable in a clockwise and counter-clockwise direction. The measuring lever includes a tracer, a point key, and an arc key. The point key is manipulated when the measuring lever is at the starting point of the circular arc portion. The arc key is manipulated when the measuring lever is at the intermediate point. The point key again is manipulated when the measuring lever is at the ending point. By obtaining these three points, a parameter of a figure, including the circular arc portion, can be determined.
Description
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention is directed to an apparatus for measuring an area of a figure, and in particular to measuring coordinates of a centroid of a plane figure by tracing along a profile of the plane figure.
2. Discussion of Background and Other Information
Traditionally, a centroid of a linear figure a-g-f-e-d-c-b-a (see FIG. 3) is found by, for example, dividing the figure into sub-figures having known figure centroids. For example, the figure illustrated in FIG. 3 can be divided into triangle a-b-g, triangle b-g-f, triangle b-f-h, and rectangle c-d-e-h. Geometrical moments of the areas of each sub-figure are individually calculated and summed up, and the summed moment is divided by the total area of the linear figure.
When finding a centroid of a curved figure, such as, for example, as illustrated in FIG. 4, the only way to obtain its centroid is by dividing the figure into a plurality of approximate triangles and applying the same method as above.
However, although the traditional method can obtain an accurate centroid when analyzing linear figures such as illustrated in FIG. 3, the traditional method takes a long time, because the number of calculations to be performed increase with the number of sides of the figure.
Further, it is difficult to obtain an accurate centroid for a curved figure, such as shown in FIG. 4, because of the approximations that are intrinsic to the traditional method. In order to obtain an accurate centroid using the traditional method, the figure must be divided in a very large number of sub-figures, which is difficult to manually do.
In view of the foregoing problems, the present inventor proposed an improved measuring apparatus for a figure in Japanese Patent Application No. HEI 4-208013, which is a counterpart of U.S. Application No. 08/190,882, which issued as U.S. Pat. No. 5,515,299 on May 7, 1996 in the names of Kaji et al. As illustrated in FIG. 1, a measuring apparatus has a main body 1 and a measuring lever 2 pivotally supported by the main body 1 so as to be rotatable in a right or left direction from a running direction of the main body 1 in a horizontal plane. Main body 1 includes means for driving the main body, such as a pair of rollers 5 that are capable of running only in a straight direction, a display 3, an input device 4, and a calculating means, such as a calculating circuit or processor. Measuring lever 2 has a tracer 6 at an end thereof, a point key 9 for entering current coordinates of the tracing part 6, and a marking pointer 7 that is provided proximate the tracer 6. In operation, tracer 6 is moved to trace coordinates, such as an area, and lengths of a figure to be measured. At the same time, the calculating means determines sequential geometrical moments of areas necessary for the calculation of centroids of the figure, and finally determines coordinates of a centroid of the figure by dividing a total geometrical moment of the areas by a sum of the areas of the measured figure. Display 3 provides an indication of a difference of current coordinates of marking pointer 7 from the measured coordinates of the centroid of the figure. The marking pointer 7 is moved until the indicated difference becomes zero.
FIG. 7 illustrates a flow diagram of an operation of the improved measuring apparatus. Step 10 is executed to start the operation when tracer 6 reaches a vertex Pn of a figure to be measured. Coordinates x.sub.n and y.sub.n of the vertex Pn are measured in step 12 and entered into the measuring apparatus. Step 14 determines whether the measured vertex is the last one. If the measured vertex is not the last vertex, step 16 is executed to determine whether the measured vertex is a first one.
If the vertex is a first vertex (e.g., P.sub.1), then P.sub.1 is set to P.sub.n-1 in step 15, and the program returns to step 12 to measure the coordinates of a next vertex P.sub.n.
If it is determined, in step 14, that the last vertex has been measured, the program proceeds to step 17 to set P.sub.1 to P.sub.n. The program then proceeds to step 18.
In a similar fashion, if it is determined, in step 14, that the measured vertex is not the last one, and further determines, in step 16, that the measured vertex is a first one, the program proceeds to step 18.
In step 18, an area of an element enclosed by a line between two adjacent vertexes, two lines parallel to the x axis, and the y axis, is calculated. Also, a geometrical moment of the element area for the x axis and a geometrical moment of the element area for the y axis are calculated. Step 20 then determines whether the measured vertex is the last vertex. When the last vertex has not been measured, processing loops from step 20 back to step 12 (via step 21, which sets P.sub.n to P.sub.n-1) to repeat steps 12-20. When the measured vertex is the last one (e.g., step 20 is affirmative), the program executes step 22, in which it is determined whether a turning direction of the tracing is in a clockwise or counter-clockwise direction.
If it is determined in step 22 that the turning direction of the tracing is counter-clockwise, step 23 is executed to reverse the signs of Mx.sub.n and My.sub.n obtained in step 18 so that they become equal to -Mx.sub.xn and -My.sub.n in step 23. On the other hand, if it is determined in step 22 that the turning direction of the tracing is clockwise, step 24 is executed to reverse the sign of F.sub.n calculated in step 18 to become equal to -F.sub.n.
Thereafter, step 26 is executed to calculate the coordinates of a centroid of the figure, and the program ends (step 28).
The following description provides a detailed explanation of calculating a centroid of the figure:
The operation of sequential calculations of the geometrical moment of the area of an n-side polygon for the x axis will be described with reference to FIG. 2. A trapezoid having the coordinates P.sub.1 -P.sub.2 -x.sub.2 -x.sub.1 is divided into a first triangle P.sub.1 -P.sub.2 -x.sub.1 and a second triangle P.sub.2 -x.sub.2 -x.sub.1. A geometrical moment My.sub.1 of the area of the trapezoid for the x axis is given by the equation:
My.sub.1 =(x.sub.2 -x.sub.1)(y.sub.2.sup.2 +y.sub.2 y.sub.1 +y.sub.1.sup.2)/6.
A geometrical moment My.sub.n of the area of a trapezoid formed by an n-th side is calculated given by the following equation, which is executed in step 18 of the flow diagram of FIG. 7:
My.sub.n =(x.sub.n+1 -x.sub.n)(y.sub.n+1.sup.2 +y.sub.n+1 y.sub.n +y.sub.n.sup.2)/6 (1)
Note that equation (1) is applicable for a clockwise trace. If the trace is counter-clockwise, the sign should be reversed.
Similarly, a geometrical moment Mx.sub.n of the area of the trapezoid formed by the n-th side for the y axis is calculated by the following equation, also executed in step 18 of the flow diagram illustrated in FIG. 7:
Mx.sub.n =(y.sub.n+1 -y.sub.n)(x.sub.n+1.sup.2 +x.sub.n+1 x.sub.n +x.sub.n.sup.2)/6 (2)
Note that equation (2) is applicable for a clockwise trace. If the trace is counter-clockwise, the sign should be reversed.
Also note that in equations (1) and (2) above, point P.sub.n+1 (x.sub.n+1,y.sub.n+1) coincides with point P.sub.1 (x.sub.1,y.sub.1) to close the figure.
If the measuring apparatus successively traces all the coordinates of the vertexes P.sub.1, P.sub.2, . . . P.sub.n of the figure, geometrical moments of area My and Mx can be obtained, respectively, by the following equations: ##EQU1##
The geometrical moment of a smaller area E is canceled by a geometrical moment of a larger area D+E (see FIG. 6). Therefore, the geometrical moments My.sub.n and Mx.sub.n of area D, which is the figure to be measured, are obtained by the above equations.
It is generally known that an area S of a figure can be obtained by the following equations: ##EQU2## where F is greater than 0 for a counter-clockwise trace, and F is less than 0 for a clockwise trace. ##EQU3## where .vertline.F.vertline. is an absolute value of F.
Note that the trace turning direction can be seen by checking the sign of F. It is therefore not needed to limit the turning direction of the tracing. Hence, the x and y coordinates of a centroid of a figure can be obtained by dividing the geometrical moments My.sub.n and Mx.sub.n of the area by F.sub.n of the n-side polygon (as performed in step 26 of FIG. 7).
However, the improved measuring apparatus can only determine the centroid of the whole figure, by measuring the coordinates of the vertexes, if the figure is a linear figure, as shown in FIGS. 2 and 3. The above-described improved measuring apparatus has difficulties in accurately tracing a figure containing circular arcs, and particularly circular arcs.
SUMMARY OF THE INVENTION
Based on the foregoing, an object of the present invention to provide a figure measuring apparatus that can accurately determine a centroid of a figure having circular arcs by measuring coordinates of three points; both end points and an intermediate point of each circular arc.
According to the present invention, a figure measuring apparatus for measuring coordinates (or an area) of the figures comprises a main body having a pair of rollers capable of running in a single direction, and a measuring lever pivotally supported by the main body so as to be rotatable in a right or left direction from a running direction of the main body in a horizontal plane. The main body includes a display and a calculating means. The measuring lever includes a tracer that traces a contour of the figure to measure the coordinates, areas, or lengths of the figure. The measuring apparatus further comprises first input means, for inputting current coordinates of the tracer into the calculating means, and second input means. When the first input means, the second input means, and then the first input means are sequentially pressed at the three adjacent positions in this order, the calculating means computes parameters of a figure element bounded by a circular arc passing through the three adjacent positions.
According to a feature of a preferred embodiment of the present invention, the measuring apparatus can measure areas of figure elements as the tracer is moved along a profile of the figure. At the same time, the calculating means successively computes geometrical moments of area of the figure elements and sums the geometrical moments of area. The calculating means (circuit) divides the summed geometrical moments of area by an area of the figure to obtain the coordinates of the centroid of the figure. The display indicates differences of the current coordinates of the measuring lever from the coordinates of the centroid of the figure. The measuring lever is moved until the display indicates zero differences, whereby the measuring lever indicates the coordinates of the centroid of the figure.
For circular arc portions in the profile of the figure, the measuring apparatus of the present invention automatically calculates lengths or areas of arched portions bounded by the circular arc portions from coordinates of both end points and an intermediate point of each circular arc entered thereto before adding to or subtracting from that of the whole figure.
Calculations according to the present invention is based on the following theory: in FIGS. 5 and 6, for example, a geometrical moment Mx of the area for an x-axis can be given by the equation ##EQU4## where D represents the domain of y=f(x).
The y coordinate of the centroid of the figure is obtained by dividing the geometrical moment Mx by the area A of domain D, as follows: ##EQU5##
Similarly, the x coordinate of the centroid of the figure is obtained by dividing the geometrical moment My by the area A of domain D, as follows: ##EQU6## where the geometrical moment of the area is: ##EQU7##
It is noted here that when the measuring apparatus moves along an upper portion of profile bounding area D, the measuring apparatus obtains geometrical moment Mx of area D+E and area F of area D+E. On the other hand, when the measuring apparatus moves along a lower portion of the profile bounding area D, the measuring apparatus obtains negative geometrical moment Mx of area D and negative area of area E, because the moving direction on the lower portion of the profile bounding area D is opposite to the moving direction on the upper portion of the curve bounding area D. Therefore, the sum of the geometrical moment Mx obtained by moving along the upper position of area D and the geometrical moment Mx obtained by moving along the lower position of area D means that the geometrical moment Mx of the area is subtracted from the geometrical moment Mx of area D+E.
The measuring apparatus of the present invention calculates the geometrical moment of area by entering coordinates of vertexes of a figure to be measured in the case that the figure is a linear figure, such as shown in FIG. 3.
Further, even if a figure has circular arc profiles in parts thereof, it is not necessary to finely trace the circular arc profiles with the instant invention. Rather, the apparatus of the present invention only measures the coordinates of a start point, an end point, and an intermediate point for each circular arc portion. The calculating means associated with the instant invention calculates an area of an arched portion bounded by the circular arc profile. If a moving direction of the measuring points of the whole figure is the same as that of the three points of the circular arc portion, an area of the arched portion bounded by the circular arc portion is added to the area of a polygon formed by a chord of the arched portion. On the other hand, if the moving directions are reverse, an area of the arched portion bounded by the circular arc portion is subtracted from the area of the polygon formed by a chord of the arched portion. Accordingly, the calculations required to determine the centroid of a figure are simplified.
Since most figures of actual drawings are not given by functions, the profile of the figure is divided into a plurality of small areas and the measuring apparatus sequentially calculates the geometrical moments of the small areas to obtain the geometrical moment of the whole area.
According to an object of the present invention, a measuring apparatus for measuring at least one of coordinates or an area of a figure is disclosed, comprising a main body having a pair of rollers to drive the measuring apparatus in a running direction, a measuring lever that is pivotally supported by the main body so as to be rotatable in a left direction and a right direction relative to the running direction of the main body in a horizontal plane, the measuring lever having a tracer that traces a contour of the figure to be measured, first means for inputting coordinates designating a first location where the tracer is positioned, and second means for inputting coordinates designating a second location where the tracer is positioned when the tracer is located at a point on a circular arc, wherein the main body further comprises a display, and a calculator, wherein the calculator computes geometrical moments Tx.sub.i and Ty.sub.i for an x-axis and a y-axis, the calculator further computing an area F.sub.i of an element defined by successive adjacent coordinates (x.sub.i-1, y.sub.i-1) and (x.sub.i, y.sub.i), where i equals 1 to n, and (x.sub.n, y.sub.n)=(x.sub.1, y.sub.1) inputted by the first inputting means, the calculator adding values of Ty.sub.i and Tx.sub.i and F.sub.i to values of Ty.sub.i-1, Tx.sub.i-1 and F.sub.i-1, respectively, as the measuring lever traces the contour of the figure to be measured, the calculator computing geometrical moments Mx and My for the x-axis and the y-axis and an area A.sub.arc of an arched portion bounded by a circular arc passing through the coordinates (x.sub.i-1, y.sub.i-1), (x.sub.i, y.sub.i) inputted by the first inputting means and coordinates (x.sub.a, y.sub.a) inputted by the second inputting means to one of add or subtract the values Mx, My and A.sub.arc to Tx.sub.i, Ty.sub.i and F.sub.i, respectively, the calculator dividing the summed values of Ty.sub.i and Tx.sub.i by the summed value F.sub.i, respectively, in order to obtain coordinates of a centroid of the figure after the contour of the figure is completely traced, the display functioning to display a difference of a current coordinate of the measuring lever from a coordinate of the centroid of the figure.
According to an advantage of the instant invention, the first inputting means is manipulated when the tracer is at a starting point and an ending point of the circular arc, the second inputting means being manipulated when the tracer is at an intermediate point of the circular arc, so that the calculator computes at least one of the area and the centroid of the figure of the arched portion bounded by the circular arc portion.
According to another advantage of the instant invention, the calculator adds the area A.sub.arc of the arched portion bounded by the circular arc to the area F.sub.i when a tracing rotation direction of the circular arc portion is the same as that of the whole figure. Further, the calculator subtracts the area A.sub.arc of the arched portion bounded by the circular arc from the area Fi when a tracing rotation direction of the circular arc portion is opposite to that of the whole figure.
According to an object of the present invention, a measuring apparatus for measuring at least one of coordinates or an area of a figure is disclosed, comprising a main body having a pair of rollers to drive the measuring apparatus in a driving direction, a measuring lever that is pivotally supported by the main body so as to be rotatable in a left direction and a right direction relative to the running direction of the main body in a horizontal plane, the measuring lever having a tracer that traces a contour of the figure to be measured, first means for inputting coordinates designating a first location at which the tracer is positioned, and second means for inputting coordinates designating a second location at which the tracer is positioned when the tracer is located at a point on a circular arc, wherein the main body further comprises a display, and a calculator, the calculator computing a dimensional parameter F.sub.i of an element defined by successive adjacent coordinates (x.sub.i-1, y.sub.i-1) and (x.sub.i, y.sub.i), where i equals 1 to n, and (x.sub.n, y.sub.n)=x.sub.1, y.sub.1) inputted by the first inputting means, the calculator adding a value of the dimensional parameter F.sub.i to a value F.sub.i-1 as the measuring lever traces the contour of the figure being measured, the calculator computing a dimensional parameter A.sub.arc of an arched portion bounded by the circular arc passing through coordinates (x.sub.i-1, y.sub.i-1), (x.sub.i, y.sub.i) inputted by the first inputting means and coordinates (x.sub.a, y.sub.a) inputted by the second inputting means to one of add and subtract the value A.sub.arc from F.sub.i to obtain a dimensional parameter of the whole figure, the display functioning to display a value corresponding to F.sub.n of the whole figure calculated by the calculator.
According to an advantage of the instant invention, the calculator adds the value A.sub.arc of the arched portion bounded by the circular arc to the value F.sub.i when a tracing rotation direction of the circular arc portion is the same as that of the whole figure.
According to another object of the instant invention, a measuring apparatus for measuring figures having a circular arc comprises a main body, having means for driving the main body in a running direction and a processor, means for tracing a contour of a figure having a circular arc portion, as the main body is driven in the running direction, to determine a starting point, an ending point and an intermediate point of the circular arc portion, first means for inputting the starting point and the ending point of the circular arc portion, second means for inputting the intermediate point of the circular arc portion, wherein the processor processes the starting point, the ending point and the intermediate point to obtain coordinates of a centroid of the figure after the contour of the figure is completely traced by the tracing means.
Additionally, a display unit is provided that displays a difference between a current coordinate of the measuring apparatus and said centroid of the figure. In addition, the measuring apparatus further comprises a measuring lever that houses the tracing means, the first inputting means and the second tracing means, with the measuring lever being rotatable in a clockwise and a counter-clockwise direction of a horizontal plane relative to the running direction of the main body.
The present disclosure relates to subject matter contained in Japanese Patent Application No. HEI 7-133863 (filed on May 31, 1995), which is expressly incorporated herein by reference in its entirety.
BRIEF DESCRIPTION OF THE DRAWINGS
The foregoing and other objects, features, advantages and manner of operation of the present invention will be apparent from the following more particular description of a preferred embodiment, as illustrated in the accompanying drawings which are presented as a non-limiting example, in which reference characters refer to the same parts throughout the various views, and wherein:
FIG. 1 illustrates a plan view of an apparatus for measuring figures according to the present invention;
FIG. 2 illustrates a pattern of a linear profile to explain a measurement of a centroid of a figure according to the present invention;
FIG. 3 illustrates a pattern having linear profiles to explain a measurement of a centroid of a figure using prior art methods;
FIG. 4 illustrates a curved profile pattern to explain a measurement of a centroid of a figure using prior art methods;
FIG. 5 illustrates a pattern to explain the theory of measurement of a centroid of a figure according to an improved measuring apparatus;
FIG. 6 illustrates another pattern to explain the theory of measurement of a centroid of a figure according to the improved measuring apparatus;
FIG. 7 illustrates a flow chart showing a program operation employed by the improved measuring apparatus;
FIG. 8 illustrates a pattern to explain a circular arc portion of a figure for measuring a centroid or area of a figure according to a preferred embodiment of the instant invention;
FIG. 9(a) shows a pattern illustrating a small circular arc portion of a figure;
FIG. 9(b) shows a pattern illustrating a large circular arc portion of a figure;
FIG. 10(a) shows a pattern illustrating, in detail, a small circular arc portion of a figure;
FIG. 10(b) shows a pattern illustrating, in detail, a large circular arc portion of a figure;
FIG. 11 shows a pattern illustrating coordinates of a circular arc portion of a figure;
FIG. 12 shows a pattern illustrating an addition of the circular arc portion shown in FIG. 11 to a polygon;
FIG. 13 illustrates a first part of a flow chart for calculating a centroid of a figure and an area of a circular arc portion using the figure measuring apparatus of the present invention;
FIG. 14 illustrates a second part of the flow chart for calculating the centroid of the figure and the area of the circular arc portion using the figure measuring apparatus of the present invention;
FIG. 15 illustrates a third part of the flow chart for calculating the centroid of the figure and the area of the circular arc portion using the figure measuring apparatus of the present invention; and
FIG. 16 illustrates a fourth part of the flow chart for calculating the centroid of the figure and the area of the circular arc portion using the figure measuring apparatus of the present invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
A preferred embodiment of the present invention will be described below.
FIG. 1 illustrates a plan view of a figure measuring apparatus constructed according to a preferred embodiment of the present invention. Figure measuring apparatus 10 is similar to the improved measuring apparatus discussed above with respect to Japanese Patent Application HEI 4-208013 and U.S. Pat. No. 5,515,299, except for the addition of an arc key 8, to be described below.
As shown in FIG. 1, the measuring apparatus 10 comprises a main body 1 having a pair of rollers 5, 5 that are capable of running in a single direction, and a measuring lever 2 that is pivotally supported by the main body 1 so as to be rotatable in a right direction or left direction relative to a running direction of the main body 1 in a horizontal plane. The main body 1 includes a display 3, and input means, such as, for example, a keyboard 4. Calculating means (not shown), such as, for example, a calculating circuit or general purpose processor that is programmed to perform a predetermined task (to be discussed below), is housed inside the main body 1.
The measuring lever 2 includes a tracer 6 that functions to trace a contour of the figure to measure coordinates, areas, and lengths of the figure to be measured, a point key 9 that functions to input current coordinates of the tracer 6 into the calculating means, a marking pointer 7 that is provided near the tracer 6, and the arc key 8.
The calculating means computes a plurality of geometrical moments of an area and sums the plurality of geometrical moments of the area, and then divides the summed geometrical moments of the area by an area of the figure to obtain the coordinates of the centroid of the figure. The display 3 indicates differences in current coordinates of the marking pointer 7 from coordinates of the centroid of the figure. Accordingly, measuring lever 2 is moved until the display 3 indicates 0 (e.g., no differences exist), at which time the marking pointer 7 indicates the coordinates of the centroid of the figure.
As noted above, the measuring apparatus 10 of the preferred embodiment further includes an arc key 8. The measuring apparatus 10 calculates a centroid of a figure along a circular arc using three continuous points that are obtained by manipulating the point key 9, the arc key 8 and then the point key 9 again (in this order).
When determining a centroid of a n-polygonal figure, the improved measuring process discussed above with respect to FIG. 7 may be used. However, if the figure includes a circular arc in at least one of the n-sides of the figure, inaccuracies would result if the process of FIG. 7 is used. Thus, a process (to be discussed below) according to the present embodiment is used.
FIGS. 13-16 illustrate a flow diagram for calculating coordinates TG.sub.x and TG.sub.y of a centroid of a figure that is formed partly (or wholly) of circular arcs in terms of coordinates of vertexes of the figure. It is noted that numerals 1 to 5 that are surrounded by triangles in FIGS. 13-16 denote connection points to associated portions of the flow diagrams in FIGS. 13-16.
For purposes of understanding the present invention, P.sub.n denotes a vertex of a profile of a figure, as shown in FIG. 8. When tracer 6 reaches vertex P.sub.n shown in FIG. 8, point key 9 is manipulated to begin the measuring process and measure coordinates x.sub.n and y.sub.n at the vertex P.sub.n. The coordinates are inputted into the calculating means (calculating circuit) in step 32. Thereafter, it is determined whether the measured vertex is a last vertex (step 34). If the measured vertex is not the last vertex, step 36 is executed to determine whether the measured vertex is a first vertex (e.g., P.sub.1). If the measured vertex is a first vertex P.sub.1, P.sub.1 is set to P.sub.n-1 in step 37, before the process returns to step 32 to obtain a next vertex coordinate.
If it is determined in step 34 that the last vertex has been obtained, the process proceeds to step 35 to set P.sub.1 equal to P.sub.n, before executing step 40, which will be described below. That is, the last point P.sub.n will be the same as the first point P.sub.1. Accordingly, the coordinates (x.sub.n,y.sub.n) of the last vertex will be equal to the coordinates (x.sub.1,y.sub.1) of the first vertex.
If it is determined that the last vertex has not been obtained (in step 34) and that the obtained vertex is not the first vertex (in step 36), it is determined in step 38 whether the obtained vertex is a point on a circular arc. This determination is performed by examining the status of arc key 8 to determine whether it has been manipulated (e.g., pressed, or set to an ON state) on the point in question. If it is determined in step 38 that the obtained point is on a circular arc, x.sub.n is set to be equal to x.sub.a and y.sub.n is set to be equal to y.sub.a before the process returns to step 32 to obtain additional coordinates of the vertex P.sub.n.
If it is determined in step 38 that the obtained point is not on a circular arc, step 40 is executed. In step 40, a double lateral distance area element F.sub.n, a total x-axis moment TX, and a total y-axis moment TY of an element defined by two adjacent vertexes, are calculated on the assumption that no circular arc is included between two adjacent vertexes.
As shown in FIGS. 14 through 16, if the profile is a circular arc (e.g., the previous vertex is determined to be a point on a circular arc in step 42) steps 44 through 58 are executed. On the other hand, if the previous vertex is not on the circular arc, the process proceeds to step 60, to be described below.
In step 44, an attribute radius .gamma. of a circle including the circular arc, a center Pc(x.sub.c, y.sub.c) of the circle, a center angle .theta. of the circular arc, and an area A.sub.arc of an arched portion bounded by the circular arc are calculated by means of three adjacent points P.sub.n, P.sub.n-1, and P.sub.a, in which P.sub.a is an intermediate point (e.g., a point on the circular arc). In step 46, a distance D.sub.g between a centroid (x.sub.g, y.sub.g) of the arched portion that is bounded by the circular arc and the center P.sub.c (x.sub.c, y.sub.c), a rotation discriminant D.sub.a for the circular arc trace, and a chord length L.sub.a of the arched portion, are calculated.
As illustrated in FIG. 15, step 48 is executed to determine whether the turning direction of the measurement on the profile of the circular arc is clockwise or counter-clockwise, by examining D.sub.a. If D.sub.a is less than 0, processing proceeds to step 49. Otherwise, processing proceeds to step 50. Depending on the result of the examination of D.sub.a in step 48, D.sub.g /L.sub.a (y.sub.n -y.sub.n-1) and D.sub.g /L.sub.a (x.sub.n -x.sub.n-1) are subtracted (step 49) or added (step 50) to y.sub.c and x.sub.c, respectively, to obtain centroid coordinates y.sub.g and x.sub.g, respectively.
Both steps 49 and 50 proceed to step 52, which calculates geometrical moment elements Mx and My of the arched portion that is bounded by the circular arc portion. Thereafter, the turning direction of measurement (e.g., a clockwise or counter-clockwise direction) of the profile of the circular arc is determined in step 54 by examining D.sub.a. If it is determined in step 54 that the turning direction is clockwise, the sign of A.sub.arc is reversed by multiplying the value by -1 in step 55. Conversely, if it is determined that the turning direction is counter-clockwise, the signs of the geometrical moment elements Mx and My are reversed by multiplying the respective values by -1 in step 56.
After step 55 or step 56 is executed, step 58 is executed to obtain geometrical moments TX and TY of the whole figure and cumulative area F.sub.n of the whole figure including the circular arc portions of the figure.
Step 60 is executed to determine whether the last vertex has been obtained. If it is determined that the last vertex has not been obtained, processing returns to step 32, after setting P.sub.n to P.sub.n-1 (step 61), to repeat the execution of steps 32 to 60. When the last vertex is obtained (meaning that the figure has been completely traced), processing proceeds from step 60 to step 62, in order to determine a measurement turning direction of the whole figure, by examining the sign of the cumulative area F.sub.n of the whole figure. If it is determined in step 62 that F.sub.n is less than or equal to 0, meaning that the turning direction is clockwise, step 64 is executed. However, if it is determined in step 62 that the turning direction is counter-clockwise, the signs of the geometrical moments TX and TY are reversed by multiplying the respective values by -1 before proceeding to step 64.
In step 64, area TA of the whole figure is determined, and the total geometrical moments TX and TY of the whole figure are divided by the whole area TA to obtain the centroid coordinates TG.sub.x and TG.sub.y of the whole figure. The process then ends at step 66.
The following description describes the details of steps 40 through 58. FIG. 8 depicts a figure having a circular arc portion between vertexes Pn (x.sub.n, y.sub.n) and P.sub.n+1 (x.sub.n+1, y.sub.n+1) of an n-sided polygon. An intermediate point (e.g., circular arc point) P.sub.a (x.sub.a, y.sub.a) is optionally determined on the circular arc portion. An area and a centroid of the arched portion bounded by the circular arc portion are calculated using an optional intermediate point, as set forth in equation (3) below.
It should be noted that the signs in the following equations are as indicated if a moving direction of a measuring point at the coordinates of each vertex of the whole polygon including curves is the same as that of the three points of the circular arc portion, and that the signs are reversed if the directions are the reverse.
If P.sub.c (x.sub.c, y.sub.c) denotes the coordinates of a center of a circle that includes the circular arc and .gamma. denotes a radius of the circle, when the above-mentioned three points P.sub.n (x.sub.n, y.sub.n), P.sub.a (x.sub.a, y.sub.a), and P.sub.n-1 (x.sub.n-1, y.sub.n-1) are determined, the equation of the circle is:
(x-x.sub.c).sup.2 +(y-y.sub.c).sup.2 =.gamma. (3)
The centroid P.sub.c (x.sub.c, y.sub.c) and the radius .gamma. can be obtained by solving the simultaneous equations at the three points P.sub.n, P.sub.a, and P.sub.n-1, as is performed in step 44 of FIG. 14.
If .theta. denotes an angle contained by two lines that connect both ends of the circular arc portion with the center of the circle, as illustrated in FIG. 9, and .alpha. denotes an angle contained by two lines connecting both ends of the circular arc portion with the intermediate point on the circular arc portion, the angle .alpha. can be obtained by: ##EQU8## Thus,
.alpha.=.angle.P.sub.n-1 P.sub.a P.sub.n =cos.sup.-1 (cos.alpha.).
Since an angle of circumference is equal to an angle of the center divided by two
.theta.=2(.pi.-.alpha.).
If .alpha..gtoreq..pi./2, the circular arc portion is a small circular arc (as shown in FIG. 9(a)). If .alpha.<.pi./2, the circular arc portion is a large circular arc (as shown in FIG. 9 (b)). An area of the arched portion that is bounded by the circular arc portion P.sub.n P.sub.a P.sub.n+1 is given by:
A.sub.arc =(.theta.-sin.theta.).gamma..sup.2 /2.
The following is performed to find the centroid of the arched portion of the circular arc. Reference should be made to FIG. 10.
If D.sub.g denotes a distance of the centroid G(x.sub.g, y.sub.g) of the arched portion that is bounded by the circular arc portion from the center P.sub.c of the circle, on a center line that passes a center point of the circular arc from the center P.sub.c, the distance D.sub.g can be calculated from a geometrical moment of the area of the arched portion bounded by the circular arc shown in FIG. 10, by using the central angle .theta. and the radius .gamma. of the circle. The geometrical moment of the area of the arched portion for the x-axis, Mx, is given by:
Mx=.intg..intg.y dydx(area: the circular arc).
Then, the geometrical moment Mx is divided by the area. Accordingly, ##EQU9##
Centroid coordinates (x.sub.g, y.sub.g) are determined in accordance with a turning direction of the trace along the arc profile (e.g., a clockwise direction or a counter-clockwise direction). That is, if the turning direction is in a clockwise direction, the centroid coordinates are obtained by:
x.sub.g =x.sub.c -(D.sub.g /L.sub.a)(y.sub.n -y.sub.n-1), and
y.sub.g =y.sub.c +(D.sub.g /L.sub.a)(x.sub.n -y.sub.n-1).
On the other hand, if the turning direction is in a counter-clockwise direction, the centroid coordinates are obtained by:
x.sub.g =x.sub.c +(D.sub.g /L.sub.a)(y.sub.n -y.sub.n-1), and
y.sub.g =y.sub.c -(D.sub.g /L.sub.a)(x.sub.n -x.sub.n-1).
It is noted that L.sub.a denotes a length of a chord of the circular arc or a length between point P.sub.n and point P.sub.n-1 such that
La=root {(x.sub.n-1 -x.sub.n).sup.2 +(y.sub.n-1 -y.sub.n).sup.2 }.
The turning direction of the arc is found by determined whether an area of arc triangle C (shown in FIG. 12) is positive or negative. Therefore, rotation discriminant D.sub.a of the circular arc (i.e. the area of the arc triangle C) is given by:
Da=x.sub.n-1 (y.sub.a -y.sub.n)+x.sub.a (y.sub.n -y.sub.n-1)+x.sub.n (y.sub.n-1 -y.sub.a).
If Da is determined to be greater than 0, the tracing direction is determined to be in a clockwise direction. If Da is determined to be less than 0, the tracing direction is determined to be in the counter-clockwise direction.
The following operations are performed (as illustrated in step 52 of FIG. 15) to calculate the geometrical moments of the area of the arched portion that is bounded by the circular arc for the x-axis and the y-axis:
Assume Mx and My denote geometrical moments of the area of the circular arc for the x-axis and the y-axis. Then, Mx=(area of the arched portion)*(centroid y.sub.g of the arched portion)
=A.sub.arc * y.sub.g.
My=A.sub.arc * x.sub.g.
The following describes the addition of the geometrical moments of area to the area of the polygon, as shown in FIG. 12 and described in steps 54 through 58 illustrated in FIG. 15.
If F.sub.n denotes an area of the n-side polygon, F.sub.n is calculated by the following equation (described above with respect to step 40): ##EQU10##
If F.sub.n is determined to be greater than 0, the tracing direction is in the clockwise direction. If F.sub.n is less than 0, the tracing direction is in the counter-clockwise direction.
It is possible to know that the area and the geometrical moment of the area of the arched portion are added or subtracted depending on a sign of the rotation discriminant Da of the circular arc, since a sign of the arc triangle C is the same as that of the area of the arched portion. Since A.sub.arc, calculated in step 44, can be obtained as a positive value, it should have the same sign of the arc triangle C (e.g., the rotation discriminant Da).
If Da is determined to be less than 0, a new A.sub.arc is equal to -A.sub.arc. If Da is determined to be greater than or equal to 0, a new A.sub.arc is equal to A.sub.arc. Meanwhile, F.sub.n is equal to F.sub.n and the new A.sub.arc. This is discussed above with respect to step 58. Since F.sub.n can be either a positive value or a negative value, the final area TA is given by ABS(F.sub.n), as described above with respect to step 64.
Further, the geometrical moments TY and TX of the area are calculated by the following equations (as described above with respect to step 40): ##EQU11##
The addition or subtraction of the geometrical moments of the area of the arched portion to the geometrical moments TY and TX are determined in accordance with the turning direction of the circular arc, as follows:
If Da is less than 0 (e.g., a clockwise turning of the circular arc exists), then:
TY=TY+My,
and
TX=TX+Mx (4)
If Da is greater than or equal to 0 (e.g., a counter-clockwise turning of the circular arc exists), then:
TY=TY-My,
and
Tx=Tx-Mx (5)
Equations 4 and 5, above, are summarized, as follows:
If Da is less than 0, then:
New My is equal to My, and
New Mx=Mx.
If Da is greater than or equal to 0, then:
New My=My*(-1), and
New Mx=Mx*(-1).
TY=TY+new My, and
TX=TX+new Mx.
It is noted that the above was discussed previously with respect to step 58, discussed above.
If the tracing of the figure is completed, in the case where F.sub.n is greater than 0 (indicating the tracing was in the counter-clockwise turning), then:
TY=TY*(-1), and
TX=TX*(-1).
It is noted that the above was previously discussed above with respect to step 63.
Further, as discussed above with respect to step 64, the area TA of the whole figure is determined by:
TA=ABS (F.sub.n),
and the coordinates TGx and TGy of the centroid of the figure are determined by:
TGx=TY/TA, and
TGy=TX/TA.
It is noted that any number of circular arcs may exist with the present process.
While the figure described above is a polygon that includes circular arcs, the present invention may also be applied to the measurement of circular arcs of figures having curved profiles.
The present invention greatly simplifies the measurement of n-side polygons and curved figures having circular arcs. Specifically, the measuring apparatus of the present invention has the coordinates at both ends of a circular arc and at an intermediate point of the circular arc entered thereto to calculate the length or area of an arched portion that is bounded by the circular arc, in order to add to or subtract from the n-side polygon or the figure of the curved profile.
Having described a preferred embodiment of the invention with reference to the accompanying drawings, it is to be understood that the invention is not limited to embodiment discussed herein, and that various changes and modifications may be effected therein by one skilled in the art without departing from either the scope and/or spirit of the invention as defined in the claims.
Claims
- 1. A measuring apparatus for measuring at least one of coordinates or an area of a figure, comprising;
- a main body having a pair of rollers to drive said measuring apparatus in a running direction;
- a measuring lever that is pivotally supported by said main body so as to be rotatable in a left direction and a right direction relative to said running direction of said main body in a horizontal plane, said measuring lever having a tracer that traces a contour of the figure to be measured;
- first means for inputting coordinates designating a first location where said tracer is positioned; and
- second means for inputting coordinates designating a second location where said tracer is positioned when said tracer is located at a point on a circular arc, wherein said main body further comprises:
- a display; and
- a calculator, wherein said calculator computes geometrical moments Tx.sub.i and Ty.sub.i for an x-axis and a y-axis, and an area F.sub.i of an element defined by successive adjacent coordinates (x.sub.i-, y.sub.i-1) and (x.sub.i, y.sub.i), where i equals 1 to n, and (x.sub.n, y.sub.n)=(x.sub.1, y.sub.1) inputted by said first inputting means, said calculator adding values of Ty.sub.i and Tx.sub.i and F.sub.i to values of Ty.sub.i-1, Tx.sub.i-1 and F.sub.i-1, respectively, as said measuring lever traces said contour of the figure to be measured, said calculator computing geometrical moments Mx and My for said x-axis and said y-axis and an area A.sub.arc of an arched portion bounded by a circular arc passing through said coordinates (x.sub.i-1, y.sub.i-1), (x.sub.i, y.sub.i) inputted by said first inputting means and coordinates (x.sub.a, y.sub.a) inputted by said second inputting means to one of adding said values Mx, My and A.sub.arc to Tx.sub.i, Ty.sub.i and F.sub.i, respectively, and subtracting said values Mx, My and A.sub.arc from Tx.sub.i, Ty.sub.i and F.sub.i, respectively, said calculator dividing said summed values of Ty.sub.i and of Tx.sub.i by said summed value of F.sub.i, respectively, in order to obtain coordinates of a centroid of the figure after the contour of the figure is completely traced, said display functioning to display a difference of a current coordinate of said measuring lever from a coordinate of said centroid of the figure.
- 2. The measuring apparatus of claim 1, wherein said first inputting means is manipulated when said tracer is at a starting point and an ending point of said circular arc, said second inputting means being manipulated when said tracer is at an intermediate point of said circular arc, so that said calculator computes at least one of said area and said centroid of the figure of said arched portion bounded by said circular arc portion.
- 3. The measuring apparatus of claim 1, wherein said calculator adds said area A.sub.arc of said arched portion bounded by said circular arc to said area F.sub.i when a tracing rotation direction of said circular arc portion is the same as that of the whole figure.
- 4. The measuring apparatus of claim 3, wherein said calculator subtracting said area A.sub.arc of said arched portion bounded by said circular arc from the area Fi when a tracing rotation direction of said circular arc portion is opposite to that of the whole figure.
- 5. The measuring apparatus of claim 1, wherein said calculator subtracting said area A.sub.arc of said arched portion bounded by said circular arc from the area Fi when a tracing rotation direction of said circular arc portion is opposite to that of the whole figure.
- 6. A measuring apparatus for measuring at least one of coordinates or an area of a figure, comprising;
- a main body having a pair of rollers to drive said measuring apparatus in a driving direction;
- a measuring lever that is pivotally supported by said main body so as to be rotatable in a left direction and a right direction relative to said running direction of said main body in a horizontal plane, said measuring lever having a tracer that traces a contour of the figure to be measured;
- first means for inputting coordinates designating a first location at which said tracer is positioned; and
- second means for inputting coordinates designating a second location at which said tracer is positioned when said tracer is located at a point on a circular arc, wherein said main body further comprises:
- a display; and
- a calculator, said calculator computing a dimensional parameter F.sub.i of an element defined by successive adjacent coordinates (x.sub.i-1, y.sub.i-1) and (x.sub.i, y.sub.i), where i equals 1 to n, and (x.sub.n, y.sub.n)=(x.sub.1, y.sub.1) inputted by said first inputting means, said calculator adding a value of said dimensional parameter F.sub.i to a value F.sub.i-1 as said measuring lever traces said contour of the figure being measured, said calculator computing a dimensional parameter A.sub.arc of an arched portion bounded by said circular arc passing through coordinates (x.sub.i-1, y.sub.i-1), (x.sub.i, y.sub.i) inputted by said first inputting means and coordinates (x.sub.a, y.sub.a) inputted by said second inputting means to one of adding said value A.sub.arc to F.sub.i and subtracting said value A.sub.arc from F.sub.i to obtain a dimensional parameter of the whole figure, said display functioning to display a value corresponding to F.sub.n of the whole figure calculated by said calculator.
- 7. The measuring apparatus of claim 6, wherein said first inputting means is manipulated when said tracer is at a starting point and an ending point of said circular arc, said second inputting means being manipulated when said tracer is at an intermediate point of said circular arc, so that said calculator computes the dimensional parameter A.sub.arc of said arched portion bounded by said circular arc portion.
- 8. The measuring apparatus of claim 6, wherein said calculator adds said value A.sub.arc of said arched portion bounded by said circular arc to said value F.sub.i when a tracing rotation direction of said circular arc portion is the same as that of the whole figure.
- 9. A measuring apparatus for measuring figures having a circular arc, comprising:
- a main body, comprising:
- means for driving said main body in a running direction; and
- a processor;
- means for tracing a contour of a figure having a circular arc portion, as said main body is driven in said running direction, to determine a starting point, an ending point and an intermediate point of said circular arc portion;
- first means for inputting said starting point and said ending point of said circular arc portion;
- second means for inputting said intermediate point of said circular arc portion, wherein said processor processes said starting point, said ending point and said intermediate point to obtain coordinates of a centroid of the figure after the contour of the figure is completely traced by the tracing means.
- 10. The measuring apparatus of claim 9, further comprising:
- a display unit that displays a difference between a current coordinate of the measuring apparatus and said centroid of the figure.
- 11. The measuring apparatus of claim 9, wherein said processor determines said coordinates of said centroid of the figure by calculating geometrical moments for an x-axis and a y-axis, and additionally computes an area of the figure as said measuring apparatus traces the contour of the figure.
- 12. The measuring apparatus of claim 9, further comprising a measuring lever that houses said tracing means, said first inputting means and said second tracing means, said measuring lever being rotatable in a clockwise and a counter-clockwise direction of a horizontal plane relative to said running direction of said main body.
Priority Claims (1)
Number |
Date |
Country |
Kind |
7-133863 |
May 1995 |
JPX |
|
US Referenced Citations (6)
Foreign Referenced Citations (1)
Number |
Date |
Country |
62-119407 |
May 1987 |
JPX |