gen function

generate points in polygon