dearlordylord / fdg

A Force Directed Graph Framework for Rust.

Home Page:https://grantshandy.github.io/fdg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fdg

A Force-Directed Graph Library for Rust.

screenshot

View Demo Online

The goal of this project is to provide a force-directed graph drawing framework for Rust, as well as 2D and 3D visualizers/renderers that work on the web and desktop. It's built on top of the popular petgraph Rust library for interaction with already existing datasets in Rust.

In the simplest terms, the crates in this project allow you to take a graph and turn it into a pretty picture.

Crates

Name Version Docs License Description
fdg-sim Latest version Documentation MIT Runs the layout engine (simulation) and manages the position of nodes.
fdg-macroquad Latest version Documentation GPL-3.0 A demo visualizer that lets you interact with the graph in real time. (View Online)
fdg-img Latest version Documentation GPL-3.0 A simple SVG renderer for your graphs.
fdg-wasm NPM Package View Readme MIT A simple Webassembly wrapper of fdg-sim for use in Javascript.

Stability Note/Future Plans:

Note: There are some parts of this library that are certainly not as polished as I'd like them to be. My Rust API (and calculus) abilities have improved quite a bit since I first wrote this library, and there is a lot of room for improvement.

While the library is certainly usable, there are a few things that I'd like to address in an upcoming 1.0+:

  • Lack of "state of the art" (post 1996) force algorithms such as ForceAtlas2.
  • Only simple Euler method instead of more stable RK4 or Leapfrog integration.
  • Unnecessary Clone requirement for Node data (and associated "hot-clones" 😬).
  • Opaque Force struct containing a function pointer instead of an idiomatic Force trait.
  • Buggy node dragging in fdg-macroquad.
  • Awkwardly worded documentation.
  • Unpolished WASM API.
  • Sometimes buggy/inflexible DOT/GML/jsongraph parsers.
  • Broken self-connected nodes.

Resources

About

A Force Directed Graph Framework for Rust.

https://grantshandy.github.io/fdg

License:GNU General Public License v3.0


Languages

Language:Rust 82.4%Language:HTML 7.0%Language:Vue 6.9%Language:JavaScript 2.8%Language:Shell 0.5%Language:Makefile 0.2%Language:CSS 0.2%