use std::path::Path; use maths::vec3::Colour; use ppm::PPM; fn main() { let mut ppm = PPM::new(10000, 10000).unwrap(); for width in 0..ppm.width { for height in 0..ppm.height { let r = height as f64 / (ppm.height - 1) as f64; let g = width as f64 / (ppm.width - 1) as f64; let b = 0.25; ppm.buffer.push(Colour::new(r, g, b)); } } ppm.write_to_file(Path::new("/tmp/rainbow_big.ppm")) .unwrap(); }