arc

class janim.items.geometry.arc.ArcCenter(*args, arc_center: Vect = array([0., 0., 0.]), **kwargs)

Bases: MarkedItem, VItem

Base class for arc-related classes, inherited by Arc and AnnularSector

get_arc_center() ndarray

Get the center point corresponding to the arc

move_arc_center_to(point: Vect) Self

Move the arc center to the specified position

class janim.items.geometry.arc.Arc(*args, **kwargs)

Bases: GeometryShape, ArcCenter

Arc

  • start_angle represents the starting angle

  • angle represents the central angle

reshape(start_angle: float | None = None, angle: float | None = None, radius: float | None = None, *, n_components: int | None = None, arc_center: Vect | None = None) Self

Similar to passing parameters to __init__, reset the shape of the geometry item

Some values can be omitted to reuse previous ones; for detailed usage, refer to the Reshape Geometry tutorial

get_arc_length() float

Get the arc length

get_start_angle() float

Get the starting angle

get_stop_angle() float

Get the ending angle

class janim.items.geometry.arc.ArcBetweenPoints(*args, **kwargs)

Bases: Arc

Arc between two points

  • Pass start and end to represent the start and end points

  • angle represents the central angle

  • Other parameters are the same as Arc

reshape(start: Vect | None = None, end: Vect | None = None, *, angle: float | None = None) Self

Similar to passing parameters to __init__, reset the shape of the geometry item

Some values can be omitted to reuse previous ones; for detailed usage, refer to the Reshape Geometry tutorial

class janim.items.geometry.arc.Cmpt_VPoints_CircleImpl(*args, **kwargs)

Bases: Cmpt_VPoints, Generic

Further implementation of Cmpt_VPoints in circles

surround(item: Item, dim_to_match: int = 0, *, stretch: bool = False, buff: float = 0.25, root_only: bool = True, item_root_only: bool = False) Self

Similar to replace, but leaves buff spacing outward

property start_angle: float

Get the starting angle

at_angle(angle: float) ndarray

Get the point at the specified angle, e.g., angle=0 gets the right point, angle=PI / 2 gets the top point

property radius: float

Get the radius

class janim.items.geometry.arc.Circle(*args, **kwargs)

Bases: GeometryShape

Circle

  • Parameters are the same as Arc

  • Radius is specified by passing radius

points
reshape(radius: float | None = None, *, n_components: int | None = None) Self

Similar to passing parameters to __init__, reset the shape of the geometry item

Some values can be omitted to reuse previous ones; for detailed usage, refer to the Reshape Geometry tutorial

class janim.items.geometry.arc.Dot(*args, **kwargs)

Bases: Circle

Dot, default radius is 0.08

class janim.items.geometry.arc.SmallDot(*args, **kwargs)

Bases: Dot

Small dot, default radius is 0.04

class janim.items.geometry.arc.Ellipse(*args, **kwargs)

Bases: Circle

Ellipse

reshape(width: float | None = None, height: float | None = None) Self

Similar to passing parameters to __init__, reset the shape of the geometry item

Some values can be omitted to reuse previous ones; for detailed usage, refer to the Reshape Geometry tutorial

class janim.items.geometry.arc.AnnularSector(*args, **kwargs)

Bases: GeometryShape, ArcCenter

Annular sector

  • inner_radius: Inner circle radius

  • outer_radius: Outer circle radius

  • start_angle: Starting angle

  • angle: Central angle

  • arc_center: Center of the arc

reshape(inner_radius: float | None = None, outer_radius: float | None = None, start_angle: float | None = None, angle: float | None = None, *, arc_center: Vect | None = None, n_components: int | None = None) Self

Similar to passing parameters to __init__, reset the shape of the geometry item

Some values can be omitted to reuse previous ones; for detailed usage, refer to the Reshape Geometry tutorial

class janim.items.geometry.arc.Sector(*args, **kwargs)

Bases: Arc

Sector

For parameters, refer to Arc

reshape(start_angle: float | None = None, angle: float | None = None, radius: float | None = None, *, n_components: int | None = None, arc_center: Vect | None = None) Self

Similar to passing parameters to __init__, reset the shape of the geometry item

Some values can be omitted to reuse previous ones; for detailed usage, refer to the Reshape Geometry tutorial

class janim.items.geometry.arc.Annulus(*args, **kwargs)

Bases: GeometryShape

Annulus

  • inner_radius: Inner circle radius

  • outer_radius: Outer circle radius

  • arc_center: Center of the arc

reshape(outer_radius: float | None = None, inner_radius: float | None = None, *, arc_center: Vect | None = None, n_components: int | None = None) Self

Similar to passing parameters to __init__, reset the shape of the geometry item

Some values can be omitted to reuse previous ones; for detailed usage, refer to the Reshape Geometry tutorial