///|
/// PPM (Portable Pixmap) image output to stdout.
/// Output PPM from raw accumulated pixels (applies gamma correction internally).
pub fn write_ppm_stdout(
width~ : Int,
height~ : Int,
pixels~ : Array[Vec3],
samples_per_pixel~ : Int
) -> Unit {
println("P3")
println("\{width} \{height}")
println("255")
let scale = 1.0 / samples_per_pixel.to_double()
for j in 0.. Unit {
println("P3")
println("\{width} \{height}")
println("255")
for j in 0..