Skip to content

tsvikas/torch-raytrace

Repository files navigation

torch-raytrace

Tests uv Ruff Black codecov
Made Using tsvikas/python-template

Overview

Ray tracing from scratch with PyTorch for educational and illustrative purposes.

Usage

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)

raytracing output

Development

Getting started

  • install git, uv.
  • git clone this repo: git clone https://github.com/tsvikas/torch-raytrace.git
  • run uv run just prepare

Tests and code quality

  • 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/...

About

Ray tracing from scratch with PyTorch for educational and illustrative purposes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •