on fitting certain closed convex curves to archaeological point data using an interactive graphics...

5
Journal of Archaeological Science 1978,5, 309-313 On Fitting Certain Closed Convex Curves to Archaeological Point Data using an Interactive Graphics Terminal I. 0. Angell” A graphics terminal displays the archaeological point data superimposed on the closed curve together with numerical information relating to the accuracy of fit. Human logic then shortcuts the otherwise extensive computer capacity necessaryfor initial refinement. The Powell minimization technique is then used to obtain the “best” fit. The underlying mathematics, an outline of the implementation and several examples are presented. Keywords: MEGALITHIC STONE RINGS, COMPUTING, CURVE FITTING, HISTORY OF SCIENCE. Recent improvements in the economics and efficiency of interactive terminal devices now make it cost effective to use these peripherals to aid in the solution of certain curve fitting problems. This paper describes the implementation of such a package which is used in an archaeological context. Professor A. Thorn (1967) has proposed that a sophisticated “scientific” community was involved in the construction of the megalithic rings and standing stones of the late Neolithic and early Bronze Age. He has given a number of geometrical techniques for constructing the non-elliptical stone rings, and he fits these shapes to actual sites by eye. This paper describes an alternative method of obtaining these special shapes and then goes further to explain how the fitting process is automated. Each fit has a measure of “goodness of fit” which can be used for comparative purposes and for investigating claims regarding the geometrical ability of the Megalithic Culture. The particular convex curves referred to consist of six elliptical arcs; the overall shape has seven degrees of freedom which will be the parameters introduced by the user. The final picture will be two overlaid images (or frames), the convex shape in the first, the data points and information relating to position and orientation (necessary for future parameter choice) in the second. They are superimposed by specifying the positional difference of the frame origins, the angular difference of their x-axes, and the scale of the second frame relative to the first. The root mean square (R.M.S.) of the “errors” between the point data and the proposed shape is printed, and the frame origins and the angle of rotation displayed pictorially as an aid to choosing a “better” set of parameters. When a reasonable fit (specified by the operator) has been obtained, the program uses the par- ameters as the initial values to the Powell minimization algorithm (1964), which then aDepartment of Statistics and Computer Science,Royal Holloway College, Egham, Surrey. 309 0305-4403/78/030309 +05 $02.00/O 0 1978 Academic Press Inc. (London) Ltd

Upload: io

Post on 27-Dec-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: On fitting certain closed convex curves to archaeological point data using an interactive graphics terminal

Journal of Archaeological Science 1978,5, 309-313

On Fitting Certain Closed Convex Curves to Archaeological Point Data using an Interactive Graphics Terminal I. 0. Angell”

A graphics terminal displays the archaeological point data superimposed on the closed curve together with numerical information relating to the accuracy of fit. Human logic then shortcuts the otherwise extensive computer capacity necessary for initial refinement. The Powell minimization technique is then used to obtain the “best” fit.

The underlying mathematics, an outline of the implementation and several examples are presented.

Keywords: MEGALITHIC STONE RINGS, COMPUTING, CURVE FITTING, HISTORY OF SCIENCE.

Recent improvements in the economics and efficiency of interactive terminal devices now make it cost effective to use these peripherals to aid in the solution of certain curve fitting problems. This paper describes the implementation of such a package which is used in an archaeological context.

Professor A. Thorn (1967) has proposed that a sophisticated “scientific” community was involved in the construction of the megalithic rings and standing stones of the late Neolithic and early Bronze Age. He has given a number of geometrical techniques for constructing the non-elliptical stone rings, and he fits these shapes to actual sites by eye. This paper describes an alternative method of obtaining these special shapes and then goes further to explain how the fitting process is automated. Each fit has a measure of “goodness of fit” which can be used for comparative purposes and for investigating claims regarding the geometrical ability of the Megalithic Culture.

The particular convex curves referred to consist of six elliptical arcs; the overall shape has seven degrees of freedom which will be the parameters introduced by the user. The final picture will be two overlaid images (or frames), the convex shape in the first, the data points and information relating to position and orientation (necessary for future parameter choice) in the second. They are superimposed by specifying the positional difference of the frame origins, the angular difference of their x-axes, and the scale of the second frame relative to the first. The root mean square (R.M.S.) of the “errors” between the point data and the proposed shape is printed, and the frame origins and the angle of rotation displayed pictorially as an aid to choosing a “better” set of parameters. When a reasonable fit (specified by the operator) has been obtained, the program uses the par- ameters as the initial values to the Powell minimization algorithm (1964), which then

aDepartment of Statistics and Computer Science, Royal Holloway College, Egham, Surrey.

309 0305-4403/78/030309 +05 $02.00/O 0 1978 Academic Press Inc. (London) Ltd

Page 2: On fitting certain closed convex curves to archaeological point data using an interactive graphics terminal

310 FITTING CURVES TO POINT DATA

finds an optimal solution (i.e. it minimizes the R.M.S. of the errors), and displays the final outline and data points on the screen.

This iterative technique is used to fit this class of shapes to survey plans of two Mega- lithic Stone Rings and an Iron Age Broth.

Figure 1. Figure 2.

Figure 3. Figure 4.

Mathematical Formulation The particular class of curves under consideration is that produced by the following “rope and pegs” construction. Three pegs are placed at points O(0, 0), A@, 0) and B&c) and a “rope” loop of fixed length r is held taut with the triangle of points 0, A, B inside. The shape is produced by moving anticlockwise keeping the rope taut (see Figure 1).

A catalogue of a large number of the convex curves had been produced previously and for each figure the ratio of the maximum diameter to the largest diameter perpen- dicular to it noted. This information is then compared directly with similar information derived from the co-ordinate data of the given site, and a short list of possible outlines is compiled. From this a choice of integral values for a, b, c and r is fed to the computer and the convex shape is drawn on the graphics screen. This outline consists of six elliptical arcs; each arc is bounded by two produced sides of the contained triangle AOAB and the two vertices on the remaining side are the foci of the ellipse (for further description see Angel& 1976).

The following information is retained for the jth arc (j= 1, . . ., 6): (i) the centre of the ellipse, (ii) the inclination of its major axis to the horizontal, (iii) the equation of the ellipse in its normalized form

x2 ,+L1 Pj’ a2

(the information (i) and (ii) enables the transformation between the original co- ordinate system and the normalized one to be made),

Page 3: On fitting certain closed convex curves to archaeological point data using an interactive graphics terminal

1.0. ANGELL 311

(iv) the vertex of AQAB which is not a focus of the ellipse; for ease of calculation this point is given in this normalized system.

When the co-ordinate data are superimposed on the shape chosen, it is then necessary to calculate the error values, viz. the distances from each point P(xl, y,) to that point on the curve nearest it. It is first necessary to decide which of the six arcs is nearest to P and this is done in the following manner.

The three lines, each through a pair of points chosen from 0, A and B, are signified thus :

