This is the distance calculator for right now in Java

I have a few questions on some of the logic I would employ for increasing dimensions and editing the formulas according. Thus, this is only a simple 2 dimensional model of the end result.