Skip to main content

Gpytoolbox: A Python Geometry Processing Toolbox.

Project description

A Python Geometry Processing Toolbox

unit tests unit tests unit tests PyPI

https://gpytoolbox.org

logo

Authors: Silvia Sellán, Columbia University and Oded Stein, University of Southern California

This is a very young library of general geometry processing Python research utility functions that evolves from our personal student codebases. It is compatible with Python 3.10, 3.11, 3.12 and 3.13.

Installation

Latest stable release (recommended)

You should be able install the latest release of Gpytoolbox with pip:

python -m pip install gpytoolbox

From Git

If you want to build Gpytoolbox from a specific git commit; for example, because you want to develop for Gpytoolbox or because you want some functionality that is in the main branch but hasn't been pushed to any release yet, you should be able to do so by cloning Gpytoolbox's github repo and running

python -m pip install numpy
python -m pip install .

Documentation

You can find documentation for all our functions in our website. You can also view the documentation for a specific function by running help(function_name) or function_name.__doc__; for example,

>>> from gpytoolbox import grad
>>> help(grad)
Finite element gradient matrix

Given a triangle mesh or a polyline, computes the finite element gradient matrix assuming piecewise linear hat function basis.

Parameters
----------
V : numpy double array
    Matrix of vertex coordinates
F : numpy int array, optional (default None)
    Matrix of triangle indices

Returns
-------
G : scipy sparse.csr_matrix
    Sparse FEM gradient matrix

See Also
--------
cotangent_laplacian.

Notes
-----

Contribute

We hope you find our current version of our library useful. At the same time, we encourage you to ask not what Gpytoolbox can do for you, but what you can do for Gpytoolbox.

Since Gpytoolbox is a very young library, we want to make it as easy as possible for others to contribute to it and help it grow. You can contribute by adding a new function in a new file inside src/gpytoolbox/, or by adding to existing functions, and submitting a Pull Request.

We also want to make the contribution process as unintimidating as possible. We will gladly review and edit your code to make sure it acommodates to our standards and we have set up many tests that will let us know if your contribution accidentally breaks anything. If there's any functionality that is not already in this library, is remotely related to geometry processing, and you have used or used in any of your past projects, we encourage you to submit it as-is in a Pull Request. We will gladly credit you in the individual function as well as on this home page.

Note that the code that you contribute will be licensed under the MIT license. Everybody will be able to use this code as long as they credit gpytoolbox (and not you individually).

License

Gpytoolbox's is released under an MIT license (see details), except for files in the gpytoolbox.copyleft module, which are under a GPL one (see details). Functions in the copyleft module must be imported explicitly; this way, if you import only the main Gpytoolbox module

import gpytoolbox

or individual functions from it,

from gpytoolbox import regular_square_mesh, regular_cube_mesh

you are only bound by the terms of the permissive MIT license. However, if you import any functionality from gpytoolbox.copyleft; e.g.,

from gpytoolbox.copyleft import mesh_boolean

you will be bound by the more restrictive GPL license.

Attribution

If you use our library in your research paper, please cite us! You can use the bibtex block below:

