Pyramid apothem calculation