(15C) Area and Perimeter of irregular polygon
|
12-05-2023, 12:53 PM
Post: #2
|
|||
|
|||
RE: (15C) Area and Perimeter of irregular polygon
There's an error in the Area formula (not in the program): the first term also needs a minus sign.
If the area is all you need, you may try this small program (concocted on the fly ;-) Enter the coefficients in any matrix, recall the matrix to the stack and (GSB) A. 33 Bytes X Y Z T 001 LBL A 002 STO I 003 MATRIX 1 004uRCL (i) 005 RCL 0 dummy 006 0 007uRCL (i) 008 LBL 1 009 GSB 0 010uRCL (i) yj A xj xj 011 GTO 1 012 GSB 0 013 ABS 014 2 015 / 016 RTN 017 LBL 0 yi A xi 018 R^ xi yi A 019uRCL (i) 020 + xi+xj yi A A 021 X<>Y 022 LASTX 023 Rv yi xi+xj A xj 024 RCL- (i) 025 x 026 + 027 RTN Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(15C) Area and Perimeter of irregular polygon - Marcel - 12-04-2023, 06:17 PM
RE: (15C) Area and Perimeter of irregular polygon - Werner - 12-05-2023 12:53 PM
RE: (15C) Area and Perimeter of irregular polygon - Marcel - 12-05-2023, 01:50 PM
RE: (15C) Area and Perimeter of irregular polygon - Werner - 12-05-2023, 02:33 PM
RE: (15C) Area and Perimeter of irregular polygon - Marcel - 12-05-2023, 03:14 PM
RE: (15C) Area and Perimeter of irregular polygon - Marcel - 12-05-2023, 05:57 PM
RE: (15C) Area and Perimeter of irregular polygon - John Keith - 12-05-2023, 07:12 PM
RE: (15C) Area and Perimeter of irregular polygon - Werner - 12-06-2023, 09:47 AM
|
User(s) browsing this thread: 1 Guest(s)