Giter Site home page Giter Site logo

jwhandley / graphyz Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 33.88 MB

A real-time force-directed graph layout visualization in Go

License: MIT License

Go 97.79% Shell 2.21%
force-directed-graph graph-algorithms-visualizer graph-layout raylib-go

graphyz's Introduction

Graphyz

A simple program for interactive real-time force directed graph layout simulation written with Go and Raylib. Loosely based on the Fruchterman-Reingold algorithm, d3-force, and force atlas 2. Uses the Barnes-Hut algorithm to optimize force calculations.

Work in progress.

Example

Usage

In order to compile you will need to have Go installed and to install the raylib bindings for Go (link in the references). You can then run

go build

and then launch Graphyz from the console:

./graphyz "path/to/you/graph.json"

It currently only accepts graphs in json format with the fields "nodes" and "links". The "nodes" field is an array of nodes which may contain the "name" and "group" fields that determine what is displayed on hover and the color of the nodes, respectively. The "links" field must contain a "source" and a "target" field that have the indices of the respective nodes in the nodes array. Each link can optionally have a "value" field that acts as an edge weight.

Here is a minimal example:

{
    "nodes": [{"name": "John Smith", "group": 0},{"name": "Jane Doe", "group": 1}],
    "links": [{"source": 0, "target": 1, "value": 5}]
}

References

To-do

  • Use GPU instancing to speed up rendering for large graphs
  • Add support for additional graph serialization formats
  • Hot reloading of graphs

graphyz's People

Contributors

ewa-t avatar jwhandley avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.