Ray tracing from scratch with PyTorch for educational and illustrative purposes.
Install the package using pip, or with a dependency manager like uv:
pip install git+https://github.com/tsvikas/torch-raytrace.git
and import the package in your code:
import raytrace
axis, rays, triangles, screen = raytrace.plot_render.render_pikachu()
raytrace.plot_render.plot_render(axis, rays, triangles, screen)
- install git, uv.
- git clone this repo:
git clone https://github.com/tsvikas/torch-raytrace.git
- run
uv run just prepare
- use
uv run just format
to format the code. - use
uv run just lint
to see linting errors. - use
uv run just test
to run tests. - use
uv run just check
to run all the checks (format, lint, test, and pre-commit). - Run a specific tool directly, with
uv run pytest
/ruff
/mypy
/black
/...