コード例 #1
0
ファイル: transform.py プロジェクト: safinsingh/manim-old
 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)
         )
コード例 #2
0
 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)
コード例 #3
0
ファイル: transform.py プロジェクト: coallaoh/manim
 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)
         )
コード例 #4
0
 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()
コード例 #5
0
 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,
         )
コード例 #6
0
ファイル: transform.py プロジェクト: coallaoh/manim
 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,
         )