Lumen
A simple scripting language for graphics rendering.
Lumen is a simple scripting language for graphics rendering. It compiles to high performance C code under the hood, using the Raylib graphics library.
Lumen allows the user to write concise, high-level code to create graphical simulations, games, and visualizations without needing to require boilerplate code to manage graphics resources. Lumen can generate both interactive graphics (e.g., games, simulations) and render video output (e.g., visualizations, generative art).
See the manual for details on language features and built-in functions.
Fractal Tree
|
Bouncing Ball
|
bounce.mp4 |
To install Lumen, follow these steps:
Go to the releases page and download the .zip file for the latest release. Extract the contents and run the install.sh script to install Lumen globally on your system.
Alternatively, you can build Lumen from source using the instructions below.
-
Clone the repository:
git clone https://github.com/dipamsen/lumen.git cd lumen -
Install OCaml and Dune: https://ocaml.org/install
opam install dune opam install . --deps-only -
Build the project:
dune build
-
Run tests to verify everything is working:
dune runtest
-
Install other runtime dependencies using your system's package manager:
libGL(OpenGL library)sudo apt update sudo apt install libgl1-mesa-dev # (for Ubuntu/Debian)ffmpeg(for video rendering) (Check if it's already installed by runningffmpeg -versionin your terminal)sudo apt install ffmpeg # (for Ubuntu/Debian)
-
Install lumen globally:
./install.sh
-
Optionally, add
lumento your PATH. This will allow you to runlumenfrom any directory (in the current terminal session):On Linux:
export PATH="$HOME/.lumen/bin:$PATH"
On Windows:
$env:PATH += ";$HOME\.lumen\bin"
lumen run <filename.lm>
MIT License