(48) Shoelace Method For Determining A Polygon's Area
07-14-2018, 03:12 AM
Post: #1
 gerry_in_polo Junior Member Posts: 19 Joined: Feb 2016
(48) Shoelace Method For Determining A Polygon's Area
Shoelace Method for determining the area enclosed by any polygon. Enter the (X,Y) coordinates of the N polygon corners in a 2xN matrix and run the program. Example enter the following matrix of (X,Y) coordinates:

[[2 5]
[7 10]
[12 20]
[8 12]
[4 3]]

The polygon area calculated by the program is 10.5

Attached File(s)
Shoelace Program (HP-48, Gerardo V Lozada.pdf (Size: 43.15 KB / Downloads: 17)
07-14-2018, 09:39 AM
Post: #2
 Thomas Klemm Senior Member Posts: 1,447 Joined: Dec 2013
RE: (48) Shoelace Method For Determining A Polygon's Area
This program works as well for the HP-48:

Code:
\<<   DUP HEAD +   2 \<< CROSS \>> DOSUBS   \GSLIST ABS 2 / \>>

However the pair of coordinates are expected in a list.

Example:
{
[ 2 5 ]
[ 7 10 ]
[ 12 20 ]
[ 8 12 ]
[ 4 3 ]
}

Area = 10.5
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)