Real time, cross platform visualizations with zero dependencies for the N-body package REBOUND

๐Ÿ“… 2026-02-02
๐Ÿ›๏ธ Journal of Visualization and Interaction
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
This work proposes a zero-dependency, cross-platform solution for real-time 3D scientific visualization that addresses the limitations of traditional toolsโ€”such as poor cross-platform support, high development barriers, and substantial maintenance costsโ€”by leveraging the web browser as a unified rendering backend. The approach reuses existing OpenGL code via WebAssembly and integrates a built-in HTTP server to enable both local and remote interaction. Requiring no external dependencies, the framework seamlessly supports Jupyter Notebook, standalone browser environments, and conventional OpenGL contexts. Demonstrated through its integration with REBOUND, the solution achieves full platform compatibility, low usability barriers, and high maintainability, offering significant value for scientific research, education, and remote collaboration.

Technology Category

Application Category

๐Ÿ“ Abstract
Background Visualizations have become an indispensable part of the scientific process. A vibrant ecosystem of visualization tools exists, catering to a wide variety of different needs. Real-time visualizations of numerical simulations offer scientists immediate feedback about the status of their simulations and can also be valuable educational and public outreach tools. Current Challenges Developing a visualization tool with support for different operating systems, CPU/GPU architectures, and programming languages can be a challenge. It is common to use one or more graphics or UI libraries to act as abstraction layers and hide the underlying complexity. Whereas external libraries greatly simplify the initial programming effort, we argue that relying on them introduces new dependencies and problems, such as a higher entry barriers for new developers and users, and uncertainty regarding long-term support. Proposed Solution In this paper we present a new approach for real time visualizations which we have implemented for the N-body package REBOUND (Rein and Liu 2012). We propose to use a web browser to handle GPU accelerated rendering. This enables us to offer 3D, interactive visualizations on all major operating systems. What makes our new approach unique is that we achieve this without the need for any external libraries. We utilize WebAssembly and emscripten to reuse existing OpenGL visualization code. Using communication via HTTP and a custom built-in web server, we are able to provide both local and remote real time visualizations. In addition to the browser based real time visualization, our approach offers other additional operating modes, including simulations running entirely within the browser, visualizations within jupyter notebooks, and traditional standalone visualizations using OpenGL. We focus on the implementation in REBOUND but the concepts and ideas discussed can be applied to many other areas in need of scientific and non-scientific real time visualizations.
Problem

Research questions and friction points this paper is trying to address.

real-time visualization
cross-platform
zero dependencies
N-body simulation
scientific visualization
Innovation

Methods, ideas, or system contributions that make the work stand out.

WebAssembly
real-time visualization
cross-platform
zero dependencies
GPU-accelerated rendering
๐Ÿ”Ž Similar Papers
No similar papers found.