// f: func(int x, int y) -> bool/Color/RGB static BufferedImage renderImage(int w, int h, O f) { RGBImage rgb = new RGBImage(w, h, Color.black); for y to h: for x to w: { O o = callF(f, x, y); if (o instanceof Bool) rgb.setPixel(x, y, isTrue(o) ? Color.white : Color.black); else if (o instanceof RGB) rgb.setPixel(x, y, (RGB) o); else if (o instanceof Color) rgb.setPixel(x, y, (Color) o); else if (o != null) fail("Woot?! " + _getClass(o)); } ret rgb.getBufferedImage(); } static BufferedImage renderImage(int w, int h default w, IF2_Int f) { ret imageFromFunction(w, h, f); }