5 Tutorial
wriverson edited this page 2026-09-19 10:38:45 +02:00

Prerequisites

  • If downloaded from master branch, all dependencies are present. Otherwise:
  • A C++23 compiler (recent GCC or Clang)
  • SFML 3 (graphics, window, system)
  • GLM
  • glad (an OpenGL loader; src/glad.c and headers are bundled at include/glad)
  • OpenGL 3.3 or newer
  • arial.ttf placed next to the executable (optional; the HUD and axis labels are disabled gracefully without it)

Building

make                                        # build and run with the default data file
make clean                                  # remove object files and the executable
make open FILES="a.surf b.surf c.surf"      # opens several synchronised windows

The Makefile compiles main.cpp, axisWidget.cpp, and src/glad.c with -std=c++23 -O2 -Wall -Wextra.

Running

./sfml-app                                  # default data file
./sfml-app surface_data/myconfig.surf       # specific configuration

On startup the program:

  1. Loads the vortex surface elements from the given .surf file.
  2. Parses the temporal lattice extent Nt from the filename (the first t followed by digits, e.g. ...t64... means Nt = 64).
  3. Looks for a companion hypercube file hypercube_t<Nt>.surf in the same directory and loads it as the mode 1 reference geometry.

Test data

generate_hypercube.py writes surface_data/hypercube_t64.surf, the boundary surface of a 4D hypercube of size 323x64:

python3 generate_hypercube.py

It is useful for getting a feel for 4D rotation before loading real vortex data. The hypercubes for t = 4 and t = 64 have already been generated. Use accordingly for other lattice sizes.