fi(-% Y> = Y = 0 the line through 0,A f2k Y) = cx -6Y = 0 the line through 0,B f3(x, y) = (b --a$ -c(x-a) = 0 the line through A,B.

We define the character 1j(X, y) :

Aj(X, Y) = + 1 if fj(X, Y) > 0 = 0 if fj(x, y) 6 0.

ThenT(x, y) = 411,(x, y) + 21,(x, y) + &(x, y) has a value between 1 and 7 (0 is mathe- matically impossible) defining the seven sectors shown in Figure 1, andr(x,, y,) indicates the sector to which (x1, yl) belongs. Sector 7 is the area inside AOAB and for all practical purposes if a data point is in this sector then the fit is so poor that it should be abandoned. Each of the other six sectors has a unique associated elliptical arc.

If P(x,, y,) is in sector j (say), then using information (i) and (ii) for this sector, P is transformed to P’ (Z,, jJ1) in the normalized co-ordinate system. To find the distance from P’ to the ellipse (x2/~,“) + (y2/q,2) = 1 it is necessary to find where the normal through P’ (in general there are four) cuts the ellipse. This is done by solving the quartic poly- nomial equation

qjJit4 + 2(pjft + pj2 - qj2)t3 + 2[pj~i - (pj” - qj2)]t - qjji = 0; the

point of intersection on the ellipse is (pj cos t. qj sin t). The value of t may be found by the Newton Raphson method with the initial approximation the point where the line from (&, jjr) to the non-focal point (information (iv)) cuts the ellipse. It is possible that this point of intersection is just outside arc j ; however the difference between the correct distance and the calculated value is minimal.

Description of Implementation The curve fitting package was written in FORTRAN and implemented using the CALCOMP

graph plotting routines on an IMLAC interactive graphics terminal. It has been used (with only minor differences) on both the I.C.L. 1904s MAXIMOP system at Queen Mary College, London, and on the INTERCOM system for the C.D.C. 6400 machine at the University of London Computer Centre. In fact, with a minimum of alteration, the program may be easily transferred to any computer having the CALCOMP routines and an interactive graphics device. The package consists of four segments, the first produces the convex figure on the screen, the second displays the co-ordinate data, the third computes the “difference” between the data and the shape, and the fourth finds the “best” solution.

Segment 1 The program initially requests the length of the triangle base a (in inches) which is drawn horizontally, and the horizontal and vertical distances (b, c) of the third vertex from the left hand side of the base. The triangle is placed so that its median (4(a + b), 6~) is at the centre of the screen. When a meaningful loop length is read in (i.e. it is greater than the sum of the triangle sides) the outline is drawn. It is best to start with a small value of

Page 4: On fitting certain closed convex curves to archaeological point data using an interactive graphics terminal

312 FITTING CURVES TO POINT DATA

a (4 inch) to see how much of the screen is filled, and then change the value to optimize the use of the screen.

Segment 2 The co-ordinate data are presented to the program in two distinct sets; the first set (mode 1) consists of the special point data to which the convex curve is fitted and the second (mode 2) is of the co-ordinates which demonstrate the fact that survey data are in the main not point data but are of finite dimension (in the case of stone circles these points are the “corners” of the stones). The two modes may be drawn separately or together to form a hybrid data set (mode 3); the mode 1 data must always be input even if it is not used, the mode 2 data need not be input if displays of modes 2 or 3 are not required.

The second frame (containing the point data) may be altered in scale and/or rotated about a frame origin which may itself be moved relative to the frame 1 origin (frame 1 contains the convex figure). In order to minimize the spatial misinterpretation of the rotation, the frame 2 origin is taken to be the centre of gravity

; 5, ; yi j=l n j=l n

of the mode 1 data [(Xi, yJ Ii = I, n]. As an aid to future orientation of this frame, two arms each an inch long are drawn

coincident at the origin. One arm is horizontal to the right of the origin, the second is at the angle of rotation to the first (measured anticlockwise). Once the four parameters have been initialized it is possible to re-enter this segment, specifying only a subset of the parameters, the remaining ones retaining their previous values.

Segment 3 When the two frames have been superimposed and if mode 1 or 3 data are chosen, the third segment is entered on request, and the differences between the point data and the closed curve are calculated and the root mean square of these “errors” is placed on the screen. Obviously this calculation is impossible if mode 2 data are used.

Segment 4 If satisfied that a reasonable fit has been achieved, the operator may enter the final segment which uses the Powell algorithm to find the best fit. Two ways of using this algorithm have been implemented. The first (PI) keeps the ratios b/a, c/a and r/a fixed at the simple fractional values initially specified by the operator and only varies the origin, scale and rotation parameters. The second (P2) allows all seven parameters to vary. In either case the “best” R.M.S. value produced is scaled back to the dimension of the original site and this value printed underneath the best fit which is displayed on the screen.

During execution of the program it is possible to enter each of the first three segments independently of the others. At each decision point, whether concerning the entry of a segment or movement within a segment, relevant questions are placed on the screen and the operator must respond with a 0 or a 1. For efficiency the most likely branch is that specified by the 0, since only the send-button need be depressed.

Examples To demonstrate this technique three sites were examined; a North arrow (if the data were available) and scale were also drawn alongside the “best” fits discovered. (i) The first example is the stone ring at Kenmare, County Kerry, Eire (see Figure 2).

The fits were made to the approximate centres of the stones (marked with a “+“);

Page 5: On fitting certain closed convex curves to archaeological point data using an interactive graphics terminal

I. 0. ANGELL 313

a straightedge drawing of the stones is also printed if the data are of mode 3. The results of the two approaches (Pl and P2) are: Pl : b/a = 4, c/a = 1, r/a = 39; R.M.S. of errors = 21 cm P2 : b/a = 0.42, c/a = 1.10, r/a = 3.65; R.M.S. of errors = 13 cm

(ii) Figure 3 is the Pl fit for Cappanaboul, County Cork. Results: Pl : b/a = +, c/a = 1, r/a = 3;; R.M.S. of errors = 11 cm P2 : b/a = 0.46, c/a = 1.02, r/a = 3.53 ; R.M.S. of errors = 10 cm.

(iii) Figure 4 shows the cross section of the Iron Age Broth at Torwood, Stirlingshire (mode 1 data). The outline is obviously non-symmetrical and hence the fit produced necessitated the use of a non-isosceles triangle. Results: Pl : b/a = &c/a = l,r/a = 34; R.M.S. of errors = 8 cm P2 : b/a = 0.31, c/a = O-98, r/a = 3.52; R.M.S. of errors = 6 cm.

The data for (i) and (ii) were supplied by John Barber and for (iii) by Euan Mackie and Ian Cameron.

Conclusion In recent years there has been much controversy regarding megalithic monuments and many methods have been proposed for their construction. The process of fitting the shapes formed by these methods has up to now been highly subjective; this article describes the first attempt to computerize the procedure. The package has proved very successful, in fact a relatively inexperienced operator can get a “reasonable” fit for a given site in about five minutes before letting the Powell algorithm get a “best” fit in a small number of iterations; in total the process will take about fifteen minutes (real time). What is most impressive about this technique is that it is possible to quantify each proposed fit, and although not totally objective it does mean that many more varied shapes can be tried and compared with one another. Hopefully this will lead to a definition of accept- ability for a fit, and when the other methods proposed for stone ring construction have been similarly automated, it will be possible to compare numerically the relative merits of each.

References Angel& I. 0. (1976). Stone circles: megalithic mathematics or neolithic nonsense.

Mathematical Gazette 60, 189-193. Powell, M. J. D. (1964). An efficient method for finding the minimum of a function of

several variables without calculating derivatives. The Computer Journal 7, 155-162. Thorn, A. (1967). Megalithic Sites in Britain. Oxford: Clarendon Press.