Professional Documents
Culture Documents
Least Squares Best-Fit Circles (With Applications To M o H R ' S Diagram) 1 Richard J. Lisle 2
Least Squares Best-Fit Circles (With Applications To M o H R ' S Diagram) 1 Richard J. Lisle 2
5, 1992
Richard J. Lisle 2
Procedures are outlined for the selection of a least squares best-fit circle to data points defined by
rectangular Cartesian coordinates. Equations are derived to allow fitting o f circles centered on the
x-axis as well as off-axis Mohr circles. These procedures are applicable to the estimation of second-
order tensors such as stress and strain by means of Mohr's diagram,
KEY WORDS: statistics, image analysis, strain, estimation, structural geology, tensors.
INTRODUCTION
455
T H E B E S T - F I T C I R C L E C E N T E R E D ON T H E X-AXIS
For a data point (xi, yi) which does not lie exactly on the circle, the fight hand
side of Eq. (2) will be non-zero and equal to Ei.
Considering all data points (xi, yi; i = 1 to N), the least squares best-fit
circle is the one which minimizes the sum of the squares of the error terms,
i.e.,
min Z (E~) = min Z (x~ + Ax~ + y2 + B)2 (3)
The minimum o f ~ (E~) is found by partial differentiation of Eq. (3) with respect
to circle parameters A and B and setting these partial derivatives to zero:
-5
d E ( E 2 ) / d B = • (x 2 + Axi + y2 + B) = 0
These equations simplify to give what are known as the normal equations:
r Ic2 +
Example. The above equations are employed to calculate the best circle
fitted to the data listed in Table 1 and represented graphically in Fig. 1. The
calculations are performed by means o f the BASIC program listed in Appendix
i XI YI XI YI
A. The best-fit circle has center, c = 7.6 and radius, r = 3.9. The root-mean-
square deviation of the points away from this circle (expressed as a percentage
of the radius) is 5.9%.
B E S T - F I T OFF-AXIS C I R C L E
The need to consider circles with centers located away from the x-axis
arises in two situations. First, off-axis Mohr circles are employed to represent
asymmetrical second-order tensors quantities (De Paor and Means, 1984; re-
viewed by Means, 1990). Second, certain graphical techniques for finite strain
analysis (Ragan, 1983, p. 190-191; Lisle and Ragan, 1988) involve the con-
struction of the circle without a priori knowledge of the position of the origin
of the Mohr diagram; the center of the circle being used to fix the x-axis.
The equation of a circle of radius r and center at c, d (Fig. 2) is
(x - c) 2 + (y - d ) 2 = r 2
Using b = w 2 = c 2 + d 2 - r2 (Fig. 2), this becomes
x 2 - 2cx + y 2 _ 2yd + b = 0
For actual data points (xi, yi), error terms E i will appear on the right-hand side
which, as before, are to be subjected to least-squares minimalization. Partial
differentiations of the equation for ~ (E 2) with respect to circle variables c, d,
and b, respectively, and equating to zero yield:
d ~ (E2i)/dc = ~ (2x~c + 2xiYi d -- xib - x 3 - xiY 2)
=0
d Z (E2)/dd = Z (2xiyic + 2yZd - y~b - xZyi - y3)
=0
d Z (E2)/db = ~ ( - 2 x i c - 2yid + b + x 2 + y2)
=0
Y .10
I k
A P P E N D I X A. L I S T I N G OF A G W - B A S I C P R O G R A M T O F I N D
T H E BEST-FIT C I R C L E C E N T E R E D O N T H E X-AXIS
10 C O L O R 4,7,3: CLS
20 P R I N T " PROGRAM MOHR"
30 PRINT"==============~================================~=======================
60 DIM X ( 1 0 0 0 ) , Y ( 1 0 0 0 )
70 REM d a t a input
80 INPUT" N a m e o f input f i l e w i t h x,y d a t a " ; D $
90 O P E N D$ FOR INPUT AS ~I
100 C O U N T =I
110 IF E O F ( I } T H E N G O T O 150
120 INPUT4~ , X ( C O U N T ) , Y ( C O U N T )
130 C O U N T = C O U N T + I
140 G O T O 110
150 N=COUNT-I
160 F O R I=I TO N
170 T L = T L + X ( I ) ^ 2 + Y ( I ) ^ 2
180 T M = T M + X ( I )
190 T R = T R + X ( I ) ^ 3 + X ( I ) * Y ( I ) ~ 2
200 B R = B R + X ( I ) ^ 2
205 T Y = T Y + Y ( I )
460 Lisle
210 N E X T I
220 P R I N T
230 P R I N T
240 C E N T R E = . 5 * ( ( T L * T M - N * T R ) / ( T M ^ 2 - N * B R ) )
250 R A D I U S = S Q R ( C E N T R E ^ 2 + ( T R - 2 * C E N T R E * B R ) / T M )
260 P R I N T " C e n t r e of M o h r c i r c l e a t " ; C E N T R E ; " , 0 . 0 " ; " Radius = ";RADIUS
270 P R I N T " ...................... "
340 R E M r o o t m e a n s q u a r e v a r i a t i o n e x p r e s s e d as % of r a d i u s
350 F O R I=I T O N
360 D I S T C E N T = S Q R ( ( X ( I ) - C E N T R E ) ^ 2 + Y ( I ) ^ 2 )
390 T S V A R = T S V A R + ( D I S T C E N T - R A D I U S ) ^ 2
400 N E X T I
410 R M S V = S Q R ( T S V A R / N ) / R A D I U S * I O 0
420 P R I N T " R o o t M e a n S q u a r e D e v i a t i o n of p o i n t s f r o m c i r c l e " : P R I N T "
e x p r e s s e d as % of r a d i u s = " ; R M S V ; " %"
10 C O L O R 4,7,3: CLS
20 P R I N T " PROGRAM MOHROFF"
30 P R I N T " = = = . . . . . . . . . . . . . . . . . . . . ===== . . . . . . . = .... = ..... = . . . . . . . . . ==== . . . . . . = ....
========"
40 P R I N T " F i n d s a l e a s t - s q u a r e s b e s t fit M o h r c i r c l e t h r o u g h p o i n t s x , y "
50 P R I N T " T h e c i r c l e h a s r a d i u s r a n d a c e n t r e o f f the x - a x i s at x = c , y = d "
70 P R I N T " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
80 D I M X ( 1 0 0 0 ) , Y ( 1 0 0 0 )
90 R E M data input
100 I N P U T " N a m e of i n p u t f i l e w i t h x , y d a t a " ; D $
110 O P E N D$ F O R I N P U T AS ~I
120 C O U N T =I
130 IF E O F ( 1 ) T H E N G O T O 170
140 I N P U T ~ , X ( C O U N T ) , Y ( C O U N T )
150 C O U N T = C O U N T + I
160 G O T O 130
170 N = C O U N T - I
180 A = 0 : B = 0 : C = 0 : D = 0 : E = 0 : F = 0 : K = 0 : L = 0 : M = 0
190 F O R I=I T O N
200 A = A + 2 * X ( I ) ^ 2
210 B = B + 2 * X ( I ) * Y ( I )
220 C = C - X ( I )
225 D = D + 2 * Y ( I ) ^ 2
230 E = E - Y ( I )
240 F = F + . 5
250 K = K + X ( I ) ^ 3 + X ( I ) * Y ( I ) ^ 2
260 L = L + X ( I ) ^ 2 * Y ( I ) + Y ( I ) ^ 3
270 M = M - . 5 * ( X ( I ) ^ 2 + Y ( I ) ^ 2 )
280 N E X T I
290 R E M c o e f f s of e l l i p s e e q n ( a c , b c , c c )
300 D E T = A * D * F + 2 * B * C * E - A * E * E - F * B * B - D * C * C
310 C C = ( K * ( D * F - E * E ) - L * ( B * F - E * C ) + M * ( B * E - D * C ) ) / D E T
320 D C = ( - K * ( B * F - C * E ) + L * ( A * F - C * C ) - M * ( A * E - B * C ) ) / D E T
330 B C = ( K * ( B * E - D * C ) - L * ( A * E - B * C ) + M * ( A * D - B * B ) ) / D E T
335 R = S Q R ( C C * C C + D C * D C - B C )
340 P R I N T " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ACKNOWLEDGMENTS
T h e a u t h o r is grateful to D e c l a n D e P a o r and an a n o n y m o u s r e v i e w e r f o r
t h e i r useful s u g g e s t i o n s f o r i m p r o v i n g t h e m a n u s c r i p t .
REFERENCES
Brace, W. F., 1961, Mohr Construction in the Analysis of Large Geologic Strain: Bull. Geol. Soc.
Am., v. 72, p. 1059-1080.
De Paor, D. G., and Means, W. D., 1984, Mohr Circles of the First and Second Kind and Their
Use to Represent Tensor Operations: J. Struct. Geol., v. 6, p. 693-701.
Erslev, E. A., and Ge, H., 1990, Least-Squares Center-to-Center and Mean Object Ellipse Fabric
Analysis: J. Struct. Geol., v. 12, p. 1047-1060.
Jaeger, J. C., 1962, Elasticity, Fracture and Flow: Methuen.
Kanagawa, K., 1990, Automated Strain Analysis Using an Image Analysis System: J. Struct. Geol.,
v. 12, p. 139-143.
Lisle, R. J., and Ragan, D. M., 1988, Strain Determination from Three Measured Stretches--A
Simple Mohr Circle Solution: J. Struct. Geol., v. 10, p. 905-906.
Means, W. D., 1990, Kinematics, Stress, Deformation and Material Behaviour: J. Struct. Geol.,
v. 12, p. 953-971.
Neville, A. M., and Kennedy, J. B., 1964, Basic Statistical Methods for Engineers and Scientists:
International.
Nye, J. F., 1972, Physical Properties of Crystals: Oxford.
Ragan, D. M., 1983, Structural Geology: An Introduction to Geometrical Techniques: Wiley, New
York.
Ramsay, J. G., 1967, Folding and Fracturing of Rocks: McGraw-Hill.