Tree-like affine transformation hierarchies are at the core of many tasks in rendering, interaction, and computer vision—from view frustum & occlusion culling and collision detection to motion retargeting and post-WIMP interfaces. Our recent publication, nub: A Rendering and Interaction Library for Visual Computing in Processing, introduces a functional and declarative API, built around a dataflow-based architecture that integrates rendering and event-driven interaction through a simple yet powerful scene graph model.
Built on top of Processing’s 2D/3D environment, nub offers a lightweight and expressive foundation for education, research, and experimentation in visual computing. It supports hierarchical rendering, multi-view scenes, view-based interaction, and extensible workflows for interactive content.
nub Overview
nub models a scene as a hierarchy of Nodes, each with local affine transformations and optional visual hints. Rendering is handled by one or more Scenes, which couple a PGraphics context with an eye node (camera). This separation of content and view enables multi-view setups, offscreen rendering, and advanced effects like shadow mapping.
Interaction is decoupled and event-driven: gestures (mouse, touch, etc.) are dispatched through the Scene, either by tag or node reference, allowing selective manipulation of nodes or views. Built-in utilities support spatial queries and visibility tests, enabling interaction logic to scale across complex scenes.
Figure 1 shows an example of a nub application: a node tree representing a human skeleton is rendered from three different viewpoints, each managed by an independent scene with its own camera and rendering context.

Node tree (left) and multi-view skeleton rendering (right)
Sources:
Charalambos, J.P. (2025). nub: A Rendering and Interaction Library for Visual Computing in Processing. Journal of Open Research Software, 13(1):4.
Charalambos, J.P. (2026). Render pipeline for p5.js v2 — pose and camera interpolation, space transforms, frustum visibility, HUD, post-processing pipe, picking, and declarative control panels..
p5.tree blog posts: A collection of experimental features, design ideas, and early previews shaping future versions of the p5.tree library.