Skip to content
danacPublic

About

GRAFT - Graph Rendering and Force Toolkit

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

graft logo

GRAFT - Graph Rendering And Force Toolkit

Force-directed graph layout, ported twice while learning: once in C++ with OpenGL, once in Rust with wgpu.


About

graft is a d3-force-inspired force simulation engine, implemented as two independent learning projects now merged into a single repository:

  • graft-gl — C++ / OpenGL
  • graft-wgpu — Rust / wgpu

Both implement the same underlying physics (many-body repulsion, links, centering, collision) so the two can be compared side by side as different takes on the same problem, in different languages and graphics APIs.

The name nods to graph nodes grafted together from two branches of the same idea — and, conveniently, to Kraft, German for force.

Project structure

graft/
├── graft-gl/       # C++ / OpenGL port
├── graft-wgpu/     # Rust / wgpu port
├── assets/         # logo, favicon, screenshots
└── README.md

(adjust to match your actual folder names once merged)

Features

  • Force simulation: many-body (charge), link, center, and collision forces
  • Real-time interactive rendering
  • Two independent implementations for comparison:
    • graft-gl: C++, OpenGL
    • graft-wgpu: Rust, wgpu

getting started

graft-gl (C++ / OpenGL)

cd graft-gl
mkdir build && cd build
cmake ..
cmake --build .
./src/particle_system_gl

(update with your actual build system / dependencies, e.g. GLFW, GLEW/GLAD)

graft-wgpu (Rust / wgpu)

cd graft-wgpu
cargo run --bin graph_gui 

Acknowledgments

  • d3-force by Mike Bostock — the algorithm reference both ports are based on

About

GRAFT - Graph Rendering and Force Toolkit

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages