point_obstacle.show_value() # print(point_current.find_distance_between_points(point_obstacle)) if point_current.find_distance_between_points(point_obstacle) <= REPULSIVE_RANGE: rep_vector = repulsive_force(point_current, point_obstacle, polygon_centroid) else: rep_vector = Point(0, 0) att_vector.show_value() rep_vector.show_value() total_vector = total_potential_force(att_vector, rep_vector) # force_point = po # point_current.plot_line_between_two_point() # point_current.show_value() point_current.add_point(total_vector, STEP_SIZE) # point_current.show_value() path.append(Point(point_current.x, point_current.y)) step += 1 return path # Parameter: # path contains a sequence of x y coordinate # Return: # plot the sequence of dot on a figure def plot_path(path): x = [] y = [] for p in path: