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.1.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.1-cp313-cp313-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.13Windows x86-64

pyridescence-1.0.1-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.1-cp313-cp313-manylinux_2_28_aarch64.whl (7.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12Windows x86-64

pyridescence-1.0.1-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.1-cp312-cp312-manylinux_2_28_aarch64.whl (7.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11Windows x86-64

pyridescence-1.0.1-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.1-cp311-cp311-manylinux_2_28_aarch64.whl (7.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10Windows x86-64

pyridescence-1.0.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: pyridescence-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 9d893e7ae715ecbd3528fc6d31fd87447877fb5fd0542f86cb31382c3d710d0a
MD5 be5becf7f47065e3f1126f22296eed2a
BLAKE2b-256 f1c0b043e3c2f0c32367fd2ca9361372e3fdc1f8efad17ea3c191717b2d82ad2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 eb18015abd7e59c7f53bc10c10bba818521ce4f2f671fbbfe6d51d67f46c1c88
MD5 114e24a9c57afa163eff4c9ed3138bb0
BLAKE2b-256 7baf9bd1104dbec31fff9907a02fee30a80f2372a23770c767661207ca2cdfb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4f0c7105aa7e6767585e2a19f6e7c373df62a4367f4af35dcb370f7c60472b26
MD5 cad6cbeaf4c73c8db52abe6e931fb127
BLAKE2b-256 fc6ce602f0aab16673fdaa81a48643e14163203676359982e17b412dd37fe0b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 683157d2ec3da6f2906820770113d9796479d7e7c1056ccb048c44b7cc00e06c
MD5 b4ad8ba72115d20474f50cc16c6e926b
BLAKE2b-256 820c8f271f70cd134c94376fa9bd2153ae6267deaf27fb7710974f329767d317

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a96a5e1c7135af62f58c93289e10f01a52fa2ed51fbcf3b2982a261284a86a88
MD5 fcba4cc459f410cb25abab55b36e5863
BLAKE2b-256 72c260a5432e71ceeb9366b7c8218ae3a192a458935dd3c115c851270ab337cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fc0d139c98d3c09a876b6fbbd8d649e66d98774abc36005d0ae8922730d105e0
MD5 760bd0a980873838c2d7a104f04c1a26
BLAKE2b-256 ff54ecfa20d374f508b6025eaa996c13bde671cd8ca9b5a70fb043bf79fd55fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2317354caceca3bdb454f30c51109ffc3c4604fd1db6578f225328fe6f45729b
MD5 f377cf906c1c1deabed2aa2009241129
BLAKE2b-256 6b05dc0d5933ed6f0905ff10a8e4abfab19dc6177c5bafd8afd495d96027e262

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 839f684fc5d4993cdb1b62e3c85a5ce2c7e3cb11864c9809a3e370cb8e3f0e10
MD5 c25cde1fa970c7dd0f2350f4207d762f
BLAKE2b-256 6f8810ac6efda89d45e65614b37d8a6ca8baad292266e49925e5dbff4d2443b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 59b1bb03a6fe6e951c1962235cd08a44de57379538b26b9d77814f3c3a1a81ec
MD5 5813de5c8a559fad4830e7dd863dd304
BLAKE2b-256 82b574ca1e7f98b91444bdb965e852ab3602e69f5e71820626a349d39a5cfa7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a6244bacd58ab2abfe4c0f29e20b9a6162ab0e7a5a9982730d5e63aeee2ea737
MD5 e51f0a5234cec60f5624ae7aa06a3733
BLAKE2b-256 8e438e3e8ddeb7ac75a61c9f33fdf5f7af32b28e25d97e10e9b74b50d6303cd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6f0bc87e9f27abe8c18f6ab22f6d8fa526532edf055abafdcb5bd7899f9c00f5
MD5 642c12b388040f5a00a176d41adc1fb7
BLAKE2b-256 c53faad554f7e001bf5c2467ff049f096911d7184485fd48aa03046040f2a64d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bdcba51bd538c574a6da85ad8bccf13a8241728344359daa3f5e920d7556a891
MD5 38c4fa5e7b0f891e1cc9c7e860a847d5
BLAKE2b-256 9b30f9dd570e29e2f4b6fa2c9e5a54593a7325634984438fba6095b9ecfa6a1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 087c41c62b1e0df9469a7940df7b1bbd3af455376c24212e5bdfaa8439216c99
MD5 af251603f0e72b4b9245f78c466a646d
BLAKE2b-256 bff4095b753e0bb1340bd199dc9b10f9ef1c2223e901e66a513b7c2d501cc1e9

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