Need help with Python-Raytracer?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

rafael-fuente
304 Stars 26 Forks BSD 3-Clause "New" or "Revised" License 109 Commits 0 Opened issues

Description

A basic Ray Tracer that exploits numpy arrays and functions to work fast.

Services available

!
?

Need anything else?

Contributors list

# 517,707
C++
CSS
Vim
raytrac...
1 commit

Python-Fast-Raytracer

A basic Ray Tracer that exploits numpy arrays and functions to work fast. The code is written keeping as much readability as possible.

animation

  • [x] Refraction
  • [x] Thin film interference
  • [x] Textures
  • [x] Monte Carlo Ray Tracing with importance sampling
  • [ ] Relativistic optical effects

Installation

Just clone or download this repo. You'll need to install two packages.

  1. Pillow is a fork of the PIL package. It provides the Image module for this application. to install it run the following.
    pip install pillow
    
  2. Numpy is a scientific package that helps with mathematical functions.
    pip install numpy
    

Examples

See the examples to see how to render the following images:

python example1.py

N|Solid

python example2.py

N|Solid

python example3.py

N|Solid

python example4.py

N|Solid

python example_cornell_box.py

N|Solid

Some animations: https://www.youtube.com/watch?v=vt9vAcZQT4A

A basic version of this raytracer can be found here: https://github.com/jamesbowman/raytrace

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.