manim.mobject.geometry.TangentLine

class TangentLine(vmob, alpha, length=1, d_alpha=1e-06, **kwargs)[source]

Bases: manim.mobject.geometry.Line

Constructs a line tangent to a VMobject at a specific point.

Parameters
  • vmob (VMobject) – The VMobject on which the tangent line is drawn.

  • alpha (float) – How far along the shape that the line will be constructed. range: 0-1.

  • length (float, optional) – Length of the tangent line.

  • d_alpha (float, optional) – The dx value

  • kwargs (Any) – Additional arguments to be passed to Line

Examples

Example: TangentLineExample

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

class TangentLineExample(Scene):
    def construct(self):
        circle = Circle(radius=2)
        line_1 = TangentLine(circle, alpha=0.0, length=4, color=BLUE_D) # right
        line_2 = TangentLine(circle, alpha=0.4, length=4, color=GREEN) # top left
        self.add(circle, line_1, line_2)

Methods

Attributes

animate

Used to animate the application of a method.

depth

The depth of the mobject.

height

The height of the mobject.

width

The width of the mobject.