Giter VIP home page Giter VIP logo

tbolwerk / haskell-raytracer-challenge Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 38.13 MB

This project is a challenge based on the book The raytracer challenge of Jamis Buck. Its entirely written in Haskell too make it even more challenging. It combines functional programming with lineair algebra learned as part of my pre-master.

License: BSD 3-Clause "New" or "Revised" License

Haskell 99.62% Makefile 0.38%
haskell-learning haskell raytracer raytracerchallange

haskell-raytracer-challenge's Introduction

RayTracer

Build Status

This project is a challenge based on the book The raytracer challenge of Jamis Buck. Its entirely written in Haskell too make it even more challenging. It combines functional programming with lineair algebra learned as part of my pre-master.

Prerequisite

https://www.haskell.org/downloads/

  • ghci 8.10 >=
  • cabal 2.0 >=

How to run:

cabal new-repl

Chapter 1

ghci> :l app/Chapter1

  • enter velocity of projectile (for example use 11.5)

ghci> 11.5

ghci> :main

Chapter 4

ghci> :l app/Chapter4

ghci> :main

Chapter 5

ghci> :l app/Chapter5

ghci> :main

Chapter 6

  • note this is gonna take some time.

ghci> :l app/Chapter6

ghci> :main

How to test:

cabal test

Run tests with coverage

cabal configure --enable-coverage

Configure with benchmarks

cabal configure --enable-benchmarks && cabal build && cabal bench

Run benchmarks

cabal new-bench

cabal bench --benchmark-option --output=bench.html

rm Main.tix && cabal bench --benchmark-option --output=bench.html

Static code analysis

Use stan for static code analysis

https://github.com/kowainik/stan

stan report

Profiling

install profiteur for tree view

https://github.com/jaspervdj/profiteur

cabal configure --enable-profiling

cabal build

in build directory find Raytracer-exe

execute

./RayTracer.exe +RTS -p -RTS

open in browser: Raytracer-exe.prof.html

Easy setup

cabal configure --enable-library-profiling --enable-executable-profiling --enable-tests --enable-benchmarks --enable-coverage --enable-library-coverage --enable-profiling

haskell-raytracer-challenge's People

Contributors

tpnbolwerk avatar

Stargazers

Twan Bolwerk avatar

Watchers

Twan Bolwerk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.