ai_helper.cartesian_coords(): slight simplification of equation