py3d


Namepy3d JSON
Version 0.1.90 PyPI version JSON
download
home_pagehttps://tumiz.github.io/py3d/
Summarypy3d is a pure and lightweight python library of 3d data structures and functions, which can deal with points, lines, planes and 3d meshes in batches, and also visualize them. All the actions can be done in a jupyter notebook.
upload_time2025-01-15 12:41:55
maintainerNone
docs_urlNone
authorTumiz
requires_python>=3.7.0
licenseGPL-3.0 License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PY3D - 3D data analysis toolkit
[Code](https://github.com/Tumiz/py3d) | [Docs](https://tumiz.github.io/py3d)

## What is it?

**py3d** is a pure and lightweight Python library dedicated to 3D data structures and functions. It enables batch processing of 3D points, lines, planes, and 3D meshes. Moreover, it provides interactive visualization capabilities for these elements. It is advisable to use it in Jupyter for visualization purposes.

## Main features

* Supports the reading, writing, and visualization of multiple 3D data formats such as the popular PLY, NPY, CSV, PCD, and OBJ. [Demos](https://tumiz.github.io/py3d/IO.html)
* Perform rotation, translation, and scaling operations on 3D geometries. [Demos](https://tumiz.github.io/py3d/Transform.html)
* Conversion among diverse rotation representations, [Demos](https://tumiz.github.io/py3d/Rotation.html) 
    * Rotation matrix
    * Angle - axis
    * Quaternion
    * Euler angle
    * Rotation vector

## How to install it?
```
pip install py3d
```

## How to use it?

Here are some small examples:

1. Visualize a pcd file in jupyter


```python
import py3d
pcd = py3d.read_pcd("binary.pcd")
print("min", pcd.min())
print("max", pcd.max())
pcd.xyz.as_point(colormap=pcd.w)
```

2. Visualize an image in jupyter


```python
import py3d
py3d.image("./20220917214012.jpg")
```

3. Visualize images with poses in jupyter


```python
import py3d
py3d.render(
    py3d.image("797.jpg") @ py3d.Transform.from_translation([0, 100, 0]),
    py3d.image("971.jpg") @ py3d.Transform.from_rpy([0, 0.9, 0.2]) @ py3d.Transform.from_translation([-1000, 500, 0])
)
```

4. Convert euler angles to rotation matrix 


```python
import py3d
py3d.Transform.from_euler("xyz", [0.4, -0.2, 0])
```

5. Visualize a 2d matrix


```python
import py3d
py3d.Vector([
    [1,2,3],
    [4,5,6],
    [7,8,9]
]).as_image()
```

## API reference

[Vector](https://tumiz.github.io/py3d/Vector.html)
[Vector3](https://tumiz.github.io/py3d/Vector3.html)
[Vector4](https://tumiz.github.io/py3d/Vector4.html)
[Transform](https://tumiz.github.io/py3d/Transform.html)
[Rotation](https://tumiz.github.io/py3d/Rotation.html)
[Color](https://tumiz.github.io/py3d/Color.html)
[IO](https://tumiz.github.io/py3d/IO.html)

[Top](#py3d)



            

Raw data

            {
    "_id": null,
    "home_page": "https://tumiz.github.io/py3d/",
    "name": "py3d",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7.0",
    "maintainer_email": null,
    "keywords": null,
    "author": "Tumiz",
    "author_email": "hh11698@163.com",
    "download_url": "https://files.pythonhosted.org/packages/c4/8f/44f4067fabef11fcbc7714bc8af6b305c3df31dda2a88a1007ed704e3a3d/py3d-0.1.90.tar.gz",
    "platform": null,
    "description": "# PY3D - 3D data analysis toolkit\n[Code](https://github.com/Tumiz/py3d) | [Docs](https://tumiz.github.io/py3d)\n\n## What is it?\n\n**py3d** is a pure and lightweight Python library dedicated to 3D data structures and functions. It enables batch processing of 3D points, lines, planes, and 3D meshes. Moreover, it provides interactive visualization capabilities for these elements. It is advisable to use it in Jupyter for visualization purposes.\n\n## Main features\n\n* Supports the reading, writing, and visualization of multiple 3D data formats such as the popular PLY, NPY, CSV, PCD, and OBJ. [Demos](https://tumiz.github.io/py3d/IO.html)\n* Perform rotation, translation, and scaling operations on 3D geometries. [Demos](https://tumiz.github.io/py3d/Transform.html)\n* Conversion among diverse rotation representations, [Demos](https://tumiz.github.io/py3d/Rotation.html) \n    * Rotation matrix\n    * Angle - axis\n    * Quaternion\n    * Euler angle\n    * Rotation vector\n\n## How to install it?\n```\npip install py3d\n```\n\n## How to use it?\n\nHere are some small examples:\n\n1. Visualize a pcd file in jupyter\n\n\n```python\nimport py3d\npcd = py3d.read_pcd(\"binary.pcd\")\nprint(\"min\", pcd.min())\nprint(\"max\", pcd.max())\npcd.xyz.as_point(colormap=pcd.w)\n```\n\n2. Visualize an image in jupyter\n\n\n```python\nimport py3d\npy3d.image(\"./20220917214012.jpg\")\n```\n\n3. Visualize images with poses in jupyter\n\n\n```python\nimport py3d\npy3d.render(\n    py3d.image(\"797.jpg\") @ py3d.Transform.from_translation([0, 100, 0]),\n    py3d.image(\"971.jpg\") @ py3d.Transform.from_rpy([0, 0.9, 0.2]) @ py3d.Transform.from_translation([-1000, 500, 0])\n)\n```\n\n4. Convert euler angles to rotation matrix \n\n\n```python\nimport py3d\npy3d.Transform.from_euler(\"xyz\", [0.4, -0.2, 0])\n```\n\n5. Visualize a 2d matrix\n\n\n```python\nimport py3d\npy3d.Vector([\n    [1,2,3],\n    [4,5,6],\n    [7,8,9]\n]).as_image()\n```\n\n## API reference\n\n[Vector](https://tumiz.github.io/py3d/Vector.html)\n[Vector3](https://tumiz.github.io/py3d/Vector3.html)\n[Vector4](https://tumiz.github.io/py3d/Vector4.html)\n[Transform](https://tumiz.github.io/py3d/Transform.html)\n[Rotation](https://tumiz.github.io/py3d/Rotation.html)\n[Color](https://tumiz.github.io/py3d/Color.html)\n[IO](https://tumiz.github.io/py3d/IO.html)\n\n[Top](#py3d)\n\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0 License",
    "summary": "py3d is a pure and lightweight python library of 3d data structures and functions, which can deal with points, lines, planes and 3d meshes in batches, and also visualize them. All the actions can be done in a jupyter notebook.",
    "version": "0.1.90",
    "project_urls": {
        "Homepage": "https://tumiz.github.io/py3d/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c0ee7219c2d0e973152aabdcde4eba6936e0c30debd75ec296594a0b2cc4e33",
                "md5": "0d39e0da8101f0a09dbfb89c9c1138a8",
                "sha256": "2e868fa8eaa1d1c00964fd7ffea7ee244f9df8c52cd7ffe0bdad34f5951254f7"
            },
            "downloads": -1,
            "filename": "py3d-0.1.90-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0d39e0da8101f0a09dbfb89c9c1138a8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.0",
            "size": 34238,
            "upload_time": "2025-01-15T12:41:53",
            "upload_time_iso_8601": "2025-01-15T12:41:53.173700Z",
            "url": "https://files.pythonhosted.org/packages/6c/0e/e7219c2d0e973152aabdcde4eba6936e0c30debd75ec296594a0b2cc4e33/py3d-0.1.90-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c48f44f4067fabef11fcbc7714bc8af6b305c3df31dda2a88a1007ed704e3a3d",
                "md5": "708e9ab33d9be7f6d09c6cd7fd466997",
                "sha256": "d09cdd2e7247825716737aa6455180190d39a3389b5632cec570a023d95afe2e"
            },
            "downloads": -1,
            "filename": "py3d-0.1.90.tar.gz",
            "has_sig": false,
            "md5_digest": "708e9ab33d9be7f6d09c6cd7fd466997",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.0",
            "size": 35032,
            "upload_time": "2025-01-15T12:41:55",
            "upload_time_iso_8601": "2025-01-15T12:41:55.541311Z",
            "url": "https://files.pythonhosted.org/packages/c4/8f/44f4067fabef11fcbc7714bc8af6b305c3df31dda2a88a1007ed704e3a3d/py3d-0.1.90.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-15 12:41:55",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "py3d"
}
        
Elapsed time: 0.78352s