Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<meta charset="utf-8">
<canvas></canvas>
<title>Tr3 D3 Test</title>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script>
/* expanded tr3 graph
a{b1 b2}:{c1 c2}
a^c1->a^c2
@musesum
musesum / Tr3 Robot
Last active July 16, 2016 16:15
Test Tr3 Definition of robot
// script representing a crude robot
limb {arm {hand {finger[5]}} leg {foot}}
robot:{left right}:limb
robot^^ <-> .* // connect every node to its children
space {pos:(x y z):(0...1) ang:(a b c):(%360) mm:(0...3000)}
robot^^{space} // recursively attach space to every node
// resulting output via c++11 backend