Sample source to convert svg path to svg polygon by sampling points on the path.