隐函数图象#

class ImplicitFunctionGraph(Scene):
    def construct(self):
        ax = Axes()
        graph = ax.plot_implicit_curve(
            lambda x, y: y**2 + 2 * x,
            color=RED
        )
        self.add(ax)
        self.play(Create(graph, run_time=2))

这里的lambda x, y: y**2 + 2 * x表示F(x, y) = y^2 + 2x = 0

关键词:ImplicitFunction plot