Please initialise tempX and tempY with Center values.
int centerX = 200, centerY = 200;
int tempX = 200, tempY= 200;
When your application starts, it draws your screen with myDisplay() function.
In myDisplay() one line draw code exists. Which will draw a line from Center of window to an un-intialised position.
And it create an unexpected line at startup :)