Text this: An optimized potential formula of the $ m \times n $ apple surface network and its application of potential in path planning