If you're doing it for real, to lay out a real roofing job, then just measure up and divide by 12.
As a general method, you can do it on paper, as a scale drawing.
Basically, you draw the length of the line to be divided, to a certain scale. e.g. a twenty-four inch line to represent a twenty-four foot roof. Then you draw a (e.g.) 36 inch line on a bit of paper and mark it off at 3 inch intervals to divide it into 12 sections. Pin one end of your 36 inch line to one end of your 24 inch line, and swivel it so that... I can't do the rest in words. Maybe you'll see what I,mgetting at. Good luck.