Here's a picture of developing the purlin rafter miter and bevel angle on the stick for an equal pitched roof.
Here's a drawing showing how to develop the bevel angles for the hip rafter or jack rafter on an equal pitched roof.
Drawing showing how to develop the purlin rafter miter and bevel angles for equal pitched roofs, without using any math or geometry.
Drawing showing how to develop the purlin rafter miter and bevel angles for an unequal pitched roof, without using any math and just a little bit of geometry.
Some step by step drawings showing how to draw out the purlin rafter miter and bevel angles on the stick for an equal pitched roof with a plan angle of 45°.
Here's a drawing showing how to draw out the purlin miter and bevel angles for an Octagon roof with a plan angle of 67.5°. You would have to draw this out on a piece of plywood then transfer the dimensions for the miter and bevel to the stick.