pytrace

Crates.iopytrace
lib.rspytrace
version0.3.3
sourcesrc
created_at2020-05-31 13:16:34.754663
updated_at2020-06-18 06:13:28.452941
descriptionA Python library for ray tracing and image generation
homepage
repositoryhttps://github.com/Vanille-N/ray_tracer
max_upload_size
id248157
size43,033
Neven Villani (Vanille-N)

documentation

README

PyTrace

License: MIT API

WARNING

PyTrace uses PyO3. If you wish to compile this crate, you should use Rust nightly.

How to build

cargo build --release
cp target/release/libpytrace.so pytrace.so

That last step will only allow you to import the resulting library from your current directory. You may want to replace it with any of the following :

cp target/release/libpytrace.so usr/bin/pytrace.so
mv target/release/libpytrace.so target/release/pytrace.so; export PATH=$(pwd)/target/release:$PATH
...

You can now import pytrace as tr from any Python script, as long as pytrace.so is in your working directory or in your PATH.

The Github repository provides:

  • LIB.md containing the autogenerated docs (available from a running Python instance with help(pytrace))
  • A few working examples in the form of executable .py files
  • A sample of images and videos that were generated with the help of this library

Note

It is possible to abort the process of creating an image by pressing Ctrl + C, but when doing so, the process will immediately exit. This makes little difference if you run a script, but it does if you run a REPL. Be warned that if you abort the render function, your REPL session will be terminated.

Commit count: 397

cargo fmt