3d (three dimension) calculation