How Armour hits are calculated

Does anyone know how explosives hitting a tank register damage? i.e Rear armour is weakest, shooting an RPG at this spot is calculated by actually where you hit the tank as opposed to your position in relation to the tank when shooting the explosive?

Thanks