nim-mandelbrot/main.nim
joachimschmidt557 2948a9ea5d WIP
2019-03-07 14:00:15 +01:00

15 lines
294 B
Nim

import mandelbrot, colors
echo mandelbrot.generateImage(800, 600, 150'f64, 32, 570)[0][0]
import stb_image/write as stbiw
# Stuff some pixels
var data: seq[uint8] = @[]
data.add(0x00)
data.add(0x80)
data.add(0xFF)
# save it (as monochrome)
stbiw.writeBMP("three.bmp", 3, 1, stbiw.Y, data)