Table of Contents
Welcome to the documentation for coxeter! The coxeter Python library provides tools for working with common geometric objects in two and three dimensions. Named for the 20th century geometer best known for his work on polytopes, coxeter is especially focused on polygons and polyhedra, but it also support various standard curved shapes such as spheres and ellipsoids.
The package emphasizes working with shapes as mutable objects whose geometric attributes may be accessed using property-based APIs. Since coxeter originally arose to support representations of anisotropic nanoparticles, many shapes support calculations of physical properties (such as form factors and inertia tensors) in addition to purely geometric ones. However, the package is designed with more general audiences in mind as well, and it aims to support precise calculations of a wide range of geometric quantities that are useful in a number of fields.
Some core features of coxeter include:
Libraries of common shapes to support easy construction.
Mutable shape objects that can be rescaled in a variety of ways to suit a number of needs.
Immediate access to geometric properties of shapes via Python properties of shape objects.
Plotting functionality to make it easy to visualize shapes in both two and three dimensions.
More detailed information on coxeter’s features and examples of how to use them may be found in the documentation.
The recommended methods for installing coxeter are using pip or conda.
To install the package from PyPI, execute:
pip install coxeter --user
To install the package from conda, first add the conda-forge channel:
conda config --add channels conda-forge
After the conda-forge channel has been added, you can install coxeter by executing
conda install coxeter
To install from source, execute:
git clone https://github.com/glotzerlab/coxeter.git cd coxeter python setup.py install --user
Python >= 3.8
NumPy >= 1.19.0
SciPy >= 1.0.0
rowan >= 1.2.0
The package is currently tested for Python >= 3.8 on Unix-like systems. Continuous integrated testing is performed using CircleCI on these Python versions.
To run the packaged unit tests, execute the following line from the root of the repository:
To check test coverage, make sure the coverage module is installed:
pip install coverage
and then run the packaged unit tests with the coverage module:
cd doc pip install -r requirements.txt
You can then use Sphinx to create the actual documentation in either PDF or HTML form by running the following commands in the coxeter root directory:
make html # For html output make latexpdf # For a LaTeX compiled PDF file open build/html/index.html