02-2. 푸리에 급수: 사인파의 합을 통해 복잡한 파형 만들기
앞장에서 "모든 신호는 단순한 신호의 조합으로 나타낼 수 있고, 이 단순한 신호는 사인파로 나타낼 수 있다"라고 했고, 사인파를 나타내는 방법을 알아봤다. 이제 실제로 사인파들을 합쳐서 복잡한 신호를 만들어 보자. 사인파는 사인 함수 혹은 코사인 함수로 나타낼 수 있고, 진폭($A$), 주파수($f$), 위상($\phi$)에 따라서 파형이 달라지는 것을 알아봤다. 이제 이 3가지 값을 달리하면서 사인파를 만들어내고, 만들어진 사인파들을 합쳐 보면서 어떤 규칙이 있는지 알아볼 것이다. 진폭이 다른 사인파의 합 먼저 주파수와 위상은 고정하고 진폭을 다르게 한 파형들을 합쳐보자. 고정하는 값 주파수($f$) = 5 위상($\phi$)=0 변화하는 값 진폭($A$): 1, 2, 3, 4 진폭이 1, 2, 3, ..
Draw dots with several circles
Code from manimlib.imports import * # draw dots instead the lines class Rotate_Circles3_DrawDots(Scene): def construct(self): running_time = 10.2 ### 1. circles and dots circles_radius = [2.5, 1, 0.8, 0.4, 0.1] circle_orgins = [ np.array([0, 0, 0]), np.array([0 + 2.5, 0, 0]), np.array([2.5 + 1, 0, 0]), np.array([3.5 + 0.8, 0, 0]), np.array([4.3 + 0.1, 0, 0]), ] curve_start = np.array([4.4, 0, 0]..
Draw line with rotating circles
Code # draw curve by the last dot class Rotate_Circles2(Scene): def construct(self): running_time = 10.2 ### 1. circles and dots circles_radius = [2.5, 1, 0.8, 0.4, 0.1] circle_orgins = [ np.array([0, 0, 0]), np.array([0 + 2.5, 0, 0]), np.array([2.5 + 1, 0, 0]), np.array([3.5 + 0.8, 0, 0]), np.array([4.3 + 0.1, 0, 0]), ] curve_start = np.array([4.4, 0, 0]) circles = [Circle(radius=r, name=str(i)..
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..