Rafter Ties and Shallow Pitch Roofs, Jordan Truesdell, Journal of Light Construction, October 2008
(Note this is a site other than Journal of Light Construction, it's just more convenient to link to it).
The website this article is "held" on has some discussion:
The Mathematics of Rafter and Collar Ties, Math Encounters Blog, 2010
Links are working as of 6/7/2024, please use feedback if it stops working. If there are other forum threads worth adding, feel free to say so, too.
A few former threads on the subject:
Roof Rafter Collar Tie Calculations/Design, 2019 (This contains some conflation between a collar tie, which is not a structurally effective way to make this kind of roof work).
Wood Roof - Thrust, 2020. This gets a bit detoured and there's a whole sequence with RISA modeling snafus, which is probably quite informative.
The Wood Frame Construction Manual also has the formula. Can't find it right now...