mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 08:54:38 +08:00
Added Surround method to MObject, as well as special-case implementation of it to Circle
This commit is contained in:
@ -384,6 +384,10 @@ class Mobject(object):
|
||||
self.shift(mobject.get_center() - self.get_center())
|
||||
return self
|
||||
|
||||
def surround(self, mobject, dim_to_match = 0, stretch = False, buffer_factor = 1.2):
|
||||
self.replace(mobject, dim_to_match, stretch)
|
||||
self.scale_in_place(buffer_factor)
|
||||
|
||||
def position_endpoints_on(self, start, end):
|
||||
curr_vect = self.points[-1] - self.points[0]
|
||||
if np.all(curr_vect == 0):
|
||||
|
Reference in New Issue
Block a user