The convexhull command uses the Graham scanning algorithm to find the convex hull of a set of points.
convexhull(0,1,1+i,1+2i,-1-i,1-3i,-2+i) |
|
To draw the hull, use the polygon command with the output of convexhull (see Section 26.9.3).
polygon(convexhull(0,1,1+i,1+2i,-1-i,1-3i,-2+i)) |