项目
在 GitHub 查看
rafael-fuente/Python-Raytracer
关于
一个利用 NumPy 数组和函数、运行速度相当快的基础光线追踪器
创作与媒体实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Python-Raytracer
A basic Ray Tracer that exploits numpy arrays and functions to work reasonably fast compared with a pure Python implementation. The code is written keeping as much readability as possible.

- Refraction
- Thin film interference
- Textures
- Monte Carlo Ray Tracing with importance sampling
Installation
Just clone or download this repo. You'll need to install two packages.
- 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
- 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

python example2.py

python example3.py

python example4.py

python example_cornell_box.py

Some animations: https://www.youtube.com/watch?v=vt9vAcZQT4A
A basic version of this raytracer can be found here: https://www.excamera.com/sphinx/article-ray.html
A C++ version of this raytracer can be found here: https://github.com/rafael-fuente/sightpy-weekend-raytracer
探索相关项目
加载中…