Fixed get_boundary_point and get_points_defining_boundary

This commit is contained in:
Grant Sanderson 2018-10-05 17:18:49 -07:00
parent 71d5851dd0
commit 4a226e1d22

View file

@ -703,7 +703,7 @@ class Mobject(Container):
# Getters
def get_points_defining_boundary(self):
return self.points
return self.get_all_points()
def get_num_points(self):
return len(self.points)
@ -743,7 +743,8 @@ class Mobject(Container):
def get_boundary_point(self, direction):
all_points = self.get_points_defining_boundary()
return all_points[np.argmax(np.dot(all_points, direction))]
index = np.argmax(np.dot(all_points, np.array(direction).T))
return all_points[index]
def get_z_index_reference_point(self):
# TODO, better place to define default z_index_group?