minor fixes

This commit is contained in:
Florian Stecker
2021-10-04 20:12:47 -05:00
parent dd940f8f35
commit 5211a60266
3 changed files with 6 additions and 10 deletions

View File

@@ -9,6 +9,6 @@ col = map (\(r,g,b) -> (round $ r*255, round $ g*255, round $ b*255)) colors ::
main = do
foo <- readFile "max_slopes_billiard"
let dat = map (read.(!!2).words) $ lines foo :: [Int]
writeFile "max_slope_billiards.pnm" $ header ++ unlines [printf "%d %d %d" r g b | p <- dat, let (r,g,b) = col !! (p `mod` 10)]
writeFile "max_slope_billiards.pnm" $ header ++ unlines [printf "%d %d %d" r g b | p <- dat, let (r,g,b) = col !! (p `mod` 14)]
where
header = "P3\n300\n123\n255\n"