Skip to main content

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.

Project description

PY3D - 3D data analysis toolkit

Code | Docs

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
  • Perform rotation, translation, and scaling operations on 3D geometries. Demos
  • Conversion among diverse rotation representations, Demos
    • 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
import py3d
pcd = py3d.read_pcd("binary.pcd")
print("min", pcd.min())
print("max", pcd.max())
pcd.xyz.as_point(colormap=pcd.w)
  1. Visualize an image in jupyter
import py3d
py3d.image("./20220917214012.jpg")
  1. Visualize images with poses in jupyter
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])
)
  1. Convert euler angles to rotation matrix
import py3d
py3d.Transform.from_euler("xyz", [0.4, -0.2, 0])
  1. Visualize a 2d matrix
import py3d
py3d.Vector([
    [1,2,3],
    [4,5,6],
    [7,8,9]
]).as_image()

API reference

Vector Vector3 Vector4 Transform Rotation Color IO

Top

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

py3d-0.1.91.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

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

py3d-0.1.91-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

Details for the file py3d-0.1.91.tar.gz.

File metadata

  • Download URL: py3d-0.1.91.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py3d-0.1.91.tar.gz
Algorithm Hash digest
SHA256 a1131284af755ad2d4093d8f1a26a0161cdf85eef9a84acb4cc54b10a9c09e0d
MD5 f217a42d04a411c83e1afb02ca22ed29
BLAKE2b-256 0654c93c6874517101ac2e5f69eeabd6cee96b945656f38521c6f0407422e83a

See more details on using hashes here.

File details

Details for the file py3d-0.1.91-py3-none-any.whl.

File metadata

  • Download URL: py3d-0.1.91-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py3d-0.1.91-py3-none-any.whl
Algorithm Hash digest
SHA256 3fdd10f5358fc22aa60b3337ff44578f5327a8d6485b1ef6cd789babf1f898ec
MD5 4e0e09c132b54cb4d47d0a2faee263a3
BLAKE2b-256 01e5039ea291a9bef211246b3a8552e99ce2d50e0477e894fe0ea5e6924f1afd

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