RosettaCodeData/Task/Draw-a-sphere/Pluto/draw-a-sphere.pluto
2026-04-30 12:34:36 -04:00

8 lines
257 B
Text

require "bitmap"
local bmp = bitmap.of(400, 400, color.white, "Draw a sphere")
for n = 1, 100 do
local clr = bitmap.rgbColor(2 * n, 2 * n, 2 * n)
bmp:circle(math.round(150-2 * n / 3) + 50, math.round(150 - n / 2) + 50, 150 - n, clr)
end
bmp:view()