k=1, show_member_weights=True, show_coordinates=False) # distance^2 b.generate_visualisation(member_weight=True, k=2, show_member_weights=True, show_coordinates=False) # distance^3 b.generate_visualisation(member_weight=True, k=3, show_member_weights=True, show_coordinates=False) # Optimize bridge b.optimize() # Micheal T. Heath: Scientific Computing [6, Chapter 2] p1 = Point((0, 0), is_anchored_x=True, is_anchored_y=True) p2 = Point((1, 0)) p3 = Point((1, 1)) p4 = Point((2, 1)) p5 = Point((2, 0)) p6 = Point((3, 0)) p7 = Point((3, 1)) p8 = Point((4, 0), is_anchored_y=True) p1.add_neighbours([p2, p3]) p2.add_neighbours([p1, p3, p5]) p3.add_neighbours([p1, p2, p4, p5]) p4.add_neighbours([p3, p5, p7])