I don't quite get what you're looking to do. If you want to figure things out mathematically, that'll work fine, but the formulas are derived from the triangles in Bartok or Sim's work.

To me, that tanHip... formula is gobblygook. And I love trig. But it's not intuitively understandable.

Is there a particular roof problem that you're trying to work out, or just working at understanding the whole thing?

Do you know about the Hawkindales? All of those trig angles have already been worked out. There's an Excel spreadsheet and some graphics showing the angles here: https://www.tfguild.org/publications/software-tools.

A pretty excellent introduction to timber compound joinery is Will Beemer's articles in the the TFG Magazine called "When Roofs Collide." I think the Guild is opening up the vaults of back issues on the website pretty soon. I don't know how recent the archive will go.