UnitCircle¶
Qualified name: manimextra.algebra.UnitCircle
- class manimextra.algebra.UnitCircle(point=0, radius=1.5, color=ManimColor('#58C4DD'), label_buff=0.2, font_size=32, fractions=True)¶
Bases:
VGroupA unit circle.
- Parameters:
point (float) – The point on the unit circle. Using this point we determine how many cycles have passed.
radius (float, optional) – The radius of the circle. Default to 1.5.
color (
manim.utils.color.Color, optional) – The color of the circle. Default to BLUE.label_buff (float, optional) – The buffer between the circle and the labels. Default to 0.2.
font_size (int, optional) – The font size of the labels. Default to 32.
fractions (bool, optional) – Whether to use fraction in the labels. Default to True.
Examples
Example: UnitCircleExample ¶
from manim import * from manimextra import * class UnitCircleExample(Scene): def construct(self): circle = UnitCircle() circle.add_point(PI / 2, "\dfrac{\pi}{2}") circle.add_point(PI, "\pi") self.add(circle)
Methods
Add a point to the unit circle.
change_right_pointget_abscissa_pointget_arcGet the center of the circle.
get_ordinate_pointhide_axeshide_horizontalhide_labelshide_verticalnormalize_labelspoint_at_angleshow_axesshow_horizontalshow_labelsshow_verticalAttributes
animateUsed to animate the application of any method of
self.animation_overridescolordepthThe depth of the mobject.
fill_colorIf there are multiple colors (for gradient) this returns the first one
heightThe height of the mobject.
n_points_per_curvesheen_factorstroke_colorwidthThe width of the mobject.
- _original__init__(point=0, radius=1.5, color=ManimColor('#58C4DD'), label_buff=0.2, font_size=32, fractions=True)¶
Initialize self. See help(type(self)) for accurate signature.
- add_point(point, label)¶
Add a point to the unit circle.
- Parameters:
point
label
- get_center()¶
Get the center of the circle. Override because the center of VGroup is different from the center of the circle.