I’m wanting to calculate the area of a shape students create on a virtual geoboard given a set number of “rubber bands”-- segments. I’ve been noodling around with trying to figure out how to implement Pic’s formula or the Shoelace formula.

In terms of the Shoelace formula I am stuck on order the points as clockwise. I have the location as a function of the angle from the origin to the point (polar), but can’t figure out how to sort the list. Haven’t gotten further than that.

Ideas?

Resources I have found so far:

https://en.wikipedia.org/wiki/Shoelace_formula#:~:text=The%20shoelace%20formula%20or%20shoelace,Cartesian%20coordinates%20in%20the%20plane.&text=It%20has%20applications%20in%20surveying%20and%20forestry%2C%20among%20other%20areas.