Hakowan: A 3D Data Visualization Grammar¶

Hakowan is a 3D data visualization grammar based on the concept of The Grammar of Graphics. It is designed for creating compelling SIGGRAPH-quality 3D data visualizations with minimal setup. It provides a concise, high-level declarative API in python and is powered by project Lagrange for geometry processing and supports three rendering backends: WebGL (default, interactive browser viewer), Mitsuba (photorealistic), and Blender (Cycles/EEVEE).
Installation¶
Hakowan can be installed via pip from PyPI. The WebGL backend ships with the
base install; the heavier Mitsuba and Blender backends are optional extras:
pip install hakowan # WebGL only (default)
pip install hakowan[mitsuba] # add the Mitsuba backend
pip install hakowan[blender] # add the Blender backend (Python 3.13)
pip install hakowan[mitsuba,blender] # all backends
Note that Hakowan requires Python 3.11 and above (Python 3.13 for the Blender backend).
Quick start¶
Let shape.obj be a mesh that you would like to visualize:
The above code creates a single visualization layer using
shape.obj as the data. This layer is then rendered with the
default WebGL backend into an interactive viewer named output.html, which you
can open in any modern browser.
Hakowan's grammar decomposes a 3D visualization into layers, where each layer provides a specification of one or more of the following items:
-
Data: consists of the geometry as well as attributes associated with the geometry.
-
Mark: determines the geometry type (e.g. point, curve or surface).
-
Channel: defines the mapping from data attributes to the available visual channels.
-
Transform: is the data transformation that should be carried out before visualization.