distance3d


Namedistance3d JSON
Version 0.9.0 PyPI version JSON
download
home_pagehttps://github.com/AlexanderFabisch/distance3d
SummaryDistance computation and collision detection in 3D.
upload_time2024-02-23 13:46:57
maintainer
docs_urlNone
authorAlexander Fabisch
requires_python
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ![continuous integration](https://github.com/AlexanderFabisch/distance3d/actions/workflows/ci.yml/badge.svg)
[![codecov](https://codecov.io/gh/AlexanderFabisch/distance3d/branch/master/graph/badge.svg?token=GJE5ZMVVB8)](https://codecov.io/gh/AlexanderFabisch/distance3d)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6509736.svg)](https://doi.org/10.5281/zenodo.6509736)

# distance3d

Distance computation and collision detection in 3D.

<table>
<tr>
    <td><img src="https://raw.githubusercontent.com/AlexanderFabisch/distance3d/master/doc/source/_static/robot_collision_detection.png" width=100% /></td>
    <td><img src="https://raw.githubusercontent.com/AlexanderFabisch/distance3d/master/doc/source/_static/capsule_collisions.png" width=100% /></td>
</tr>
<tr>
    <td><a href="https://github.com/AlexanderFabisch/distance3d/blob/master/examples/visualizations/vis_robot_collision_objects.py">Robot collision detection</a></td>
    <td><a href="https://github.com/AlexanderFabisch/distance3d/blob/master/examples/visualizations/vis_capsules_benchmark.py">Capsule collision detection</a></td>
</tr>
<tr>
    <td><img src="https://raw.githubusercontent.com/AlexanderFabisch/distance3d/master/doc/source/_static/closest_points.png" width=100% /></td>
    <td><img src="https://raw.githubusercontent.com/AlexanderFabisch/distance3d/master/doc/source/_static/hydroelastic_contact_surface.png" width=100% /></td>
</tr>
<tr>
    <td><a href="https://github.com/AlexanderFabisch/distance3d/blob/master/examples/visualizations/vis_closest_points.py">Closest points</a></td>
    <td><a href="https://github.com/AlexanderFabisch/distance3d/blob/master/examples/visualizations/vis_pressure_field.py">Hydroelastic contact</a></td>
</tr>
</table>

## Features

* Collision detection and distance computation with GJK.
* Calculation of penetration depth with EPA.
* Collision detection and calculation of penetration depth with MPR.
* Various specific distance calculations for points, lines, line segments,
  planes, triangles, rectangles, circles, disks, boxes, cylinders, ellipsoids,
  ...
* Broad phase collision detection with bounding volume hierarchy (AABB tree).
* Self-collision detection for robots.
* Contact wrench computation with hydroelastic contact model (pressure field
  model).

## Dependencies

distance3d relies on numba to speed up computations. numba in its latest
version requires at least Python 3.7 and NumPy 1.18. See [here](
https://numba.readthedocs.io/en/stable/user/installing.html#compatibility)
for current requirements. Required Python libraries will automatically be
installed during installation of distance3d.

## Installation

Install the package with

    pip install -e .[all]

or from PyPI with

    pip install distance3d[all]

## Unit Tests

Install dependencies with

    pip install -e .[test]

Run unit tests with

    NUMBA_DISABLE_JIT=1 pytest

You will find the coverage report in `htmlcov/index.html`.

## API Documentation

Install dependencies with

    pip install -e .[doc]

Build API documentation with

    cd doc
    make html

You will find the documentation in `doc/build/html/index.html`.

## Licenses

These implementations are mostly based on

* Christer Ericson: Real-Time Collision Detection, CRC Press, 2004.
* David H. Eberly: 3D Game Engine Design, CRC Press, 2006.

and accompanying implementations. These are marked as such.

The distance computation between a line and a circle is based on David Eberly's
implementation, Copyright (c) 1998-2022 David Eberly, Geometric Tools,
Redmond WA 98052, distributed under the Boost Software License, Version 1.0.

The original GJK algorithm is a translation to Python of the translation to C of
the original Fortran implementation. The C implementation is from Diego Ruspini.
It is available from http://realtimecollisiondetection.net/files/gilbert.c

Some features related to the GJK algorithm have been inspired by
[Bullet](https://github.com/bulletphysics/bullet3/) (zlib license) and are
marked as such in the source code.

The EPA algorithm is adapted from
[Kevin Moran's GJK implementation](https://github.com/kevinmoran/GJK)
(MIT License or Unlicense).

A GJK intersection test and the MPR algorithm are based on libccd (for details,
see https://github.com/danfis/libccd). For the original code the copyright is
of Daniel Fiser <danfis@danfis.cz>. It has been released under 3-clause BSD
license.

The main GJK implementation is based on Jolt Physics, Copyright 2021 Jorrit
Rouwe, MIT license.

The translation to Python has been done by Alexander Fabisch and the glue
code around it is licensed under the 3-clause BSD license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AlexanderFabisch/distance3d",
    "name": "distance3d",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Alexander Fabisch",
    "author_email": "afabisch@googlemail.com",
    "download_url": "https://files.pythonhosted.org/packages/0b/53/7fc7f5205d735680edb5d59b2bede5bc978b6e589ede4427180e858f67d1/distance3d-0.9.0.tar.gz",
    "platform": null,
    "description": "![continuous integration](https://github.com/AlexanderFabisch/distance3d/actions/workflows/ci.yml/badge.svg)\n[![codecov](https://codecov.io/gh/AlexanderFabisch/distance3d/branch/master/graph/badge.svg?token=GJE5ZMVVB8)](https://codecov.io/gh/AlexanderFabisch/distance3d)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6509736.svg)](https://doi.org/10.5281/zenodo.6509736)\n\n# distance3d\n\nDistance computation and collision detection in 3D.\n\n<table>\n<tr>\n    <td><img src=\"https://raw.githubusercontent.com/AlexanderFabisch/distance3d/master/doc/source/_static/robot_collision_detection.png\" width=100% /></td>\n    <td><img src=\"https://raw.githubusercontent.com/AlexanderFabisch/distance3d/master/doc/source/_static/capsule_collisions.png\" width=100% /></td>\n</tr>\n<tr>\n    <td><a href=\"https://github.com/AlexanderFabisch/distance3d/blob/master/examples/visualizations/vis_robot_collision_objects.py\">Robot collision detection</a></td>\n    <td><a href=\"https://github.com/AlexanderFabisch/distance3d/blob/master/examples/visualizations/vis_capsules_benchmark.py\">Capsule collision detection</a></td>\n</tr>\n<tr>\n    <td><img src=\"https://raw.githubusercontent.com/AlexanderFabisch/distance3d/master/doc/source/_static/closest_points.png\" width=100% /></td>\n    <td><img src=\"https://raw.githubusercontent.com/AlexanderFabisch/distance3d/master/doc/source/_static/hydroelastic_contact_surface.png\" width=100% /></td>\n</tr>\n<tr>\n    <td><a href=\"https://github.com/AlexanderFabisch/distance3d/blob/master/examples/visualizations/vis_closest_points.py\">Closest points</a></td>\n    <td><a href=\"https://github.com/AlexanderFabisch/distance3d/blob/master/examples/visualizations/vis_pressure_field.py\">Hydroelastic contact</a></td>\n</tr>\n</table>\n\n## Features\n\n* Collision detection and distance computation with GJK.\n* Calculation of penetration depth with EPA.\n* Collision detection and calculation of penetration depth with MPR.\n* Various specific distance calculations for points, lines, line segments,\n  planes, triangles, rectangles, circles, disks, boxes, cylinders, ellipsoids,\n  ...\n* Broad phase collision detection with bounding volume hierarchy (AABB tree).\n* Self-collision detection for robots.\n* Contact wrench computation with hydroelastic contact model (pressure field\n  model).\n\n## Dependencies\n\ndistance3d relies on numba to speed up computations. numba in its latest\nversion requires at least Python 3.7 and NumPy 1.18. See [here](\nhttps://numba.readthedocs.io/en/stable/user/installing.html#compatibility)\nfor current requirements. Required Python libraries will automatically be\ninstalled during installation of distance3d.\n\n## Installation\n\nInstall the package with\n\n    pip install -e .[all]\n\nor from PyPI with\n\n    pip install distance3d[all]\n\n## Unit Tests\n\nInstall dependencies with\n\n    pip install -e .[test]\n\nRun unit tests with\n\n    NUMBA_DISABLE_JIT=1 pytest\n\nYou will find the coverage report in `htmlcov/index.html`.\n\n## API Documentation\n\nInstall dependencies with\n\n    pip install -e .[doc]\n\nBuild API documentation with\n\n    cd doc\n    make html\n\nYou will find the documentation in `doc/build/html/index.html`.\n\n## Licenses\n\nThese implementations are mostly based on\n\n* Christer Ericson: Real-Time Collision Detection, CRC Press, 2004.\n* David H. Eberly: 3D Game Engine Design, CRC Press, 2006.\n\nand accompanying implementations. These are marked as such.\n\nThe distance computation between a line and a circle is based on David Eberly's\nimplementation, Copyright (c) 1998-2022 David Eberly, Geometric Tools,\nRedmond WA 98052, distributed under the Boost Software License, Version 1.0.\n\nThe original GJK algorithm is a translation to Python of the translation to C of\nthe original Fortran implementation. The C implementation is from Diego Ruspini.\nIt is available from http://realtimecollisiondetection.net/files/gilbert.c\n\nSome features related to the GJK algorithm have been inspired by\n[Bullet](https://github.com/bulletphysics/bullet3/) (zlib license) and are\nmarked as such in the source code.\n\nThe EPA algorithm is adapted from\n[Kevin Moran's GJK implementation](https://github.com/kevinmoran/GJK)\n(MIT License or Unlicense).\n\nA GJK intersection test and the MPR algorithm are based on libccd (for details,\nsee https://github.com/danfis/libccd). For the original code the copyright is\nof Daniel Fiser <danfis@danfis.cz>. It has been released under 3-clause BSD\nlicense.\n\nThe main GJK implementation is based on Jolt Physics, Copyright 2021 Jorrit\nRouwe, MIT license.\n\nThe translation to Python has been done by Alexander Fabisch and the glue\ncode around it is licensed under the 3-clause BSD license.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Distance computation and collision detection in 3D.",
    "version": "0.9.0",
    "project_urls": {
        "Homepage": "https://github.com/AlexanderFabisch/distance3d"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b537fc7f5205d735680edb5d59b2bede5bc978b6e589ede4427180e858f67d1",
                "md5": "a58522d74a3f5d2e1fc8df2d43071918",
                "sha256": "3ec9fc251a35357442a12b910dc697ab2490559c3d25146d7264d5321fbfd430"
            },
            "downloads": -1,
            "filename": "distance3d-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a58522d74a3f5d2e1fc8df2d43071918",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 993028,
            "upload_time": "2024-02-23T13:46:57",
            "upload_time_iso_8601": "2024-02-23T13:46:57.463316Z",
            "url": "https://files.pythonhosted.org/packages/0b/53/7fc7f5205d735680edb5d59b2bede5bc978b6e589ede4427180e858f67d1/distance3d-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-23 13:46:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AlexanderFabisch",
    "github_project": "distance3d",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "distance3d"
}
        
Elapsed time: 0.29271s