Skip to main content

3D visualization library for rapid prototyping of 3D algorithms

Project description

Iridescence

Iridescence is a light-weight visualization library for rapid prototyping of 3D algorithms. This library is designed for accelerating personal research and development projects (mainly focuing on point-cloud-related algorithms) and is NOT intended to be a general-purpose visualization library with rich rendering capabilities.

Documentation (en), Documentation (日本語), API(C++), API(Python)

ppa PyPI - Version Build on Ubuntu 22.04 / 24.04 and Windows

Features

What this library provides:

  • An easy-to-use 3D visualization framework (inpaticular suitable for rendering point clouds)
  • Tightly integrated Dear ImGui interfaces for rapid UI design

What this library does NOT provide:

  • Realistic rendering and shading
  • Rich textured 3D mesh rendering

See documentation for details.

Dependencies

Installation

C++ : Install from PPA (Ubuntu)

# Install from PPA
sudo add-apt-repository -y ppa:koide3/iridescence
sudo apt install libiridescence-dev

Python : Install from PyPI (Ubuntu and Windows)

Note : Source installation is required for Python 3.14.

# Install from PyPI
pip install pyridescence
Install from source

C++ : Install from source (Ubuntu)

# Install dependencies
sudo apt-get install -y libglm-dev libglfw3-dev libpng-dev libjpeg-dev libeigen3-dev

# Build and install Iridescence
git clone https://github.com/koide3/iridescence --recursive
mkdir iridescence/build && cd iridescence/build
cmake ..
make -j
sudo make install

Python : Install from source

git clone https://github.com/koide3/iridescence --recursive
cd iridescence
pip install .

Usage

C++ : Use Iridescence in your cmake project

# Find package
find_package(Iridescence REQUIRED)

# Add include dirs and link libraries
add_executable(your_program
  src/your_program.cpp
)
target_link_libraries(your_program
  Iridescence::Iridescence
)

C++ : Minimum example

C++:

#include <glk/primitives/primitives.hpp>
#include <guik/viewer/light_viewer.hpp>

int main(int argc, char** argv) {
  // Create a viewer instance (global singleton)
  auto viewer = guik::LightViewer::instance();

  float angle = 0.0f;

  // Register a callback for UI rendering
  viewer->register_ui_callback("ui", [&]() {
    // In the callback, you can call ImGui commands to create your UI.
    // Here, we use "DragFloat" and "Button" to create a simple UI.
    ImGui::DragFloat("Angle", &angle, 0.01f);

    if (ImGui::Button("Close")) {
      viewer->close();
    }
  });

  // Spin the viewer until it gets closed
  while (viewer->spin_once()) {
    // Objects to be rendered are called "drawables" and managed with unique names.
    // Here, solid and wire spheres are registered to the viewer respectively with
    // the "Rainbow" and "FlatColor" coloring schemes.
    // The "Rainbow" coloring scheme encodes the height of each fragment using the
    // turbo colormap by default.
    Eigen::AngleAxisf transform(angle, Eigen::Vector3f::UnitZ());
    viewer->update_drawable("sphere", glk::Primitives::sphere(), guik::Rainbow(transform));
    viewer->update_drawable("wire_sphere", glk::Primitives::wire_sphere(), guik::FlatColor({0.1f, 0.7f, 1.0f, 1.0f}, transform));
  }

  return 0;
}

Python : Minimum example

#!/usr/bin/python3
import numpy
from scipy.spatial.transform import Rotation

from pyridescence import *

# Create a viewer instance (global singleton)
viewer = guik.LightViewer.instance()

angle = 0.0

# Define a callback for UI rendering
def ui_callback():
  # In the callback, you can call ImGui commands to create your UI.
  # Here, we use "DragFloat" and "Button" to create a simple UI.

  global angle
  _, angle = imgui.drag_float('angle', angle, 0.01)

  if imgui.button('close'):
    viewer.close()

# Register a callback for UI rendering
viewer.register_ui_callback('ui', ui_callback)

# Spin the viewer until it gets closed
while viewer.spin_once():
  # Objects to be rendered are called "drawables" and managed with unique names.
  # Here, solid and wire spheres are registered to the viewer respectively with
  # the "Rainbow" and "FlatColor" coloring schemes.
  # The "Rainbow" coloring scheme encodes the height of each fragment using the
  # turbo colormap by default.
  transform = numpy.identity(4)
  transform[:3, :3] = Rotation.from_rotvec([0.0, 0.0, angle]).as_matrix()
  viewer.update_drawable('sphere', glk.primitives.sphere(), guik.Rainbow(transform))
  viewer.update_drawable('wire_sphere', glk.primitives.wire_sphere(), guik.FlatColor(0.1, 0.7, 1.0, 1.0, transform))

example_01

See documentation for details.

Some use examples in my academic works

ral2021 iros2022

License

This package is released under the MIT license.

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