@misc{gpytoolbox,
  title = {{gptyoolbox}: A Python Geometry Processing Toolbox},
  author = {Silvia Sell\'{a}n and Oded Stein and others},
  note = {https://gpytoolbox.org/},
  year = {2023}
}

Acknowledgements

Several people have, knowingly or unknowingly, greatly contributed to this library. We are thankful to them:

  • Alec Jacobson is the author of the original Matlab gptoolbox on which we inspired ourselves to create this library. Several of our functions are line-by-line translations of his Matlab ones. Thanks, Alec!

  • Nicholas Sharp, the author of the game-changing geometry visualization library polyscope, was extremely helpful in guiding us through setting up and distributing a Python package. Thanks, Nick!

Contributors

Basic Optimistic Roadmap

Here are some things we think would be nice to incorporate to future versions of gpytoolbox. If there's one you are missing, feel free to submit a PR adding your item to this bullet list. If you want to contribute to gpytoolbox, a great way to start is by picking any of the items below that does not have an associated PR yet

To-do

  • Iterative closest point for mesh alignment
  • Basic FEM (cotangent matrix, mass matrix, linear elasticity) for tetrahedral meshes
  • ARAP for deformation and parametrization
  • Exact geodesic distances
  • Heat (approximate) geodesic distance
  • Blue noise in random mesh sampling
  • Intrinsic triangulation routines
  • Fracture mode computation
  • Pure-python version of in_element_aabb
  • Make all grid sizes, resolutions, etc. into tuples not necessarily numpy arrays
  • Add notes on every docstring mentioning libigl implementations
  • Tetrahedral mesh implementation of subdivide.py
  • Dihedral angle computation
  • regular_square_mesh and regular_cube_mesh should support different resolutions in x and y direction (sensible default when n_y is None, to n_y=n_x)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gpytoolbox-0.3.7-cp313-cp313-win_amd64.whl (6.9 MB view details)

Uploaded CPython 3.13Windows x86-64

gpytoolbox-0.3.7-cp313-cp313-manylinux_2_28_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

gpytoolbox-0.3.7-cp313-cp313-macosx_12_0_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.13macOS 12.0+ x86-64

gpytoolbox-0.3.7-cp313-cp313-macosx_12_0_arm64.whl (8.6 MB view details)

Uploaded CPython 3.13macOS 12.0+ ARM64

gpytoolbox-0.3.7-cp312-cp312-win_amd64.whl (6.9 MB view details)

Uploaded CPython 3.12Windows x86-64

gpytoolbox-0.3.7-cp312-cp312-manylinux_2_28_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

gpytoolbox-0.3.7-cp312-cp312-macosx_12_0_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.12macOS 12.0+ x86-64

gpytoolbox-0.3.7-cp312-cp312-macosx_12_0_arm64.whl (8.6 MB view details)

Uploaded CPython 3.12macOS 12.0+ ARM64

gpytoolbox-0.3.7-cp311-cp311-win_amd64.whl (6.9 MB view details)

Uploaded CPython 3.11Windows x86-64

gpytoolbox-0.3.7-cp311-cp311-manylinux_2_28_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

gpytoolbox-0.3.7-cp311-cp311-macosx_12_0_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.11macOS 12.0+ x86-64

gpytoolbox-0.3.7-cp311-cp311-macosx_12_0_arm64.whl (8.6 MB view details)

Uploaded CPython 3.11macOS 12.0+ ARM64

gpytoolbox-0.3.7-cp310-cp310-win_amd64.whl (6.9 MB view details)

Uploaded CPython 3.10Windows x86-64

gpytoolbox-0.3.7-cp310-cp310-manylinux_2_28_x86_64.whl (12.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

gpytoolbox-0.3.7-cp310-cp310-macosx_12_0_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.10macOS 12.0+ x86-64

gpytoolbox-0.3.7-cp310-cp310-macosx_12_0_arm64.whl (8.6 MB view details)

Uploaded CPython 3.10macOS 12.0+ ARM64

File details

Details for the file gpytoolbox-0.3.7-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: gpytoolbox-0.3.7-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 6.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for gpytoolbox-0.3.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d3c7fb4af7e380f9d45c8146ce8bb9f9454835cfeecd754b19372c9928f40562
MD5 863e44879fa1ecff645fe030420765b7
BLAKE2b-256 74a7a972a4dd17b5d3eafce56bd897d4e734227c52e1a911757d89a6801eaeb0

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 91444e51ee2f58c68ed92d878d5b7b335f185b23d1fdee763f9db9e332ad90b6
MD5 61f408f0dd25d3ff3d787b6fa0599f5e
BLAKE2b-256 0aa75ed5580669ddbfd46831dfa47fc8abef99027be6043c3e7aa3f03352670c

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp313-cp313-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp313-cp313-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 6d75f261d27e071c52d10dfaf5c26124670ce6fe613f4d34da12be303c4d6fd7
MD5 087ab6210a94a019cafb294189fa3c8f
BLAKE2b-256 7abacb8754e897a8755cdab4732a7f04758167b3dfe4cc68808eb51ec6c8b8cf

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp313-cp313-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp313-cp313-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 ad1c7ef23c12db8625f6f4ea91de3b298b28fff86787579f21b16441bc81fa35
MD5 bf93e25ebd887d1a03f8b76c6cf90d6d
BLAKE2b-256 0a0e2ca1f11ca727433d6c6bd522b9cb3ef062d34759541b3aaee1fcb0f9f272

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: gpytoolbox-0.3.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 6.9 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for gpytoolbox-0.3.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f1492015ef17994d603f3c065e08d3d764dbeca49cd656dce9d7e92231c146ef
MD5 1fb527cfa139efa3c02d4d455a8938d0
BLAKE2b-256 63a2ea3ad27029392adc5401110eaa0ce179ce3fa77e8ceb1b030d41ea7a75a3

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 59165ed159abfbb418b2dc423dd5d65dcaf40737d9286ed59cc74a468bb28bb4
MD5 651897f12c99b196d3a40d6f51bd98ed
BLAKE2b-256 d19d71b7eeb26db194a4f683aea0bbfb0fffb8adb6b1b0d4920bdbc84424c3f5

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp312-cp312-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 29d78b8d5ffa4f1e00d257cc4bc046cde2531843931deb1c23ef592f493b5e15
MD5 9f817b31b468fceca08a48346d1fbb4c
BLAKE2b-256 0cd223bf1df537d2f3a93bd9e6b652e886fcb215761c3c69d4d4dede0ef64c4e

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp312-cp312-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp312-cp312-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 53d465c068a9f50510e7d6f85aee52c9c38b480ea36572ca3f18c59d8c1d2a7c
MD5 24eb45b764da9c0c03fe521c89cce62a
BLAKE2b-256 90f1ec033122a54aca15ff60ab716dc055da34b863a0ee1b60dc3252038252b7

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gpytoolbox-0.3.7-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 6.9 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for gpytoolbox-0.3.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9ba4af461d0ccd2c2bb964a4a2bdfef62be15e6dd8a11a889a40ae7de127b683
MD5 56892607f7df90f0169bc7332498fa09
BLAKE2b-256 7fb2a8fc5b246eb31df35462ce6f42f5a0cf934d26ffad7de4396afd28788928

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e4ae18b4bc094b855cb2afa82c7745a17dabe44f519486e9f8c3a095d5c0d9d
MD5 951c0cd8dba8fa73076d55e5de37ff95
BLAKE2b-256 b6b4aacb54d82f99e3036e79dd7fdeb7f1c505c19c2eec6eaca0363a856b0acc

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp311-cp311-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 edd854fafa7354e39ff7b0cd80c512e91afe7ead647504ef7fd29302d9e62110
MD5 13ed5f218d5084020504844a99cd4c13
BLAKE2b-256 958160463e695fdaaf3a0b23c848f1c41fc87df5bc7e60b2d6477435ffa60444

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp311-cp311-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp311-cp311-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 9bfb39578f23e1e5eb07af09c5fe39179089625ead9ea6ba465369b53c27a1b6
MD5 0b2b1435a99a785d3c0f75ca163919c0
BLAKE2b-256 44d1f6e695c4ddbe39fa42b0eb58e08a41b50b3a8f2c3633eb3c6672e02cb650

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gpytoolbox-0.3.7-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 6.9 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for gpytoolbox-0.3.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3db8a312102f51a859839b12534a8c44abea636150e7ad4c4ba047635817ee7f
MD5 4836ec41826a0f42049989246ec376bb
BLAKE2b-256 b601d649ce00a8ac7375b3e60cc6c0c951466966990171e48bc122e74c21db27

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 44958d829151d9c2b123bd3657aade90b9c278666962268ce512b36d49bc4385
MD5 168f95fd43ef2beba26d42c78c26b50f
BLAKE2b-256 693f830b2062b1128aa0da13cf668d5f56acfd2ecbbb65972ffe4a2a84750514

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp310-cp310-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 a040bc0dd3f33bdefce5135aca168d06a5878c82bc2082500e0fb1d35a55b816
MD5 f23db723c12443b89bb587343b90defc
BLAKE2b-256 2ab3f0133d247a70c0db2c7fa27b335a06f52975f4d60210e2968483f8e084dc

See more details on using hashes here.

File details

Details for the file gpytoolbox-0.3.7-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for gpytoolbox-0.3.7-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 513b3c4fa4675eaae0817c39bd2758143455982a6871a51ef0d21451c02ff98f
MD5 ea0fb6d0047cc5e01ed0e8f062fe3ed8
BLAKE2b-256 f454dd39e2cbd1f10112f413e2df03073982b0f5bcf8a64832e0904773da6b8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page