Calculation of a rotating cylinder to implement in MatLab code

Mar 2020
I am looking for some help to solve what is probably an easy problem. This rotating cylinder has 4 sections and is filled with a certain percentage of solid (the area A-B''-E-C). Now I am interested to calculate the cross section and the contact areas solid/gas and solid/wall of the whole cylinder (all sections included).
My problem is, that as the cylinder rotates, all the areas are constantly changing.
My goal is to implement the calculation of the whole cylinder in my MatLab code.

Any ideas to solve this problem?