pyridescence-1.0.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

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

pyridescence-1.0.0-cp313-cp313-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.13Windows x86-64

pyridescence-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pyridescence-1.0.0-cp313-cp313-manylinux_2_28_aarch64.whl (7.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pyridescence-1.0.0-cp312-cp312-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.12Windows x86-64

pyridescence-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pyridescence-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl (7.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pyridescence-1.0.0-cp311-cp311-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.11Windows x86-64

pyridescence-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pyridescence-1.0.0-cp311-cp311-manylinux_2_28_aarch64.whl (7.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

pyridescence-1.0.0-cp310-cp310-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.10Windows x86-64

pyridescence-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pyridescence-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl (7.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

File details

Details for the file pyridescence-1.0.0.tar.gz.

File metadata

  • Download URL: pyridescence-1.0.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyridescence-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a3ae146e5745c26dc134ad3634d543f0d9ed8fde73a9ac477455979adf4cd2c6
MD5 25218e0d4e926578bce01cda443f1a5a
BLAKE2b-256 7e600d046f1b7a1a7bd32547152b9fdaf66f11681af297bc2ca0573003568292

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dee34b5f98884a12ceaf78b72f1b058c38ddea96faec9bf4f75a719bc6381f9e
MD5 10fce01894f9056fb03ef79b76a94aaf
BLAKE2b-256 111637b1b78323c569140fa0daed31c0ace1b2c77b29091416c8e0e3232a5606

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 393322ddee8e5656d0112de9c8e58e1db0213aa767f62c5c2e50ba2eeebac9f8
MD5 9113f8bef60f26b5a616d46d1a51b283
BLAKE2b-256 fb5d2d81d2dbf405fc507b824a2dd3058292643a79442173804cebc6a0ad7ce5

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 99a2ec0b98d34f09414fd51c705551084815a58b252ce893c562371042128d0c
MD5 d9bbaf636602917334fa23bbe5ce1322
BLAKE2b-256 2452ece2bf70602b1d151fffef8ba73929d7c396b217214643729ab9cc79e566

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7cf8e9ea5581712c79b8fe116933d049c0c19bf8828047c87b7c23e0a7c106c4
MD5 165ac10ed172e086cf0f7ddfda49d94f
BLAKE2b-256 726f95c8c0d0ee22792edd2446cfc75238e5148cc352f1e76ddbfbeb8eb25ac6

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 54935f9e9a4ff4502d507cebf81a1c9be90d83afb63c6f3a4a944ba3c90f1568
MD5 ac14527adb07329a36b34559c9b80b83
BLAKE2b-256 017b4016784611ef4176b015f2f79e5da3193e10210a3d1714e3ea9e87351fc0

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a13117dbcf850fca5d72f95279ce2b2889eae1baec45ebf911d604f3ddc0cb5f
MD5 fab4146e23c195f0953b7a08b2d9cded
BLAKE2b-256 c246a890dadf31b09f1452cda488be46cc7d3ac0372f35eea5984b923b0c4c22

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 53aea275c8208323e472e6863a4c99bc7c6078d5d8bd5c9cfe9fb103e0d42d71
MD5 fc6c4044231bfbb889d1469fea5b5f56
BLAKE2b-256 a6db038ab5207984a2534780d195c8bc2e12b1ad5d390cf9d16875399f28a252

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 992edec53181436d95a1a6d13d0790edcafae583cdd42be000801303641fb25d
MD5 844100751ef7cd4a21a172be4fb82a91
BLAKE2b-256 00867ed6eaee3bd088340262a67d6453dcf210d919f06a19e41e8c8ba7849d53

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1e6f0a097fde25e113552189c2b5dc14d8e1168f505a9074bbdffa4492138e80
MD5 c8340e71f2611e9b908e8d486d98305d
BLAKE2b-256 f45223eae2c7fe0b3fa124b19bdd02cebf1332e98e744f19e9eec90ba5eb77d3

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4ed747ce3f4fe874237c68d05388b4df2b7d15dc4f82204da76c42209d6cf4c2
MD5 360f87b7f2bec87efa6231ec0da53391
BLAKE2b-256 d4ed9fe3bd15bf193e8bb810e4553af05cbf6735a57baa18ef46a09314555438

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b441b1ec3bf498cdf7b2d9657785de0062d8f85a7cd1bbfbe326aeedf6db3fbd
MD5 ca61b9247aef4ec9deeb2ccafea624ae
BLAKE2b-256 f307692174ccff51fce613bc787c28b83fff95c9e940dc1923be6a0663012da3

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 aa09225d9e3db1384e7d459f600ed62ce49d8a9205effa7a5601b864aa48e122
MD5 435466be31eb425b51715f7a562f729c
BLAKE2b-256 6b8c890c8f4f29e833857ff9e7ee7fad408f411b2f0cfcc14616f55af1501afc

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