Generating equidistance points along the boundary of a polygon but CW/CCW
问题 Suppose I have the vertices of a polygon and they are all oriented CCW. I wish to generate n equidistance points along the boundary of this polygon. Does anyone know of any existing package that does this, and if not, an algorithm one can use? I am working in Python. For example, here is what I would like if the polygon in question is a rectangle: enter image description here 回答1: shapely : import shapely.geometry as sg import shapely.affinity as sa import matplotlib.pyplot as P import numpy