Пример #1
0
 def update_submobject(self, submobject, starting_sumobject, alpha):
     submobject.points[:, :] = starting_sumobject.points
     submobject.scale(interpolate(1, self.scale_value,
                                  there_and_back(alpha)),
                      about_point=self.scale_about_point)
     submobject.rotate(wiggle(alpha, self.n_wiggles) * self.rotation_angle,
                       about_point=self.rotate_about_point)
Пример #2
0
 def update_submobject(self, submobject, starting_sumobject, alpha):
     submobject.points[:, :] = starting_sumobject.points
     submobject.scale(
         interpolate(1, self.scale_value, there_and_back(alpha)),
         about_point=self.scale_about_point
     )
     submobject.rotate(
         wiggle(alpha, self.n_wiggles) * self.rotation_angle,
         about_point=self.rotate_about_point
     )
Пример #3
0
 def homotopy(x, y, z, t):
     alpha = (x - left_x) / (right_x - left_x)
     # lf = self.lag_factor
     power = np.exp(2.0 * (alpha - 0.5))
     nudge = there_and_back(t**power)
     return np.array([x, y, z]) + nudge * vect
Пример #4
0
 def homotopy(x, y, z, t):
     start_point = np.array([x, y, z])
     alpha = (x - left_x) / (right_x - left_x)
     power = np.exp(2 * (alpha - 0.5))
     nudge = there_and_back(t**power)
     return np.array([x, y, z]) + nudge * vect
Пример #5
0
 def homotopy(x, y, z, t):
     alpha = (x - left_x) / (right_x - left_x)
     # lf = self.lag_factor
     power = np.exp(2.0 * (alpha - 0.5))
     nudge = there_and_back(t**power)
     return np.array([x, y, z]) + nudge * vect