Calculates different parts of shapes