Skip to content

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 and Mitsuba for data processing and rendering.

Installation

Hakowan can be installed via pip from PyPI:

pip install hakowan

Note that hakowan requires python 3.11 and above.

Quick start

Let shape.obj be a mesh that you would like to visualize:

import hakowan as hkw

base = hkw.layer("shape.obj")
hkw.render(base, filename="output.exr")

The above code creates a single visualization layer using shape.obj as the data. This layer is then rendered into an image named output.exr.

Hakowan's grammar decompose 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: define the mapping from data attributes to the available visual channels.

  • Transform: is the data transformation that should be carried out before visualization.

Citation

@software{hakowan,
    title = {Hakowan: A 3D Data Visualization Grammar},
    version = {0.1.0},
    year = 2023,
}