(49g 50g) Shoelace algorithm
|
08-23-2018, 09:49 PM
Post: #4
|
|||
|
|||
RE: ( HP49/50) Shoelace algorithm
(08-23-2018 08:23 PM)John Keith Wrote: The SWAP is necessary for each group of coordinates because the answer depends on the order of subtraction. I thought "UNROT * UNROT *" leave only 2 values on stack. If true, "SWAP -" is the same as "-" with opposite sign. Opposite sign should not matter: 2*area = abs(sum([x1*y2 - x2*y1, x2*y3 - x3*y2, ...])) = abs(sum([x2*y1 - x1*y2, x3*y2 - x2*y3, ...])) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)