Reverse calculation to bender XYZ diagram