{"id":605,"date":"2017-06-16T15:56:21","date_gmt":"2017-06-16T15:56:21","guid":{"rendered":"http:\/\/box5393.temp.domains\/~quranive\/\/?p=605"},"modified":"2022-01-13T17:23:38","modified_gmt":"2022-01-13T17:23:38","slug":"quick-and-easy-way-to-calculate-the-area-of-any-polygon-the-shoelace-formula","status":"publish","type":"post","link":"https:\/\/mechanicsandmachines.com\/?p=605","title":{"rendered":"Quick and easy way to calculate the area of any polygon &#8212; the shoelace formula"},"content":{"rendered":"<p>In my spare time, I enjoy watching a number of math channels on youtube, such as <a href=\"https:\/\/www.youtube.com\/user\/numberphile\">Numberphile<\/a>, <a href=\"https:\/\/www.youtube.com\/channel\/UCs4aHmggTfFrpkPcWSaBN9g\">PBS infinite series<\/a>, &nbsp;and&nbsp;<a href=\"https:\/\/www.youtube.com\/user\/standupmaths\">standupmaths<\/a>. &nbsp;Typically, most of the videos are about number theory or prime numbers and are not very useful to a mechanical engineer. &nbsp;However, <a href=\"https:\/\/www.youtube.com\/watch?v=0KjG8Pg6LGk\">this video from mathologer<\/a>&nbsp;discusses the shoelace formula for calculating the area of a polygon, which an engineer may find useful for calculating the area of a fluid channel or a beam section (see also the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Shoelace_formula\">wikipedia entry for the shoelace formula<\/a>). &nbsp;It works for any polygon that does not intersect itself. &nbsp;It may be useful in doing quick hand calculations, and it is easily scripted into a function for a computer to calculate. &nbsp;One could also make a straight line approximation of a shape with curved lines to estimate its area.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/box5393.temp.domains\/~quranive\/\/wp-content\/uploads\/2017\/06\/shoelace-formula-example-polygon.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-606\" src=\"https:\/\/i0.wp.com\/box5393.temp.domains\/~quranive\/\/wp-content\/uploads\/2017\/06\/shoelace-formula-example-polygon-300x149.png?resize=449%2C223\" alt=\"\" width=\"449\" height=\"223\" srcset=\"https:\/\/i0.wp.com\/mechanicsandmachines.com\/wp-content\/uploads\/2017\/06\/shoelace-formula-example-polygon.png?resize=300%2C149&amp;ssl=1 300w, https:\/\/i0.wp.com\/mechanicsandmachines.com\/wp-content\/uploads\/2017\/06\/shoelace-formula-example-polygon.png?resize=768%2C381&amp;ssl=1 768w, https:\/\/i0.wp.com\/mechanicsandmachines.com\/wp-content\/uploads\/2017\/06\/shoelace-formula-example-polygon.png?w=828&amp;ssl=1 828w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<p>The shoelace formula gets its name from the arrangement of the coordinates and how they are combined to calculate the area. &nbsp;Arrange the&nbsp;<em>x-y<\/em> coordinates of the polygon in a <em>(n+1)x2<\/em> matrix where the order is determined by a counterclockwise pattern around the perimeter and the starting point is also repeated as the last row in the matrix.<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 231px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/mechanicsandmachines.com\/wp-content\/ql-cache\/quicklatex.com-03003c4aeb77028eb900213b12f59bdc_l3.png?resize=168%2C231&#038;ssl=1\" height=\"231\" width=\"168\" class=\"ql-img-displayed-equation \" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#120;&#95;&#49;&#32;&#38;&#32;&#38;&#32;&#38;&#32;&#121;&#95;&#49;&#32;&#92;&#92; &#38;&#32;&#43;&#92;&#115;&#101;&#97;&#114;&#114;&#111;&#119;&#32;&#38;&#32;&#45;&#92;&#115;&#119;&#97;&#114;&#114;&#111;&#119;&#32;&#92;&#92; &#120;&#95;&#50;&#32;&#38;&#32;&#38;&#32;&#38;&#32;&#121;&#95;&#50;&#32;&#92;&#92; &#38;&#32;&#43;&#92;&#115;&#101;&#97;&#114;&#114;&#111;&#119;&#32;&#38;&#32;&#45;&#92;&#115;&#119;&#97;&#114;&#114;&#111;&#119;&#32;&#92;&#92; &#120;&#95;&#51;&#32;&#38;&#32;&#38;&#32;&#38;&#32;&#121;&#95;&#51;&#32;&#92;&#92; &#38;&#32;&#43;&#92;&#115;&#101;&#97;&#114;&#114;&#111;&#119;&#32;&#38;&#32;&#45;&#92;&#115;&#119;&#97;&#114;&#114;&#111;&#119;&#32;&#92;&#92; &#92;&#100;&#111;&#116;&#115;&#32;&#38;&#32;&#38;&#32;&#38;&#32;&#92;&#100;&#111;&#116;&#115;&#32;&#32;&#92;&#92; &#38;&#32;&#43;&#92;&#115;&#101;&#97;&#114;&#114;&#111;&#119;&#32;&#38;&#32;&#45;&#92;&#115;&#119;&#97;&#114;&#114;&#111;&#119;&#32;&#92;&#92; &#120;&#95;&#110;&#32;&#38;&#32;&#38;&#32;&#38;&#32;&#121;&#95;&#110;&#32;&#92;&#92; &#38;&#32;&#43;&#92;&#115;&#101;&#97;&#114;&#114;&#111;&#119;&#32;&#38;&#32;&#45;&#92;&#115;&#119;&#97;&#114;&#114;&#111;&#119;&#32;&#92;&#92; &#120;&#95;&#49;&#32;&#38;&#32;&#38;&#32;&#38;&#32;&#121;&#95;&#49; &#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>Again, notice that the order is counterclockwise and that the first point is repeated in the last line of the matrix (there are <em>n+1<\/em> rows if the polygon has&nbsp;<em>n<\/em> points).<\/p>\n<p>To calculate the area, we add when multiplying down and to the right and subtract pairs when multiplying down and to the left. &nbsp;That is<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 55px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/mechanicsandmachines.com\/wp-content\/ql-cache\/quicklatex.com-3e3d94eef7b3194d99f2e71e9903b55b_l3.png?resize=224%2C55&#038;ssl=1\" height=\"55\" width=\"224\" class=\"ql-img-displayed-equation \" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#65;&#61;&#32;&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#120;&#95;&#49;&#32;&#121;&#95;&#50;&#32;&#43;&#32;&#120;&#95;&#50;&#32;&#121;&#95;&#51;&#32;&#43;&#32;&#92;&#100;&#111;&#116;&#115;&#32;&#43;&#120;&#95;&#110;&#32;&#121;&#95;&#49;&#32;&#92;&#92;&#32;&#92;&#92; &#45;&#32;&#121;&#95;&#49;&#32;&#120;&#95;&#50;&#32;&#45;&#32;&#121;&#95;&#50;&#32;&#120;&#95;&#51;&#32;&#45;&#32;&#92;&#100;&#111;&#116;&#115;&#32;&#45;&#32;&#121;&#95;&#49;&#32;&#120;&#95;&#49; &#92;&#101;&#110;&#100;&#123;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>In the example polygon shown above, we have<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 141px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/mechanicsandmachines.com\/wp-content\/ql-cache\/quicklatex.com-f802e53e1c772cff821b12c1de031804_l3.png?resize=69%2C141&#038;ssl=1\" height=\"141\" width=\"69\" class=\"ql-img-displayed-equation \" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#52;&#56;&#32;&#38;&#32;&#50;&#32;&#92;&#92; &#54;&#56;&#32;&#38;&#32;&#50;&#53;&#32;&#92;&#92; &#49;&#48;&#52;&#32;&#38;&#32;&#51;&#53;&#32;&#92;&#92; &#55;&#50;&#32;&#38;&#32;&#51;&#51;&#32;&#92;&#92; &#55;&#50;&#32;&#38;&#32;&#53;&#48;&#32;&#92;&#92; &#50;&#52;&#32;&#38;&#32;&#50;&#54;&#32;&#92;&#92; &#52;&#56;&#32;&#38;&#32;&#50; &#92;&#101;&#110;&#100;&#123;&#98;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>Performing the calculation, we obtain<\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 53px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/mechanicsandmachines.com\/wp-content\/ql-cache\/quicklatex.com-46730189acd030c04618e997718c2912_l3.png?resize=471%2C53&#038;ssl=1\" height=\"53\" width=\"471\" class=\"ql-img-displayed-equation \" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#65;&#61; &#92;&#98;&#101;&#103;&#105;&#110;&#123;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#52;&#56;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#50;&#53;&#32;&#43;&#32;&#54;&#56;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#51;&#53;&#32;&#43;&#49;&#48;&#52;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#51;&#51;&#32;&#43;&#55;&#50;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#53;&#48;&#32;&#43;&#55;&#50;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#50;&#54;&#32;&#43;&#50;&#52;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#50;&#32;&#92;&#92;&#32;&#92;&#92; &#45;&#50;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#54;&#56;&#32;&#45;&#50;&#53;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#48;&#52;&#32;&#45;&#51;&#53;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#55;&#50;&#32;&#45;&#51;&#51;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#55;&#50;&#32;&#45;&#53;&#48;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#50;&#52;&#32;&#45;&#50;&#54;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#52;&#56; &#92;&#101;&#110;&#100;&#123;&#109;&#97;&#116;&#114;&#105;&#120;&#125; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p class=\"ql-center-displayed-equation\" style=\"line-height: 12px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/mechanicsandmachines.com\/wp-content\/ql-cache\/quicklatex.com-2b02dffdab28e5e60d3ba5bc6ad87f6d_l3.png?resize=193%2C12&#038;ssl=1\" height=\"12\" width=\"193\" class=\"ql-img-displayed-equation \" alt=\"&#92;&#98;&#101;&#103;&#105;&#110;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125; &#65;&#32;&#61;&#32;&#49;&#50;&#53;&#51;&#50;&#45;&#49;&#48;&#48;&#56;&#48;&#32;&#61;&#32;&#50;&#52;&#53;&#50; &#92;&#101;&#110;&#100;&#123;&#101;&#113;&#117;&#97;&#116;&#105;&#111;&#110;&#42;&#125;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my spare time, I enjoy watching a number of math channels on youtube, such as Numberphile, PBS infinite series, &nbsp;and&nbsp;standupmaths. &nbsp;Typically, most of the videos are about number theory or prime numbers and are not very useful to a mechanical engineer. &nbsp;However, this video from mathologer&nbsp;discusses the shoelace formula for calculating the area of &hellip; <a href=\"https:\/\/mechanicsandmachines.com\/?p=605\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Quick and easy way to calculate the area of any polygon &#8212; the shoelace formula<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8],"tags":[48,45,47,46],"series":[],"class_list":["post-605","post","type-post","status-publish","format-standard","hentry","category-fundamentals","tag-area","tag-geometry","tag-hand-calculation","tag-shoelace-formula"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p5f9h7-9L","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=\/wp\/v2\/posts\/605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=605"}],"version-history":[{"count":30,"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions"}],"predecessor-version":[{"id":757,"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=\/wp\/v2\/posts\/605\/revisions\/757"}],"wp:attachment":[{"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=605"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/mechanicsandmachines.com\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}