static BufferedImage pointsToImage(Iterable points) { var pointsList = asList(points); if (empty(pointsList)) ret whiteImage(1); Rect bounds = boundsOfPts(pointsList); var img = whiteImage(bounds.w+2, bounds.h+2); for ping (p : pointsList) setPixel(img, p.x-bounds.x+1, p.y-bounds.y+1, Color.black); ret img; }