Skip to content

A from scratch impelmentation of a simple ray-tracer in Haskell and C (and Python).

Notifications You must be signed in to change notification settings

adakri/Minimalist-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimalis-tracer

This is mainly for self-reference.

Preambule

This project has started as me trying to find a little insignificant yet cool project to be a little hands on with Haskell: I really liked the language but have seen that I spent most of my time (most of it on leran you a haskell) doing mostly reading and barely doing any coding. So, coming from a computer graphics/HPC background, I thought that coding some sort of minimalist ray tracer (like the one in this amazing CG course by D.Sokolov ) would be a good idea. So I satrted by implementing it in Python! Very counter-intuitive, but I needed a prototype scene to compare my output to and the easiest way was to do it in Python (using only Numpy and PIL, so not so minimaist after all). However, the impelemntation was very slow (maybe I'll look into that someday!) so I coded it in C (now using nothing! so we're going into the direction of minimalism but still no Haskell). Now that the impelemntation is pretty good and that I have a pretty good grasp of what I should do (took me long enough!), now onto Haskell!

Main aim: Use Haskell Multi-threading/GPU interfaces to accelearte the application.

Scene

alt text

Specifications for Python

You'll need PIL and Numpy:

pip install Pillow numpy

Specifications for Haskell

You'll need Juicy Pixels to run the haskell code. Here are the steps you can follow to install JuicyPixels:

cabal --version

If cabal is not installed, you can install it by following the instructions on the Haskell Platform website.

Update the package list by running the following command:

cabal update
cabal install JuicyPixels

Specification in C

In a truly minimalist approach, you only need the gcc compiler or equivalent.

About

A from scratch impelmentation of a simple ray-tracer in Haskell and C (and Python).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published