Initialize x,y properly while calculating poly shape geometry