diff --git a/crazy_functions/数学动画生成manim.py b/crazy_functions/数学动画生成manim.py index 969ed3d..58749d9 100644 --- a/crazy_functions/数学动画生成manim.py +++ b/crazy_functions/数学动画生成manim.py @@ -162,45 +162,4 @@ class MyAnimation(Scene): self.wait() ``` - -``` -# SinAndCosFunctionPlot -class MyAnimation(Scene): - def construct(self): - axes = Axes( - x_range=[-10, 10.3, 1], - y_range=[-1.5, 1.5, 1], - x_length=10, - axis_config={"color": GREEN}, - x_axis_config={ - "numbers_to_include": np.arange(-10, 10.01, 2), - "numbers_with_elongated_ticks": np.arange(-10, 10.01, 2), - }, - tips=False, - ) - axes_labels = axes.get_axis_labels() - sin_graph = axes.plot(lambda x: np.sin(x), color=BLUE) - cos_graph = axes.plot(lambda x: np.cos(x), color=RED) - - sin_label = axes.get_graph_label( - sin_graph, "\\sin(x)", x_val=-10, direction=UP / 2 - ) - cos_label = axes.get_graph_label(cos_graph, label="\\cos(x)") - - vert_line = axes.get_vertical_line( - axes.i2gp(TAU, cos_graph), color=YELLOW, line_func=Line - ) - line_label = axes.get_graph_label( - cos_graph, "x=2\pi", x_val=TAU, direction=UR, color=WHITE - ) - - plot = VGroup(axes, sin_graph, cos_graph, vert_line) - labels = VGroup(axes_labels, sin_label, cos_label, line_label) - self.add(plot, labels) - -``` - - - - """ \ No newline at end of file