The Algorithm for Calculating the Minimal Disk