d3.js - how to automatically calculate arc lengths in radial dendrogram?

I'm creating a modified version of Mike Bostock's hierarchical edge bundling diagram: http://mbostock.github.com/d3...