mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 05:24:22 +08:00
Small fix in fourier file
This commit is contained in:
@ -1273,7 +1273,7 @@ class WrapCosineGraphAroundCircle(FourierMachineScene):
|
|||||||
def get_winding_frequency_label(self):
|
def get_winding_frequency_label(self):
|
||||||
freq = self.initial_winding_frequency
|
freq = self.initial_winding_frequency
|
||||||
winding_freq_label = VGroup(
|
winding_freq_label = VGroup(
|
||||||
DecimalNumber(freq, num_decimal_places = 2),
|
DecimalNumber(freq, num_decimal_places=2),
|
||||||
TextMobject("cycles/second")
|
TextMobject("cycles/second")
|
||||||
)
|
)
|
||||||
winding_freq_label.arrange_submobjects(RIGHT)
|
winding_freq_label.arrange_submobjects(RIGHT)
|
||||||
@ -1639,8 +1639,14 @@ class DrawFrequencyPlot(WrapCosineGraphAroundCircle, PiCreatureScene):
|
|||||||
added_anims = kwargs.get("added_anims", [])
|
added_anims = kwargs.get("added_anims", [])
|
||||||
anims = [self.get_frequency_change_animation(self.graph, new_freq)]
|
anims = [self.get_frequency_change_animation(self.graph, new_freq)]
|
||||||
if hasattr(self, "winding_freq_label"):
|
if hasattr(self, "winding_freq_label"):
|
||||||
freq_label = [sm for sm in self.winding_freq_label if isinstance(sm, DecimalNumber)][0]
|
freq_label = [
|
||||||
anims.append(ChangeDecimalToValue(freq_label, new_freq))
|
sm for sm in self.winding_freq_label
|
||||||
|
if isinstance(sm, DecimalNumber)
|
||||||
|
][0]
|
||||||
|
self.add(freq_label)
|
||||||
|
anims.append(
|
||||||
|
ChangeDecimalToValue(freq_label, new_freq)
|
||||||
|
)
|
||||||
if hasattr(self, "v_lines_indicating_periods"):
|
if hasattr(self, "v_lines_indicating_periods"):
|
||||||
anims.append(self.get_period_v_lines_update_anim())
|
anims.append(self.get_period_v_lines_update_anim())
|
||||||
if hasattr(self, "center_of_mass_dot"):
|
if hasattr(self, "center_of_mass_dot"):
|
||||||
@ -1838,8 +1844,8 @@ class ShowLinearity(DrawFrequencyPlot):
|
|||||||
"high_freq_color": YELLOW,
|
"high_freq_color": YELLOW,
|
||||||
"low_freq_color": PINK,
|
"low_freq_color": PINK,
|
||||||
"sum_color": GREEN,
|
"sum_color": GREEN,
|
||||||
"low_freq" : 2.0,
|
"low_freq" : 3.0,
|
||||||
"high_freq" : 3.0,
|
"high_freq" : 4.0,
|
||||||
"circle_plane_config" : {
|
"circle_plane_config" : {
|
||||||
"x_radius" : 2.5,
|
"x_radius" : 2.5,
|
||||||
"y_radius" : 2.7,
|
"y_radius" : 2.7,
|
||||||
|
Reference in New Issue
Block a user