Skip to content

daniil-berg/spherify

Repository files navigation

Spherify

Project images onto spheres in 3D space and take snapshots.

Dependencies

Should run on most Linux/Windows systems. Tested on Arch and Windows 10.

Building

Clone this repo, install build via pip, then run pip -m build from the repository's root directory. This should produce a dist/ subdirectory with a wheel (build) and archive (source) distribution. The resulting whl-file can be installed via pip install path/dist/***.whl.

Running

To get detailed help and usage info:

python -m spherify -h

Simple example to project a PNG onto a sphere centered at (0, 0, 1000) with radius 600 and display the snapshot:

python -m spherify -c 0,0,1000 -r 600 path/to/image.png

Same thing, but don't display and save to current working directory instead:

python -m spherify -c 0,0,1000 -r 600 -d . -D path/to/image.png

Read the help for additional options.

Example

You could pass this test image as input with the options above:

example input

The output should look something like this:

example output

This transformation may take a few seconds depending on your processor. Increasing sampling density by using the -s option may reduce noise, but takes significantly longer.

Caution

This can be run on multiple images concurrently (by default). Depending on their number, resolution, and the system resources, this can quickly take up all available resources (incl. RAM and Swap) and render the system unresponsive.

To avoid this, consider doing them in batches or using the -C flag.

Assignment

TU Berlin, Computerorientierte Mathematik 2, SS 2021

Assignment PDF (German)

Group No. 10

Authors

[Private]

Fajnberg, Daniil

[Private]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published