본문 바로가기

분류 전체보기

(284)
02-2. 푸리에 급수: 사인파의 합을 통해 복잡한 파형 만들기 앞장에서 "모든 신호는 단순한 신호의 조합으로 나타낼 수 있고, 이 단순한 신호는 사인파로 나타낼 수 있다"라고 했고, 사인파를 나타내는 방법을 알아봤다. 이제 실제로 사인파들을 합쳐서 복잡한 신호를 만들어 보자. 사인파는 사인 함수 혹은 코사인 함수로 나타낼 수 있고, 진폭($A$), 주파수($f$), 위상($\phi$)에 따라서 파형이 달라지는 것을 알아봤다. 이제 이 3가지 값을 달리하면서 사인파를 만들어내고, 만들어진 사인파들을 합쳐 보면서 어떤 규칙이 있는지 알아볼 것이다. 진폭이 다른 사인파의 합 먼저 주파수와 위상은 고정하고 진폭을 다르게 한 파형들을 합쳐보자. 고정하는 값 주파수($f$) = 5 위상($\phi$)=0 변화하는 값 진폭($A$): 1, 2, 3, 4 진폭이 1, 2, 3, ..
02-1. 푸리에 급수: 사인파의 표현 방법(사인함수, 각속도, 라디안) 앞 챕터에서 주기적인 신호를 표현하기 위한 가장 단순한 함수로 '사인 함수'를 후보로 해서 알아봤다. 사실 지금까지의 신호 이론은 '모든 신호는 단순한 신호의 조합으로 나타낼 수 있고, 이 단순한 신호는 사인파로 나타낼 수 있다'에서 출발한다.  그리고 실제로 모든 신호를 이러한 이론적 근거로 해서, 단순한 신호의 조합으로 나타낼 수 있다.  여기서 사인파는 사인 함수인 sine 혹은 cosine으로 나타낼 수 있는 파형으로, 정현파(正弦波)라 하고 영어로는 Sinusolidal Signal이라고 한다.  정현파라는 것은 '활'의 모양을 빗대어 부른 말로 사인파(sine wave)가 이에 해당한다. 코사인 함수로 이루어진 파형을 '여현파'라고도 하는데, 어차피 사인파를 평행이동 시키면 코사인파가 되기에,..
[Manim Collection]Table of Contents 1. Sine Curve by Rotating Dot around the Circle - Code: infograph.tistory.com/230 - Explain the code (by Korean): infograph.tistory.com/222 2. Sine/Cosine curve by rotating the dot around the circle - code: infograph.tistory.com/231 - explain the code (by Korean): infograph.tistory.com/223 3. Moving sine-wave - code: infograph.tistory.com/232 - explain the code (by Korean): infograph.tistory.com..
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 elbow-line between two dots code from manimlib.imports import * class ConnectObjects_ByLine(Scene): def construct(self): #1. Creates dots and display them dot1, dot2 = Dot(), Dot() dot1.shift(UP) connected_line = VGroup(Line(dot1.get_center(), dot2.get_center())) self.add(dot1, dot2, connected_line) #2. makes update function to draw the line between the dots def update_line(mob): x1, y1 = dot1.get_center()[0], dot1.get_cen..
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..