THE SHOELACE ALGORITHM IN ENGINEERING: PYTHON APPLICATIONS FOR AREA AND INERTIAL ANALYSIS
Abstract
The Shoelace Method is a classic mathematical formula for the determination of the area of polygons. This method is based on the vertex coordinates of a polygon and has significant applications in science and engineering. This article explores the method's extension to calculate the centroids and moments of inertia of plane shapes, which is essential for structural and mechanical analysis. By executing these calculations in Python programming, the study shows the method's practicality and flexibility for modern engineering tasks. The article introduces a Python-based structure using libraries like NumPy, Shapely, and Matplotlib for enabling efficient computational modelling and visualization. Through example problems, the versatility of the Shoelace Method in solving real-world engineering shapes is showcased.
Downloads
References
V.A. Windarni, A. Setiawan, A. Rahmatalia, COMPARISON OF THE KARNEY POLYGON METHOD AND THE SHOELACE METHOD FOR CALCULATING AREA, MATRIK J. Manajemen, Tek. Inform. Dan Rekayasa Komput. 23 (2023) 39–52. https://doi.org/10.30812/matrik.v23i1.2929.
A. Setiawan, E. Sediyono, CALCULATION OF CENTRAL JAVA PROVINCE REGION AREA USING SHOELACE FORMULA BASED ON THE GADM DATABASE, BAREKENG J. Ilmu Mat. Dan Terap. June 16 (2022) 597–606. https://doi.org/10.1063/5.0103178.
Y. Lee, W. Lim, Shoelace Formula: CONNECTING THE AREA OF A POLYGON AND THE VECTOR CROSS PRODUCT, Math. Teach. 110 (2017) 631–636. https://doi.org/10.5951/mathteacher.110.8.0631.
J. Gechlik, S. High, GAUSS ’ S AREA FORMULA FOR IRREGULAR SHAPES, (2024) 12–29.
B. Braden, The Surveyor’s Area Formula, Coll. Math. J. 17 (1986) 326–337. https://doi.org/10.1080/07468342.1986.11972974.
B.G. Ryder, M. Lou Soffa, M. Burnett, THE IMPACT OF SOFTWARE ENGINEERING RESEARCH ON MODERN PROGAMMING LANGUAGES, ACM Trans. Softw. Eng. Methodol. 14 (2005) 431–477. https://doi.org/10.1145/1101815.1101818.
P. Dumka, R. Chauhan, D.R. Mishra, F. Shaik, P. Govindaraj, A. Kumar, C. Sonawane, V.I. Velkin, DEVELOPMENT AND IMPLEMENTATION OF A PYTHON FUNCTIONS FOR AUTOMATED CHEMICAL REACTION BALANCING, Indones. J. Electr. Eng. Comput. Sci. 34 (2024) 1557–1565. https://doi.org/10.11591/ijeecs.v34.i3.pp1557-1565.
J. Ranjani, A. Sheela, K. Pandi Meena, COMBINATION OF NUMPY, SCIPY AND MATPLOTLIB/PYLAB-A GOOD ALTERNATIVE METHODOLOGY TO MATLAB-A COMPARATIVE ANALYSIS, in: Proc. 1st Int. Conf. Innov. Inf. Commun. Technol. ICIICT 2019, 2019: pp. 1–5. https://doi.org/10.1109/ICIICT1.2019.8741475.
S. Van Der Walt, S.C. Colbert, G. Varoquaux, The NumPy array: A STRUCTURE FOR EFFICIENT NUMERICAL COMPUTATION, Comput. Sci. Eng. 13 (2011) 22–30. https://doi.org/10.1109/MCSE.2011.37.
P. Dumka, R. Chauhan, A. Singh, G. Singh, D. Mishra, IMPLEMENTATION OF BUCKINGHAM ’ S PI THEOREM USING PYTHON, Adv. Eng. Softw. 173 (2022) 103232. https://doi.org/10.1016/j.advengsoft.2022.103232.
P. Mishra, P. Tewari, R. Mishra, Dhananjay, P. Dumka, INTEGRATION BASED ON MONTE CARLO SIMULATION, Int. J. Math. Sci. Comput. 9 (2023) 58–65. https://doi.org/10.5815/ijmsc.2023.03.05.
P. Mishra, P. Tewari, D.R. Mishra, P. Dumka, NUMERICAL MODELLING OF DOUBLE INTEGRATION WITH DIFFERENT DATA SPACING : A PYTHON-BASED APPROACH, 4 (2023) 46–54. https://doi.org/10.30511/MCS.2023.1990951.1115.
A. Meurer, C.P. Smith, M. Paprocki, O. Čertík, S.B. Kirpichev, M. Rocklin, Am.T. Kumar, S. Ivanov, J.K. Moore, S. Singh, T. Rathnayake, S. Vig, B.E. Granger, R.P. Muller, F. Bonazzi, H. Gupta, S. Vats, F. Johansson, F. Pedregosa, M.J. Curry, A.R. Terrel, Š. Roučka, A. Saboo, I. Fernando, S. Kulal, R. Cimrman, A. Scopatz, SymPy: SYMBOLIC COMPUTING IN PYTHON, PeerJ Comput. Sci. 2017 (2017) 1–27. https://doi.org/10.7717/peerj-cs.103.
M. Cywiak, D. Cywiak, SymPy, in: MULTI-PLATFORM GRAPH. PROGRAM. WITH KIVY BASIC ANAL. PROGRAM. 2D, 3D, Stereosc. Des., Apress, Berkeley, CA, 2021: pp. 173–190. https://doi.org/10.1007/978-1-4842-7113-1_11.
P. Dumka, P.S. Pawar, A. Sauda, G. Shukla, D.R. Mishra, APPLICATION OF HE’S HOMOTOPY AND PERTURBATION METHOD TO SOLVE HEAT TRANSFER EQUATIONS: A PYTHON APPROACH, Adv. Eng. Softw. 170 (2022) 103160. https://doi.org/10.1016/j.advengsoft.2022.103160.
V. Porcu, Matplotlib, in: PYTHON DATA MIN. Quick Syntax Ref., Apress, Berkeley, CA, 2018: pp. 201–234. https://doi.org/10.1007/978-1-4842-4113-4_10.
S. Gillies, THE SHAPELY USER MANUAL, URL Https//Pypi. Org/Project/Shapely (2013).
Y.C. Huei, BENEFITS AND INTRODUCTION TO PYTHON PROGRAMMING FOR FRESHMORE STUDENTS USING INEXPENSIVE ROBOTS, in: Proc. IEEE Int. Conf. Teaching, Assess. Learn. Eng. Learn. Futur. Now, TALE 2014, 2015: pp. 12–17. https://doi.org/10.1109/TALE.2014.7062611.
C. Liu, X. Sun, Z. Li, J. Cui, CALCULATION OF SHIP FLOATING STATE BY QUASI-NEWTON ITERATION METHOD FOR ONBOARD LOADING COMPUTER, Ships Offshore Struct. (2024) 1–10. https://doi.org/10.1080/17445302.2024.2335438.
S.P. Timoshenko, D.H. Young, ENGINEERING MECHANICS: statics, 1937.
E.E. Gdoutos, NUMERICAL METHODS, Courier Corporation, 2020. https://doi.org/10.1007/978-3-030-35098-7_16.
Copyright (c) 2025 Pankaj Dumka, Dhananjay R. Mishra

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this Journal agree to the following terms:
- Author retain copyright and grant the journal right of first publication with the work simultaneously licensed under a creative commons attribution license that allow others to share the work within an acknowledgement of the work’s authorship and initial publication of this journal.
- Authors are able to enter into separate, additional contractual arrangement for the non-exclusive distribution of the journal’s published version of the work (e.g. acknowledgement of its initial publication in this journal).
- Authors are permitted and encouraged to post their work online (e.g. in institutional repositories or on their websites) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published works.