set = sys.argv[1] method = sys.argv[2] show = len(sys.argv) > 3 points = [] if set == 'a': points = generate_a(100, -100, 100) if set == 'b': points = generate_b(100, 0, 0, 10) if set == 'c': points = generate_c(100, -10, 10, -10, -10, 10, -10, 10, 10) if set == 'd': points = generate_d(25, 20, 10, 0, 10, 10, 0, 10) vis = Plot(points) vis.draw() plt.savefig(set + '_' + method + '.png') plot = AnimatedPlot(points) points_copy = deepcopy(points) for point in points_copy: point.color = 'r' hull = [] steps = [] if method == 'g':
if __name__ == '__main__': argv = sys.argv set = sys.argv[1] method = sys.argv[2] points = [] if set == 'a': points = generate_a(1000, -100, 100) if set == 'b': points = generate_b(1000, 0, 0, 10) if set == 'c': points = generate_c(1000, -10, 10, -10, -10, 10, -10, 10, 10) if set == 'd': points = generate_d(250, 200, 10, 0, 10, 10, 0, 10) vis = Plot(points) vis.draw() plt.savefig('noanim_' + set + '_' + method + '.png') # vis.show() plot = Plot(points) points_copy = deepcopy(points) for point in points_copy: point.color = 'r' hull = [] steps = []