An open API service indexing awesome lists of open source software.

https://github.com/yzx9/sdflit

Fast and Robust Signed Distance Function Library
https://github.com/yzx9/sdflit

pyo3 sdf

Last synced: about 1 month ago
JSON representation

Fast and Robust Signed Distance Function Library

Awesome Lists containing this project

README

          

# SDF-Lit

## Usage

```sh
pip install sdflit
```

Try it in Python:

```python
>>> import sdflit as sdf
>>> sphere = sdf.Sphere((0, 0, 0), 1)
>>> sphere.distance((0, 0, 0))
-1.0
>>> sphere.distance((1, 0, 0))
0.0
>>> sphere.distance((1, 1, 1))
0.7320507764816284
```

## Development

Setup Python venv:

```sh
python -m venv .env
source .env/bin/activate
pip install maturin
```

Build Python package after each modification:

```sh
maturin develop
```

## License

This work is licensed under a Apache-2.0.

Copyright (c) 2023-present, Zexin Yuan