(49g 50g) Shoelace algorithm
|
08-24-2018, 03:56 AM
Post: #5
|
|||
|
|||
RE: ( HP49/50) Shoelace algorithm
Alternatively we can use
\(A=\frac{1}{2}\sum_{i=1}^{n}x_{i}(y_{i+1}-y_{i-1})\) where \(y_{n+1}=y_{1}\) and \(y_{0}=y_{n}\). (xs ys -- area) Code: « DUP TAIL OVER HEAD + SWAP The coordinates of the polygon have to be entered as two separate lists xs and ys. There might be better ways to rotate the elements of ys left and right. Kind regards Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)