Here is Canvas object wihch demonstrate the problem.

Before stresses in the beam can be computed, two important properties related to the shape of the cross section must be calculated:

• the location of the centroidal axis

• the moment of inertia of the cross section about its centroidal axis