Skip to content

Commit

Permalink
Tidy up file names
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagolizardo committed Dec 20, 2024
1 parent a0bea90 commit 0133a16
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

![Fractal](out.png "Fractal")
![Mandelbrot fractal](mandelbrot.png "Fractal")

Requires

Expand All @@ -8,9 +7,9 @@ Requires

### How to run

```sh
$ cabal install JuicyPixels
$ ghc main.hs
$ ./main
```shell
cabal update
cabal install --lib JuicyPixels
ghc -Wall -Werror main.hs
./main
```

File renamed without changes.
File renamed without changes
Binary file added mandelbrot2pgm
Binary file not shown.
2 changes: 1 addition & 1 deletion pgm.hs → mandelbrot2pgm.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ frac c z iter
-- The file output
pgmHeader :: C.ByteString
pgmHeader = C.pack ("P5\n" ++ (show width) ++ " " ++ (show height) ++ "\n255\n")
main = C.writeFile "fractal.pgm" (C.append pgmHeader (C.concat [(row y) | y <- yList]))
main = C.writeFile "mandelbrot.pgm" (C.append pgmHeader (C.concat [(row y) | y <- yList]))
Binary file added mandelbrot2png
Binary file not shown.
2 changes: 1 addition & 1 deletion main.hs → mandelbrot2png.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ render xi yi = grayify . realize $ fractal (x :+ y) (0 :+ 0) 0
sharpen v = 1 - exp (-exp ((v - 0.92) / 0.031))

main :: IO ()
main = writePng "out.png" $ generateImage render width height
main = writePng "mandelbrot.png" $ generateImage render width height

0 comments on commit 0133a16

Please sign in to comment.