Mathematics in military fortifications