在代码中,波纹管点需要根据x的值排列,然后不像我下面那样手动计算距离,而是自动计算未知点数
class line(Point):
def __init__(self, *args):
self.n = [Point(p[0], p[1]) for p in args]
# here the points need be arranged
# according to the values of x
# and then calculate the distance not manually
# as I did below but automatically
# with an unknown number of points
print(self.n)