Function for create polygon