A C++23 / Vulkan graphics project for rendering parametric curves in R³.
Current milestone: draw a parabola in a full-screen Vulkan window.
Long-term goals: NURBS curves, delay-differential equation trajectories in R³.
All fetched automatically by CMake FetchContent except the system packages below.
sudo apt update
sudo apt install -y \
clang-17 \
cmake \
ninja-build \
libvulkan-dev \
vulkan-tools \
vulkan-validationlayers \
libglfw3-dev \
glslang-tools \
pkg-configSet Clang 17 as default if needed:
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 100
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100The Linux CI path uses the checked-in Clang container:
docker build -t lra-nurbs-linux -f docker/linux-clang.Dockerfile .
docker run --rm -v "$PWD:/workspace" -w /workspace lra-nurbs-linux bash -lc \
'cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang-18 \
-DCMAKE_CXX_COMPILER=clang++-18 \
-DCMAKE_CXX_FLAGS="-stdlib=libc++ -fexperimental-library" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -fexperimental-library" \
-DENABLE_SANITIZERS=OFF \
-DNDDE_ENABLE_CLANG_TIDY=OFF &&
cmake --build build --parallel &&
ctest --test-dir build --output-on-failure --parallel 4'Native Linux builds use the same CMake shape:
# Configure (Debug — includes ASan + UBSan)
cmake -B build -G Ninja \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Debug
# Build
cmake --build build -j$(nproc)For a release build:
cmake -B build-rel -G Ninja \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Release
cmake --build build-rel -j$(nproc)./build/src/nurbs_dde
# ESC to quitctest --test-dir build --output-on-failure
# or directly:
./build/tests/nurbs_dde_testsnurbs_dde/
├── CMakeLists.txt
├── cmake/
│ └── CompileShaders.cmake Shader GLSL → SPIR-V helper
├── shaders/
│ ├── curve.vert Line-strip vertex shader (push-constant MVP)
│ └── curve.frag Colour passthrough fragment shader
├── src/
│ ├── math/
│ │ └── Vec3.hpp R³ types (thin glm wrapper)
│ ├── geometry/
│ │ ├── Curve.hpp/.cpp Abstract parametric curve p:[t0,t1]→R³
│ │ └── Parabola.hpp/.cpp y = at²+bt+c on XY plane
│ ├── renderer/
│ │ ├── VulkanContext.hpp/.cpp Instance / device / queues (vk-bootstrap)
│ │ ├── Swapchain.hpp/.cpp Swapchain management
│ │ ├── Pipeline.hpp/.cpp Line-strip graphics pipeline
│ │ └── Renderer.hpp/.cpp Frame loop, vertex buffer, sync
│ └── app/
│ ├── Application.hpp/.cpp Top-level orchestrator
│ └── main.cpp
└── tests/
├── CMakeLists.txt
├── test_vec3.cpp
├── test_parabola.cpp
└── test_curve.cpp
| Milestone | Status |
|---|---|
| Full-screen Vulkan window | ✅ |
| Draw parabola (line-strip) | ✅ |
| GTest suite (geometry + math) | ✅ |
| NURBS curve (de Boor algorithm) | ⏳ |
| DDE trajectory integration (RK4 / history buffer) | ⏳ |
| Camera / orbit control in R³ | ⏳ |
| Depth buffer (3-D curves) | ⏳ |
Curveabstract base —tessellate(n)gives uniform parameter samples;vertex_buffer(n)givesvec4data ready for a Vulkan vertex buffer. NURBS will override with knot-adaptive sampling.- Homogeneous coordinates (
w = 1) in vertex buffers are intentional — rational NURBS weights will live inw. - Push-constant MVP (64 bytes) — sufficient for 2-D curves today; a UBO will be added when camera + multiple objects are needed.
- Dynamic rendering (VK 1.3) — no
VkRenderPassobjects; cleaner for a geometry-exploration tool that changes frame structure frequently. - No staging buffer yet — vertex data is uploaded via host-visible memory. A proper staging pipeline will be introduced before adding large DDE history meshes.