3D visualization library for rapid prototyping of 3D algorithms
Project description
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 focusing on point-cloud-related algorithms) and is NOT intended to be a general-purpose visualization library with rich rendering capabilities.
on Ubuntu 20.04 / 22.04 / 24.04
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
- GLFW (zlib/libpng license)
- gl3w (Public domain)
- Dear ImGui (MIT license)
- ImGuizmo (MIT license)
- implot (MIT license)
- Eigen (MPL2 license)
- portable-file-dialogs (WTFPL license)
Installation
Install from source
# 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
# [Optional] Build and install python bindings
cd ..
pip install .
# [Optional2] Install stubs for autocomplete
pip install pybind11-stubgen
cd ~/.local/lib/python3.12/site-packages
# If you are using a virtual environment, you can find the path with:
# cd $(dirname $(which python))/../lib/python3.12/site-packages
pybind11-stubgen -o . pyridescence
Install from PPA [AMD64, ARM64]
Ubuntu 24.04
curl -s --compressed "https://koide3.github.io/ppa/ubuntu2404/KEY.gpg" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/koide3_ppa.gpg >/dev/null
echo "deb [signed-by=/etc/apt/trusted.gpg.d/koide3_ppa.gpg] https://koide3.github.io/ppa/ubuntu2404 ./" | sudo tee /etc/apt/sources.list.d/koide3_ppa.list
sudo apt update && sudo apt install -y libiridescence-dev
Ubuntu 22.04
curl -s --compressed "https://koide3.github.io/ppa/ubuntu2204/KEY.gpg" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/koide3_ppa.gpg >/dev/null
echo "deb [signed-by=/etc/apt/trusted.gpg.d/koide3_ppa.gpg] https://koide3.github.io/ppa/ubuntu2204 ./" | sudo tee /etc/apt/sources.list.d/koide3_ppa.list
sudo apt update && sudo apt install -y libiridescence-dev
Ubuntu 20.04
curl -s --compressed "https://koide3.github.io/ppa/ubuntu2004/KEY.gpg" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/koide3_ppa.gpg >/dev/null
echo "deb [signed-by=/etc/apt/trusted.gpg.d/koide3_ppa.gpg] https://koide3.github.io/ppa/ubuntu2004 ./" | sudo tee /etc/apt/sources.list.d/koide3_ppa.list
sudo apt update && sudo apt install -y libiridescence-dev
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
)
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 version
#!/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))
See documentation for details.
Some use examples in my academic works
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyridescence-0.1.8.tar.gz.
File metadata
- Download URL: pyridescence-0.1.8.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88fe4b7294ee257f82af30be4658c7722af4ff2b560336bfcc7bd7ffff950449
|
|
| MD5 |
37080aff46447579110c537b283675d4
|
|
| BLAKE2b-256 |
f74d9fbcdbbc9ea87744182226cb5dc9bf94d1b181691c4aacd1cdd2c8fead8f
|
File details
Details for the file pyridescence-0.1.8-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 9.1 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13016f569e7f71e956cee3d43f85bca59100e2f1fe8927ecb0b71537bb987d28
|
|
| MD5 |
e2651f9d59f727ba256e34fdee0a61f8
|
|
| BLAKE2b-256 |
58f1f254e39d12aedb4195635604bb4ac183aa1da6516ba303ccf10be11ddfca
|
File details
Details for the file pyridescence-0.1.8-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 7.8 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f70752f9ccbd572b3a77d434ca292d649af607cae76c465b411c703ae244a89
|
|
| MD5 |
94a096553884689ccdd5612e561c1a51
|
|
| BLAKE2b-256 |
38d9f1aee0fc586fd44259c40952a45a421539e531316fcaabe08840f59ed356
|
File details
Details for the file pyridescence-0.1.8-cp313-cp313-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp313-cp313-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 7.4 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33a84371a0548134de71b40cc9bbe35549553b39e95674d649d16fd037dae2c7
|
|
| MD5 |
3ea9aa7d263af1bc91547f03ea27a6e0
|
|
| BLAKE2b-256 |
a92c7aaaa3342bc8aaefd2266d45691332a143ad23310264ff6c0dabac9ab59b
|
File details
Details for the file pyridescence-0.1.8-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 9.1 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b9ceef58376d4a863bfb4fe43f500ee6c12306e5ca705e37cf241153555c05c
|
|
| MD5 |
a783213b3a546ecc9913c3d2ac139dd9
|
|
| BLAKE2b-256 |
3ef4daf2a04d6f3826863e6af79cc20b10efc471c69ceed7b27c5313c5f66dd6
|
File details
Details for the file pyridescence-0.1.8-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 7.8 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbf3937fc5c9ef916e734f440e8ffd41455bf8da1aaa51de78906e3cbf0864c0
|
|
| MD5 |
e6b14012abb7ffc242c6e877e4b8ac2e
|
|
| BLAKE2b-256 |
c8bde13f339dd043195008c027dc5e2267efafdf4ea39d8080035fa165b115cd
|
File details
Details for the file pyridescence-0.1.8-cp312-cp312-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 7.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f9d1ee394c9165213ddac2d13f2e7b39b303bc4e80fd247d0b7732c30352e64
|
|
| MD5 |
19cb3156ce87d8069ed793a004ea7d4a
|
|
| BLAKE2b-256 |
c150ef1419ee3136f4a7b64619554e89213ac351f4f1df641d84b3b1d43c23c6
|
File details
Details for the file pyridescence-0.1.8-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 9.1 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2f03be63e6e0a436e6f5f332efcd9f92a549a35e90611407d93c3ed26365806
|
|
| MD5 |
89f0449c3ec334ffa559ad95b639c559
|
|
| BLAKE2b-256 |
477e9f1a2d4b3c92317abf3d7a37635b7c91bce1ebeddb88dcb079c07ae4b12f
|
File details
Details for the file pyridescence-0.1.8-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 7.8 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e70179fe059e1e27e03547a33d9419201c3eaace9d4f4716dddb21a599ba186
|
|
| MD5 |
800cbc3c38406f139b7f8be7a55beadc
|
|
| BLAKE2b-256 |
eac2197d93deea0552cc165d3f99a168f5f6dc879eef10e82f3419c6b533fa94
|
File details
Details for the file pyridescence-0.1.8-cp311-cp311-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 7.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57e198dc14fb58d433c42f13822f8dd88a28e0806b6bb032bfb6f61e386c1888
|
|
| MD5 |
b4f2249d1bb074cb3ce774548e41ee94
|
|
| BLAKE2b-256 |
dce9c9c99056bced1a73e9f2d204bd3d7fd434bbe528001900ae64a72c178346
|
File details
Details for the file pyridescence-0.1.8-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 9.1 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ae19b5431fa25283f87766c7ad2fc68363670d0c03740ae6f8984715df80885
|
|
| MD5 |
e02aa63a83376ad90e3d1273c12fc45d
|
|
| BLAKE2b-256 |
d72cff7687662f1229e9dd2b496427c7220e76630950dc3914bc0509c5fd8ac6
|
File details
Details for the file pyridescence-0.1.8-cp310-cp310-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 7.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aef3e724346ee6a62ef6cdf905ad216cc44ad90bf0b4417e18f476594e806f5
|
|
| MD5 |
dab2b138332c99f75d0616555b0fe4e7
|
|
| BLAKE2b-256 |
8c810825e9ebe08156400566121ea2b4a9d34fa03f4a5f97992e58de38ddb717
|
File details
Details for the file pyridescence-0.1.8-cp310-cp310-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pyridescence-0.1.8-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 7.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f53f3b160dbc9d1891fde52bd3b766a3d673d247028aa67be1adfd04463d22f
|
|
| MD5 |
229b59c5c9d7a401340cc8344ae81035
|
|
| BLAKE2b-256 |
6434628ac986511e379fc934b09ef87fa0358e286923887544e40f892da3bf56
|