about summary refs log tree commit diff stats
path: root/apps/raytracing/1.cc
blob: 254f531ceb9012a6bd9e05cfcec97763f543737e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// https://raytracing.github.io/books/RayTracingInOneWeekend.html
#include <iostream>

int main() {

    // Image

    const int image_width = 256;
    const int image_height = 256;

    // Render

    std::cout << "P3\n" << image_width << ' ' << image_height << "\n255\n";

    for (int j = image_height-1; j >= 0; --j)
        for (int i = 0; i < image_width; ++i)
            std::cout << i << ' ' << j << " 64\n";
}