aboutsummaryrefslogtreecommitdiff
path: root/main.go
blob: f8245a4921e8732e67fc6c33285be5680ba59d7a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

package main

const HEIGHT = 100
const WIDTH = 200

func main() {
	frame := Frame{}
	for x := 0; x < HEIGHT; x++ {
		for y := 0; y < WIDTH; y++ {
			frame[HEIGHT-1-x][y] = Pixel{
				r: 255 * y / WIDTH,
				g: 255 * x / HEIGHT,
				b: 255 * 0.2,
			}
		}
	}
	frame.Save("img.ppm")
}