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:
VGroup
A 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_point
get_abscissa_point
get_arc
Get the center of the circle.
get_ordinate_point
hide_axes
hide_horizontal
hide_labels
hide_vertical
normalize_labels
point_at_angle
show_axes
show_horizontal
show_labels
show_vertical
Attributes
animate
Used to animate the application of any method of
self
.animation_overrides
color
depth
The depth of the mobject.
fill_color
If there are multiple colors (for gradient) this returns the first one
height
The height of the mobject.
n_points_per_curve
sheen_factor
stroke_color
width
The 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.