Create CalculateXYandGradient.cpp