본문 바로가기

Programming/Manim code

[029]ParametricFunction

반응형
class ParametricFunctionTest(Scene):
    def construct(self):

        self.add(NumberPlane())
        self.para_function1()      

    def para_function1(self):
        func1 = lambda t: np.array([t, 0.5 * t,0])
        func2 = lambda t: np.array([t, 0.4*(t+3)*(t-2), 0])

        graph1 = ParametricFunction(
            func1,
            t_min=-4,
            t_max=4,
            color=YELLOW,
        )

        graph2 = ParametricFunction(
            func2,
            t_min=-4,
            t_max=4,
            color=YELLOW,
        )

        # self.add(graph1, graph2)
        self.add(graph2)
        self.wait()

 


        graph1 = ParametricFunction(
            func1,
            t_min=-4,
            t_max=4,
            color=YELLOW,
        )

 


        func2 = lambda t: np.array([t, 0.4*(t+3)*(t-2), 0])

        graph2 = ParametricFunction(
            func2,
            t_min=-4,
            t_max=4,
            color=YELLOW,
        )

반응형

'Programming > Manim code' 카테고리의 다른 글

[031]NumberLine  (0) 2020.05.11
[030]FunctionGraph  (0) 2020.05.11
[028]Decimal  (0) 2020.05.11
[027]Ellipse/Annulus/AnnularSector/Sector  (0) 2020.05.11
[026]Circle  (0) 2020.05.11