Draw waves by several moving circles
Code from manimlib.imports import * class Rotate_Circles(Scene): def construct(self): self.draw_axis() self.rotate_dots() self.wait() def draw_axis(self): #1. axis x_start = np.array([-6.5,0,0]) x_axis = Line(x_start, np.array([6, 0, 0]), color=BLUE, ) y_axis = Line(np.array([-4, 2, 0]), np.array([-4, -2, 0]), color=BLUE) self.add(x_axis, y_axis) #2. circles circles_radius = [1, 0.5, 0.3, 0.2, 0..
Draw summed Sine-wave (Two Circles)
code from manimlib.imports import * class TwoCircle_RightSide(Scene): def construct(self): self.show_axis() self.show_circle_dot() self.draw_cycle() self.wait() def show_axis(self): self.x_start = np.array([-6.5,2,0]) x_axis = Line(self.x_start, np.array([6, 2, 0])) y_axis = Line(np.array([-5, 0, 0]), np.array([-5, 0, 0])) self.add(x_axis, y_axis) self.circle1_origin = np.array([-5, 2, 0]) self...
Draw moving sine-wave changing the amplitude
Code from manimlib.imports import * class ChangeAmp_SineCurve(Scene): def construct(self): self.show_axis() self.show_circle_dot() self.draw_several_cycle() self.wait() def show_axis(self): self.x_start = np.array([-6,0,0]) x_axis = Line(self.x_start, np.array([6, 0, 0])) y_axis = Line(np.array([-4, -2, 0]), np.array([-4, 2, 0])) self.add(x_axis, y_axis) self.origin_point = np.array([-4, 0, 0]) ..
Draw moving wave by the rotating dots
Code from manimlib.imports import * class LongSineCurve(Scene): def construct(self): self.show_axis() self.show_circle_dot() self.draw_several_cycle() self.wait() def show_axis(self): self.x_start = np.array([-6,0,0]) x_axis = Line(self.x_start, np.array([6, 0, 0])) y_axis = Line(np.array([-4, -2, 0]), np.array([-4, 2, 0])) self.add(x_axis, y_axis) self.origin_point = np.array([-4, 0, 0]) self.c..
Moving Sine-Wave
Code from manimlib.imports import * class MovingWave(Scene): def construct(self): self.draw_axis() self.draw_sine_wave() def draw_axis(self): x_axis = Line(np.array([-4,0,0]), np.array([4,0,0])) y_axis = Line(np.array([-4,2,0]), np.array([-4,-2,0])) self.add(x_axis, y_axis) self.x_min = -4 self.x_max = 4 def draw_sine_wave(self): sine_wave = self.get_sine_wave() vt = ValueTracker(0) def update_w..
Sine/Cosine curve by rotating the dot around the circle
Code from manimlib.imports import * class SineCosine_Curve(Scene): def construct(self): self.show_axis() self.show_circle() self.move_dot_and_draw_curve() self.wait() def show_axis(self): x_start = np.array([-6,2,0]) x_end = np.array([3,2,0]) y_start = np.array([-4,-3,0]) y_end = np.array([-4,3.5,0]) x_axis = Line(x_start, x_end) y_axis = Line(y_start, y_end) self.add(x_axis, y_axis) self.add_xy..
Sine-curve by rotating dot around the circle
Code from manimlib.imports import * class Sine_Curve(Scene): def construct(self): self.show_axis() self.show_circle() self.move_dot_and_draw_curve() self.wait() def show_axis(self): x_start = np.array([-6,0,0]) x_end = np.array([6,0,0]) y_start = np.array([-4,-2,0]) y_end = np.array([-4,2,0]) x_axis = Line(x_start, x_end) y_axis = Line(y_start, y_end) self.add(x_axis, y_axis) self.add_x_labels()..