Skip to content

Instantly share code, notes, and snippets.


codercat acodercat

View GitHub Profile
Sciss / binarytree.gvpr
Created Jun 6, 2012
GraphViz formatting script for binary trees
View binarytree.gvpr
// from Emden Gansner
// requires GraphViz 2.28.0 (fails with 2.26.3 at least)
double tw[node_t]; // width of tree rooted at node
double nw[node_t]; // width of node
double xoff[node_t]; // x offset of root from left side of its tree
double sp = 36; // extra space between left and right subtrees
double wd, w, w1, w2;
double x, y, z;