IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 87 ITERATIVE SPATIAL SECTORING: AN EXTENTION OF SIMPSON’S RULE FOR DETERMINING AREA OF IRREGULAR CLOSED SHAPE ABDULFATTAH A. ABOABA1,2, SHIHAB A. HAMEED1, OTHMAN O. KHALIFA1 AND AISHA H. ABDALLA1 1Department of Electrical & Computer Engineering, Faculty of Engineering, International Islamic University Malaysia, Jalan Gombak, 53100 Kuala Lumpur, Malaysia. 2Computer Engineering Department, University of Maiduguri, Nigeria. abdulfattahaa@gmail.com; shihab@iium.edu.my; khalifa@iium.edu.my; aisha@iium.edu.my ABSTRACT: Just as the method for determining the properties of shapes like triangles, parallelogram, cuboids, and geometric figures like circle, and spheres have standard formulae, the determination of a function F(x) in many dimensions have formulae or standard methods. Complex 2D and 3D figures consisting of intricate merger of regular shapes have had their parameters determined through careful separation and determination of the properties of individual components that make up the figure. Moreover, the case of irregular closed shapes mostly but not limited to 2D and 3D which abound in science and engineering have equally received attention resulting in lots of approximation methods evolved over time. The iterative spatial sectoring is a novel way of determining the area of 2D irregular closed shapes by expanding on the famous Simpson’s method for finding the area of a function F(x) whose definite integral is either tedious or impossible by standard approaches. ABSTRAK: Seperti beberapa kaedah yang ada yang sering kali digunakan untuk menentukan sifat-sifat bentuk seperti segi tiga, segi empat selari, kuboid, dan rajah geometrik seperti bulatan, dan sfera; semuanya mempunyai formula-formula yang standard, penentuan fungsi F(x). Bentuk kompleks dua dimensi, 2D dan tiga dimensi, 3D terdiri daripada penyatuan rumit bentuk-bentuk yang biasa dimana parameternya ditentukan melalui pengasingan yang cermat dan penentuan ciri-ciri komponen individu yang akhirnya membentukkannya. Walaupun begitu, dalam hal bentuk tertutup yang tak nalar, ia bukan hanya terhad kepada bentuk 2D dan 3D yang banyak terdapat dalam bidang sains dan kejuruteraan. Ia mendapat perhatian meluas dimana pelbagai kaedah penghampiran dihasilkan. Pensektoran ruang berlelar merupakan cara baru yang digunakan untuk menentukan keluasan bentuk 2D tak nalar yang bertutup dengan mengembangkan kaedah Simpson’s untuk mendapatkan keluasan dengan fungsi F(x) dimana kamirannya sama ada terlalu rumit ataupun di anggap mustahil mengikut cara biasa. KEYWORDS: function F(x); irregular shape; Simpson’s method; definite integral; iterative spatial sectoring 1. INTRODUCTION Irregular 2D and 3D figures consisting of intricate merger of regular shapes have had their parameters determined through careful separation and determination of the properties of individual components that make up the figure [1-3]. Moreover, the case of irregular IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 88 closed shapes mostly but not limited to 2D and 3D which abound in science and engineering like that of Fig. 1 have equally received attention resulting in lots of approximation methods evolved over time. Such methods include the graphical methods of calculating the area of irregular shaped lands usually employed by Surveyors, Civil and Agricultural Engineers, and also used in biometric measurements [4]. Furthermore, the advent of computer programming brought the emergence of computer-based approximation methods like fractal analysis [5], Monte Carlo method, pixel-filling, wavelet, and so on. Just as the method for determining the properties of shapes like triangles, parallelogram, cuboids, and geometric figures like circle, and spheres have standard formulae, the determination of a function F(x) in many dimensions have formulae or standard methods. One of such is the series expansion for function F(x) which does not fit into direct integration as in eqn. 1 or use of Simpson’s Rule where the use of series expansion becomes tedious, the like of which is in eqn. 2. Again, we see that for finding areas under a curve which has a non-existence function/ impossible function/ difficult-to- get function like the one in Fig. 2, the method of finding area bounded by a curve in integral calculus application could be use with minimal error [6-9]. Fig. 1: An example of irregular shape. = … (1) = √cos … (2) Fig. 2: Undefined function. IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 89 The iterative partial sectoring (IPS) is an idea conceived to evolve yet another approximate method of finding the area of irregular closed shapes of the type in Fig. 1 neither from the computer programming perspective nor by integrating an approximate function that describes the curve, but from the classical mathematics standpoint. Hence, the IPS methodology follows from approximate integral and integral application methods of solving area bounded by functions difficult to express mathematically or shapes whose function is either non-existent. We therefore reasoned that since the areas those complex curves could be evaluated using those approaches, the area of irregular closed shape could also be found by careful extension of those methods especially Simpson’s rule. 2. UNDERSTANDING THE SIMPSON’S RULE OF APPROXIMATE INTEGRATION Suppose we have a curve of the type in Fig. 2, and assuming that its function F(x) is either non-existent or not solvable by any know integral approach, or tedious to expand by power series approach, the next logical approach in classical mathematics is the Simpson’s rule. The rule says divide the area of interest into even number of spaces with equal spacing, that gives odd number of dividing lines and apply eqn. 3 to get an approximate area bounded by the curve. More so, the approximate area could be closer to reality b y further division of the region of interest into smaller areas as usually done in integral application. Fig. 3: Applying Simpson’s Rule. ≈ [( + ) + 4 + 2 ] … (3) Fig. 4: Analyzing Simpson’s Rule. IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 90 The Simpson’s rule conceived by finding the area of the rectangle ABCD bounded by two parallel but unequal length stripes AD and BC as shown in Fig. 4. Since the two parallel sides of a rectangle must be equal, thus find the area of ABCD using the formula for rectangle will only give an approximate value whose error may be unacceptable. Hence, the Simpson’s formula of eqn. 3 is in effect finding the area of ABCD twice such that each time one of the parallel sides (length) is used and the average of the two give a better approximation. That is: ≈ [( ∗ ) + ( ∗ )] 2 … (4) or ≈ … (5) Fig. 5: Analyzing Figure Based on Integral Application. When eqn. 5 is applied to all divisions under the curve it could be summed up as eqn. 3, and that greatly reduces the initial error margin as represented by AefB when length AD is used to something around half of that. Furthermore, if we combine this with the idea of making s more and more smaller, when approaches zero as depicted in Fig. 6, the error in our approximation also approaches zero. Hence the area gotten at that stage becomes less of approximation but actual value. Hence, the combination of the two methods to evolve a better result could named “Iterative Simpson’s Method”. Fig. 6: Error Reduction Approach. When the problem is extended to irregular closed shape instead of just a curve, we foresee that the combination of these two concepts (“Iterative Simpson’s Method”) and their reformulation in geometric terms will offer an intriguing result. IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 91 3. PROOF OF CONCEPT l Given that a function f(x) is A sin x represented diagrammatically in Fig. 7 and inserted into a Cartesian plane shown in Fig. 8a and 8b, the area under this shape is found by integrating the function and inserting the limits. Fig. 7: A sine function. Fig. 8a: Sine wave in Cartesian plane on the x-axis. Fig. 8b: Sine wave in Cartesian plane Elevated. The solution to Fig. 8a is the integration of f(x) and substituting the limit marked on the x-axis with A being the amplitude or magnitude of the wave on the y-axis, while the solution to Fig. 8b is the same as that of Fig. 8a but with the addition of area of the rectangle under the curve. That is, = = ( [ ] – [ ] ) + … (6) = = ( [ ] – [ ] ) + (4 − 1) + … (7) 0 1 2 3 4 5 0 1 2 3 4 5 IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 92 where A is the amplitude of the sine wave, B is the upward projection of the sine wave in Fig. 4b, and C is the constant of integration. A good approximation of this result could be obtained by determining the area under the sine wave by combining the method of approximate integral and integral application. This is done by dividing the space under consideration into equally spaced subdivisions, and then, find the sum of the area of each of the subdivisions. That is the area of (A + B + C + D + E + F + G + H + I). Given that each of the area of A to I as where is from 1 to 9 representing each of the subdivision, thence, y could be expressed as: ≈ … (8) This approximate solution could be improved upon by further reduction in the width (interspaces) between the red stripes as in figure 9thereby reducing the size of the rectangles formed. Conversely, more accurate result could also be achieved by calculating the area of each rectangle twice using one the two lengths (vertical stripes) at a time and then find the average of the two areas. This is exactly what Simpson [6-9] formularized as: ≈ [( + ) + 4 + 2 ] … (9) Both approaches would be exploited as this work progresses. Fig. 9: A section of the sine wave divided into smaller rectangles. 4. PROOF OF CONCEPT ll Furthermore, if the sine wave is made into a circle as in Fig. 6a, the area bounded by the sine wave circle is the area of the inner grooves of the sine wave plus the area of the small circle enclosed by it. That is: = Acos + + … (10) where A remains the magnitude of the sine wave, B is the area of the inner circle, and C is integration constant. IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 93 Fig. 10a: Sine wave made into circle (neatly wobbled irregular shape). Fig. 10b: Figure 10a separated into Sine wave and inner circle. An approximate result could be obtained by dividing Fig. 10b into smaller sectors and summing up the area of each of the smaller sectors. Similar to what is done in integral applications, the error can be reduced to the barest minimum by making the sector further smaller. However, in taking this approach two questions need be answered that is, what is the angle of the intended sectors?, and what criterion would be used to obtain the reduction of the sectors into smaller ones?. The answer to these questions provides the basis for a quicker convergence of the solution to the problem, and more importantly adds value to this method above its predecessors – The Simpson’s rule and the method of reducing the rectangle in integral application. It is observed that we can be close to the precise angle of the sector that will result in close approximation of the area bounded by the sine wave if we can determine the angular squeezeness of the wave. For instance, if we know how close the waves are to each other relative to the biggest expanse the wave as a whole, we could have determined its squeezeness and use the relationship to determine the sector angle, such that the ratio of the average area (determined by a circle drawn around the middle of the vertical compression of the wave such as circle B in Fig. 10b) to that of the maximum expanse of the sine wave. In the absence of that we take ratio of circle A the maximum expanse of the sine wave to that of circle C the minimum space left inside it as it squeezes. IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 94 Formula for Determining Sector Angle Based on the explanation above, we can determine sector angle by multiplying the ratio of A to C by 3600, then subtract 3600 from the product, and divide the magnitude by 10. Round the answer to the nearest 100 for easy division. This is mathematically stated as: = (360°) − 360° 10 … (11) This will give sector angle relative to the squeezeness of the irregular shape, thus bringing the first sequence to be close enough to final solution such that with few iterations the solution will converge. 5. STEPS TO SOLVING REAL PROBLEM (a) Construct a circle of known radius round the shape similar to A in Fig. 10b as shown in Fig. 11 (b) Construct another circle within the shape similar to C in Fig. 10b as shown in Fig. 12 (c) Find the ratio of A to C (d) Do as in eqn. 11 (e) Draw the sectors as in Fig. 13 (f) Mark the points of intersection of the radii with the irregular shape and measure its length (g) Determine the area of each sector using eqn. 12 (h) Calculate the approximate area of the irregular shape using eqn. 13 (i) Reduce the size of the sectors (by halving if possible), and recalculate area of irregular shape using eqn. 14 (j) Look for convergence of step (h) and (i) by finding the difference between and the modulus of the difference returns zero or something very close to zero. Fig. 11: Irregular Shape Encircled by its Approximate Largest Expanse. Fig. 12: The Smallest Possible Circle Inserted into the Irregular Shape. IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 95 Fig. 13: Irregular Shape Divided into Sectors. ( ) = 360 . … (12) where is the angle derived from equation 11, and , represents the two radii of each sectors. ℎ ℎ ( ) = = = 360 . + 360 . ( ) … (13) ℎ ℎ ( ) = = ∑ = ∑ . + . … (14)( ) 6. CONCLUSION A stepwise description of a iterative spatial sectoring is presented, it is a novel method for finding area of irregular closed spaces. The technique is based on idealistic understanding of methods of finding area under curves particularly the Simpson’s rule combined with geometric way of finding area of a sector. The method is not computer based hence there is no need to compare it with computer based methods like Fractal Analysis, Pixel filling, Monte Carlos and Wavelet techniques. It also has the ability to accept error margin by setting |RTx – RTx+1| >= 0, instead of |RTx – RTx+1| = 0. Finally there are on-going efforts to develop the software for implementing this method and advance it to a computer based technique. REFERENCES [1] Kreyszing Erwin (1993). Advanced Engineering Mathematics, John Wiley & Sons, New York [2] A.J.M. Spencer, D.F. Parker, D.S. Berry, A.H. England, T.R. Faulkner, W.A. Green, J.T. Holden, D. Middleton and T.G. Rogers (1983). Engineering Mathematics Vol. 2, Van Nostrand Reinhold Com Ltd, Berkshine, New York [3] K.A. Stroud (2007). Advanced Engineering Mathematics, Palgrave Macmillan [4] http://biosystems.okstate.edu/Home/ fharry/4112/500_Information/Ch%2011.docx [5] Khan M. Iftekharuddin (2005). Techniques in Fractal Analysis and their applications in Brain MR, In Cornelius T. Leondes (Ed), Medical imaging system technology – Analysis and Computational Methods, World Scientific Publishing, Singapore. [6] K.A. Stroud (2007). Engineering Mathematics 6th Ed, Palgrave Macmillan IIUM EJ, Vol. 12, No. 5, 2011 Special Issue on Science and Ethics in Engineering. Aboaba et al. 96 [7] A.J.M. Spencer, D.F. Parker, D.S. Berry, A.H. England, T.R. Faulkner, W.A. Green, J.T. Holden, D. Middleton and T.G. Rogers (1983). Engineering Mathematics Vol. 1, Van Nostrand Reinhold Com Ltd, Berkshine, New York [8] John Berry, & Patrick Wainwri (1991). Foundation Mathematics for Engineers, Macmillan Press, Houndmills [9] K. Weltner et al. (1986). Mathematics for Engineers & Scientist 2nd Ed, Stanley Thornes, Leckhampton