def update_config(self, **kwargs): Animation.update_config(self, **kwargs) if "path_arc" in kwargs: self.path_func = path_along_arc( kwargs["path_arc"], kwargs.get("path_arc_axis", OUT) )
def __init__(self, function, mobject, **kwargs): if "path_func" not in kwargs: self.path_func = path_along_arc(np.log(function(complex(1))).imag) ApplyPointwiseFunction.__init__( self, lambda x_y_z: complex_to_R3(function(complex(x_y_z[0], x_y_z[1]))), instantiate(mobject), **kwargs)
def generate_points(self): if self.path_arc is None: self.set_points_as_corners([self.start, self.end]) else: path_func = path_along_arc(self.path_arc) self.set_points_smoothly([ path_func(self.start, self.end, alpha) for alpha in np.linspace(0, 1, self.n_arc_anchors) ]) self.account_for_buff()
def init_path_func(self): if self.path_func is not None: return elif self.path_arc == 0: self.path_func = straight_path else: self.path_func = path_along_arc( self.path_arc, self.path_arc_axis, )