davidnilsson.dev

Graph

Write a graph the way maths does (V and E, or a - b) and it draws itself, edges hanging like strings. Drag things around, add nodes and connect them; the notation keeps up, and the address bar keeps the graph.

V = {a, b}, E = {{a, b}} for an undirected edge or (a, b) for a directed one, or lines like a - b, a -> b. LaTeX works too.

About this graph

Nodes
|V| = 5
Edges
|E| = 5
  • Connected
  • Has a cycle
  • Mixed edges
Degrees
  • deg(a) = 2
  • deg(b) = 2
  • deg(c) = 3
  • deg(d) = 2 (0 in, 1 out)
  • deg(e) = 1 (1 in, 0 out)
Pointer

Drag nodes to move them. In Connect (or holding Shift), drag from a node to another to join them, or into empty space to grow a new node. Double-click empty space for a node. Click something and press Delete to remove it. Drag the background to pan.