ImplicitFunction

Qualified name: manim.mobject.functions.ImplicitFunction

class ImplicitFunction(func, x_range=None, y_range=None, min_depth=5, max_quads=1500, use_smoothing=True, **kwargs)[source]

Bases: manim.mobject.types.vectorized_mobject.VMobject

An implicit function.

Parameters
  • func (Callable[[float, float], float]) – The implicit function in the form f(x, y) = 0.

  • x_range (Optional[Sequence[float]]) – The x min and max of the function.

  • y_range (Optional[Sequence[float]]) – The y min and max of the function.

  • min_depth (int) – The minimum depth of the function to calculate.

  • max_quads (int) – The maximum number of quads to use.

  • use_smoothing (bool) – Whether or not to smoothen the curves.

  • kwargs – Additional parameters to pass into VMobject

Note

A small min_depth \(d\) means that some small details might be ignored if they don’t cross an edge of one of the \(4^d\) uniform quads.

The value of max_quads strongly corresponds to the quality of the curve, but a higher number of quads may take longer to render.

Examples

Example: ImplicitFunctionExample

../_images/ImplicitFunctionExample-1.png
from manim import *

class ImplicitFunctionExample(Scene):
    def construct(self):
        graph = ImplicitFunction(
            lambda x, y: x * y ** 2 - x ** 2 * y - 2,
            color=YELLOW
        )
        self.add(NumberPlane(), graph)

Methods

generate_points

Initializes points and therefore the shape.

init_points

Initializes points and therefore the shape.

Attributes

animate

Used to animate the application of a method.

animation_overrides

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.

generate_points()[source]

Initializes points and therefore the shape.

Gets called upon creation. This is an empty method that can be implemented by subclasses.

init_points()

Initializes points and therefore the shape.

Gets called upon creation. This is an empty method that can be implemented by subclasses.