polygon(L)
All the points must be of the same class, either Point2D or Point3D.
i1 : L={point(2.1, 3.),point(.4, 4.6),point(3.1,5.)} o1 = {Point2D{2, 3}, Point2D{0, 5}, Point2D{3, 5}} o1 : List
i2 : polygon(L) o2 = Polygon2D{Point2D{2, 3}, Point2D{0, 5}, Point2D{3, 5}} o2 : Polygon2D