So I've been trying to get my head around this for a week now. It's a practical problem, but the geometry seems more involved then I initially thought. When you want to attach a crown molding to a wall with a certain spring angle and wall angle, you can cut the molding laying flat with a miter saw, setting both miter and bevel angle to a certain degree, as illustrated here: https://www.blocklayer.com/crown-molding.aspx
The formula behind this calculator is as follows: $$Miter = \arctan(\cos(B) * \tan(A/2)) \\ Bevel = \arcsin(\sin(B) * \sin(A/2)) $$ With $A$ the wall angle and $B$ the spring angle.
Now my real question is, how to arrive at these formulas? I've made a number of drawings, but frankly they are all awful :) I've tried composing the normal vectors as in this answer: How to calculate compound angles
But didn't get too far. Can someone point me in the right direction?
Thanks!!
You can find a comprehensive explanation at the following link. If there is anything else you need help on, just leave a comment under this answer.
http://jansson.us/nsideboxderive.html