makepolygon function moved to vector, getPosition return the left most point