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.2.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.2-cp314-cp314-win_amd64.whl (13.2 MB view details)

Uploaded CPython 3.14Windows x86-64

pyridescence-1.0.2-cp314-cp314-manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

pyridescence-1.0.2-cp314-cp314-manylinux_2_28_aarch64.whl (7.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

pyridescence-1.0.2-cp313-cp313-win_amd64.whl (13.0 MB view details)

Uploaded CPython 3.13Windows x86-64

pyridescence-1.0.2-cp313-cp313-manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pyridescence-1.0.2-cp313-cp313-manylinux_2_28_aarch64.whl (7.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pyridescence-1.0.2-cp312-cp312-win_amd64.whl (13.0 MB view details)

Uploaded CPython 3.12Windows x86-64

pyridescence-1.0.2-cp312-cp312-manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pyridescence-1.0.2-cp312-cp312-manylinux_2_28_aarch64.whl (7.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pyridescence-1.0.2-cp311-cp311-win_amd64.whl (13.0 MB view details)

Uploaded CPython 3.11Windows x86-64

pyridescence-1.0.2-cp311-cp311-manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pyridescence-1.0.2-cp311-cp311-manylinux_2_28_aarch64.whl (7.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

pyridescence-1.0.2-cp310-cp310-win_amd64.whl (13.0 MB view details)

Uploaded CPython 3.10Windows x86-64

pyridescence-1.0.2-cp310-cp310-manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pyridescence-1.0.2-cp310-cp310-manylinux_2_28_aarch64.whl (7.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pyridescence-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b9f80b4127ece02beadae017e48282f23d555808da6a3aed3918efb498a5bfff
MD5 d93a8886a84f50ed5c2c22fa60ab865b
BLAKE2b-256 bff9f81da1da926a85890cc738fe00853b27ab564b665e285daac16f02e1fbe4

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.2-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3c20ce872f99f39e891439f333320d4dc6b4b7ceb37e3f793a76d3169eb69579
MD5 8100295be8198c040b488e886f671d2a
BLAKE2b-256 1336cf2c184ebd670de3fef1d45632f7768ed8666c4dd81e9e252daec5a39317

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.2-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e2c2e1bced3b5868e31d60f6de456eb02571bd862689755373568bd3a8933bc4
MD5 9030a9d1445a5a808170ef2a91a9c275
BLAKE2b-256 27299751cc06914d6eccc4f35dbeb80d0705bc9470620a900d787be6b22ceb08

See more details on using hashes here.

File details

Details for the file pyridescence-1.0.2-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b8c453b8fd008421f061e72018a2c2ff9852d02cc5c3e67757fde4d432ede7f0
MD5 4df353730dceb85a1017c45dabb2e9a3
BLAKE2b-256 ab15ae9f27af31a75601116b34cd20fa1f1b3bf69af2fb5df8faea1f097629e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cab20f3205ce55e261f0eb680ba730b1edc07492f5921807d1f66186550dc719
MD5 6dc7a2d09db3670e7c32f84ba2694ad4
BLAKE2b-256 cc605b3eb2e12415789449ca739f299374cd87b9061d71618fc8b02fbddcef76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5e319aa3a935554a1ccdbb8acef422f048f92ec04b19c3317e80c037d835638e
MD5 f392acb4b784c1e09a25bd01dbd1de2c
BLAKE2b-256 3114e0b9067900dc104e98dcde2c6a8177bac02034d42e41261473ad2f2db327

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 40c38b9e357a30f805e2da6cd49febc0dbf2d22a94dadc5a6deadd59a3438e40
MD5 3c1b56378e0a75902b598b6a6e3a9658
BLAKE2b-256 cc87ba4c3dc0b4855c2da4795491dfc45b850e40eef8d4c368e7ae70436426f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4060152ac22ea9276f14cfa93e576e3d23325290b6cf035a8c8c5e495fddb417
MD5 6cda1e7e68a152570c53c9d1a79552ea
BLAKE2b-256 bb94812d133182640135e0d81512eec64d4add2a6e0f3ec20281985080a38af3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7b9996866dec9df911f674023437c885af2851283692958fb385b69abcdc96f2
MD5 84668ced5c6e32906e8a055bf1f5542a
BLAKE2b-256 dd54c3f30980502a640bf4953d55222dceb98715ff07f38af04ad2d54b899fb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7733c133922229b4ae3cb5a281faf15714093e2d92541f0c0f339d4bbf078341
MD5 d37834a4f868b66fefb97d4f273271de
BLAKE2b-256 9d4d12b153af0cdfa289eef81f71e27f328512e64c4f5017e6c339ab0cb5d746

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0769eadb8982ca1794b2e321a1d0978d8b4b18c55172fdd28182ed64f0186889
MD5 20f9f98c8fba40a1ca4d75a62321590f
BLAKE2b-256 5e3198bbb0c68421324b8e799d2ac1f07042920375bd160b0dd15a43b090bdcb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c22c923bb9fa142a68d32900506a6407d1bbc54d909bdd11d533356dd3edd61c
MD5 5d0e5e800d8d091e4a97d969c65c56f2
BLAKE2b-256 cb58cf04ddee6160e5c705b00c8c7be579519f8d4987164a4e4e2230de267cc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ab7afb43e89a1a84d4458f1a8a455f00d44976dbe7cd86dd416c504362f2ac4b
MD5 1ae50f73f28e722111ea376b7185b580
BLAKE2b-256 928b767db7869cf3ca4618208137d4e72b7d72306b567d7173b71438c01e20ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 48d535c9de51499b7564395eb3116f631e04dd3ddcf67f6f980485c7b28d3007
MD5 43c509e9589927993224ed63dd510e4c
BLAKE2b-256 1c6e5d81f62f0796e29ad4f7b9558813ec0a6495656786b67b3aaf925ae41f9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b1343f3770e1a5d81e99bf77ccafc4bb52afcaa7124796a47c8f485de0ee6f7e
MD5 690fa57849bc2247a615c56ca0faaf63
BLAKE2b-256 1485a795286834aacf369158638752c909b3ed0c35e9e6e2e448674e5b014e3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyridescence-1.0.2-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 88a654d6fc5fc204d0b2a86bd94b35c548d74cadcbaf66fd8ae61a462f9093e9
MD5 da60616560fcb123001dd6bb8197230b
BLAKE2b-256 5288dc6c0a014d068214a6b2c4f595e2c87948ee4ee4a60c206cdabbd7eec7af

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