Hey guys,
Haven't been posting for a while, hopefully you're doin alright in 2021.
Given a point list (closed one) -
((19.1947 9.72373) (24.7985 9.19778) (28.0063 11.2198) (30.008 9.06602) (30.4813 4.20126)
(26.3245 6.77841) (23.8251 2.83379) (21.0363 4.8061) (17.2611 5.1875) (14.3538 10.5915)) ; example given list
which could be represend by a closed LWpolyline with straight segments
(although we don't actually have any ACAD geometry to work with, but rather whatever closed shape).
The questions are:
• How we could get the area via math?
(getPointListArea <PointList>); returns the area
• On a given base-point / say the shape's centroid or points-bbox centroid or '(0 0 0) / whatever-point
and on a given area as an input,
How we could translate these points in order to match the original shape and the desired area? (math)
/sounds like offset, but its actually scale/
(SetPointListArea <PointList> <BasePoint> <DesiredArea>); returns the translated PointList coordinates
Like imagine this LWpolyline with the certain area, where its scaled by reference by its area so it results for instance 10% larger or smaller.
But like I said we don't deal with such, its just math. (although for testing result purposes its allowed to entmake a lwpoly)
BTW I don't expect much answers so I consider it as a challenge.