Skip to main content

Simple interactive visualization of 3D point clouds

Project description

PyPI version

cloudglancer

Simple interactive visualization of 3D point clouds using Plotly.

Features

  • Interactive 3D scatter plots with pan, zoom, and rotation
  • Support for categorical and continuous color mapping
  • Combine multiple plots into subplot grids
  • Plot batched point clouds (B, N, 3)
  • Render a (B, N, 3) batch as a grid of subplots (one cloud per cell)
  • Export a rotating turntable GIF of any figure

Installation

pip install cloudglancer

Quick Start

import numpy as np
import cloudglancer as cg

# Generate random 3D points
points = np.random.randn(500, 3)

# Create and display the plot
cg.plot(points, title="My Point Cloud", size=2.0).show()

Export a rotating GIF of the same figure:

fig = cg.plot(points, size=2.0)
cg.animate(fig, "rotation.gif", axis="z", n_frames=60)

Render a batch of point clouds as a grid of subplots (one cloud per cell):

batch = np.random.randn(6, 500, 3)  # (B, N, 3)

# Auto near-square grid, single color for every cloud
fig = cg.plot_grid(batch, colors="#1f77b4", size=1.5)

# Or explicit grid + per-cell colors
fig = cg.plot_grid(batch, rows=2, cols=3,
                   colors=["red", "green", "blue", "orange", "purple", "teal"])

# Combine with animate() for a rotating GIF of the whole grid
cg.animate(fig, "grid.gif", n_frames=60, width=1600, height=1200)

Apply a clean, GIF-friendly style (white backgrounds, hidden tick labels, light gray axis grid) to every 3D scene in a figure — works for both single plots and grids:

fig = cg.beautify(cg.plot_grid(batch, colors="#1f77b4"))
cg.animate(fig, "grid.gif", n_frames=60)

More examples are in the examples folder.

Development Installation

Clone the repository and install in editable mode:

git clone https://github.com/yourusername/cloudglancer.git
cd cloudglancer
python -m venv venv
source venv/bin/activate
pip install -e .

Install with Development Dependencies

pip install -e ".[dev]"

Requirements

  • Python >= 3.9
  • plotly >= 5.0.0
  • pandas >= 2.0.0
  • numpy >= 1.24.0

Building the Package

pip install build
python -m build

This will create both wheel and source distributions in the dist/ directory.

Deploy to PyPi

twine upload --verbose dist/*

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

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

Source Distribution

cloudglancer-0.1.7.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

cloudglancer-0.1.7-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file cloudglancer-0.1.7.tar.gz.

File metadata

  • Download URL: cloudglancer-0.1.7.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cloudglancer-0.1.7.tar.gz
Algorithm Hash digest
SHA256 b42e561e5197c6cfaa898a11970ea46d596c55b931999735c83286c63dc7f3ec
MD5 3bc4d3032f3fe3d11d3626b51c648325
BLAKE2b-256 6aecde754458efd9b1417d7494797ecc84511f6fbd8f73133d617e04013b2f21

See more details on using hashes here.

File details

Details for the file cloudglancer-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: cloudglancer-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cloudglancer-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6ab6aa7ecc3aea4d38857b1336016a152b02682efe6cd234df907480f75ce661
MD5 766f18f4cc521c682d2a77b05d8180c5
BLAKE2b-256 f9886f6334bc955fbd48ead5163012bbd96021446b02d51ceccf6a3cdc362270

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