Skip to content

Commit 6616893

Browse files
committed
Tidied up animations folder
2 parents e80027a + fabfda6 commit 6616893

542 files changed

Lines changed: 117 additions & 377 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

calc-backend/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ dist
44

55
.venv
66
prisma/client
7+
8+
animation-gen/__pycache__
9+
animation-gen/media

calc-frontend/src/Animations/derivativeAnimation.py renamed to calc-backend/animation-gen/derivativeAnimation.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ def construct(self):
1111
axis_config={"include_numbers": True, "include_tip": False}
1212
)
1313
.to_edge(DL)
14-
.set_color(GREY)
14+
.set_color(GRAY_A)
1515
)
1616

17-
axes_labels = axes.get_axis_labels(x_label="x",y_label="y")
17+
axes_labels = axes.get_axis_labels(x_label="x",y_label="y").set_color(GRAY_A)
1818

1919
func = axes.plot(
2020
lambda x: .5 * x * (x-3) * (x-4) + .6,
2121
x_range = (0,5)
2222
)
2323

24-
x = ValueTracker(7)
25-
dx = ValueTracker(2)
24+
x = ValueTracker(5.5)
25+
dx = ValueTracker(.33)
2626

2727
secant = always_redraw(
2828
lambda: axes.get_secant_slope_group(
@@ -34,7 +34,7 @@ def construct(self):
3434
dx_label = "dx",
3535
dy_label = "dy",
3636
secant_line_color=GREEN,
37-
secant_line_length=8
37+
secant_line_length=5
3838
)
3939
)
4040

@@ -57,16 +57,23 @@ def construct(self):
5757

5858
tangent_label = always_redraw(
5959
lambda: MathTex("y = f'(x)")
60-
.scale(0.6)
61-
.next_to(secant, UP, buff=0.1)
60+
.scale(0.75)
61+
.next_to(dot1, UL, buff=0.5)
6262
.set_color(GREEN)
6363
)
6464

65-
self.add(axes, axes_labels,func)
65+
self.add(axes, axes_labels, func)
6666
self.add(dot1,dot2,secant,tangent_label)
67+
<<<<<<< HEAD:calc-frontend/src/Animations/derivativeAnimation.py
6768
self.play(dx.animate.set_value(.001), run_time=1)
6869
self.play(x.animate.set_value(1), run_time = 4)
6970
self.play(x.animate.set_value(7), run_time = 4)
7071
self.play(dx.animate.set_value(2), run_time = 1)
7172

72-
self.wait(3)
73+
self.wait(3)
74+
=======
75+
self.play(x.animate(rate_func=linear).set_value(3), run_time = 1.5)
76+
self.play(x.animate(rate_func=rush_from).set_value(1), run_time = 2)
77+
self.play(x.animate(rate_func=rush_into).set_value(3), run_time = 2)
78+
self.play(x.animate(rate_func=linear).set_value(5.5), run_time = 1.5)
79+
>>>>>>> fabfda6e62f84d1215fa9f2e0e846c48e9fbb0ed:calc-backend/animation-gen/derivativeAnimation.py

calc-frontend/src/Animations/integralAnimations.py renamed to calc-backend/animation-gen/integralAnimation.py

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,35 @@
22

33
class RightRiemannSum(Scene):
44
def construct(self):
5+
<<<<<<< HEAD:calc-frontend/src/Animations/integralAnimations.py
56
axes = Axes(
7+
=======
8+
# Create axes
9+
axes = (Axes(
10+
>>>>>>> fabfda6e62f84d1215fa9f2e0e846c48e9fbb0ed:calc-backend/animation-gen/integralAnimation.py
611
x_range=[0, 2.5, 1],
712
y_range=[0, 5, 1],
813
x_length=10,
914
y_length=5,
1015
axis_config={"include_numbers": True}
11-
).to_edge(LEFT)
16+
)
17+
.to_edge(LEFT)
18+
.set_color(GRAY_A)
19+
)
1220

21+
<<<<<<< HEAD:calc-frontend/src/Animations/integralAnimations.py
1322
x_label = axes.get_x_axis_label("x")
1423
y_label = axes.get_y_axis_label("y")
24+
=======
25+
# Axis labels
26+
x_label = axes.get_x_axis_label("x").set_color(GRAY_A)
27+
y_label = axes.get_y_axis_label("y").set_color(GRAY_A)
28+
>>>>>>> fabfda6e62f84d1215fa9f2e0e846c48e9fbb0ed:calc-backend/animation-gen/integralAnimation.py
1529

16-
self.play(Create(axes), Write(x_label), Write(y_label))
30+
self.add(axes, x_label, y_label)
1731

1832
graph = axes.plot(lambda x: 0.6 * x**2, x_range=[0, 2.3], color=WHITE)
19-
self.play(Create(graph), run_time=2)
33+
self.play(Create(graph), run_time=1)
2034

2135
a, b = 0, 2
2236
n = 10
@@ -43,8 +57,12 @@ def construct(self):
4357
rect.align_to(rect_corner, DOWN + LEFT)
4458
rectangles.add(rect)
4559

60+
<<<<<<< HEAD:calc-frontend/src/Animations/integralAnimations.py
61+
=======
62+
# Animate rectangles fading in one-by-one
63+
>>>>>>> fabfda6e62f84d1215fa9f2e0e846c48e9fbb0ed:calc-backend/animation-gen/integralAnimation.py
4664
for rect in rectangles:
47-
self.play(FadeIn(rect, run_time=0.2))
65+
self.play(FadeIn(rect, run_time=0.15))
4866

4967
area_text = Text(f"Area ≈ {area_sum:.2f}", font_size=36)
5068
area_text.to_edge(UP).shift(DOWN*2.4 + LEFT * 3.5)
@@ -56,9 +74,6 @@ def construct(self):
5674
FadeOut(rectangles),
5775
FadeOut(area_text),
5876
FadeOut(graph),
59-
FadeOut(axes),
60-
FadeOut(x_label),
61-
FadeOut(y_label),
6277
run_time=1
6378
)
6479

File renamed without changes.

calc-backend/requirements.txt

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,52 @@
1+
av==13.1.0
2+
beautifulsoup4==4.13.3
13
certifi==2024.7.4
24
charset-normalizer==3.3.2
5+
click==8.1.8
6+
cloup==3.0.7
7+
Cython==3.0.12
8+
decorator==5.2.1
9+
glcontext==3.0.0
310
idna==3.7
11+
isosurfaces==0.1.2
12+
manim==0.19.0
13+
ManimPango==0.6.0
14+
mapbox_earcut==1.0.3
15+
markdown-it-py==3.0.0
16+
mdurl==0.1.2
17+
moderngl==5.12.0
18+
moderngl-window==3.1.1
419
mpmath==1.3.0
520
narwhals==1.28.0
6-
numpy==2.0.1
21+
networkx==3.4.2
22+
numpy==2.2.4
723
packaging==24.2
824
pandas==2.2.2
25+
pillow==11.2.1
926
plotly==6.0.0
1027
plusminus==0.8.1
28+
pycairo==1.28.0
29+
pydub==0.25.1
30+
pyglet==2.1.3
31+
pyglm==2.8.2
32+
Pygments==2.19.1
33+
pyobjc-core==11.0
34+
pyobjc-framework-Cocoa==11.0
1135
pyparsing==3.2.1
1236
python-dateutil==2.9.0.post0
1337
pytz==2024.1
1438
requests==2.32.3
39+
rich==14.0.0
1540
scipy==1.15.2
41+
screeninfo==0.8.1
1642
six==1.16.0
43+
skia-pathops==0.8.0.post2
44+
soupsieve==2.6
45+
srt==3.5.3
46+
svgelements==1.9.6
1747
sympy==1.13.3
48+
tqdm==4.67.1
49+
typing_extensions==4.13.2
1850
tzdata==2024.1
1951
urllib3==2.2.2
52+
watchdog==6.0.0
Binary file not shown.
Binary file not shown.

calc-frontend/src/Animations/media/Tex/2b7ffb3c38a5a6e0.svg

Lines changed: 0 additions & 10 deletions
This file was deleted.

calc-frontend/src/Animations/media/Tex/2b7ffb3c38a5a6e0.tex

Lines changed: 0 additions & 9 deletions
This file was deleted.

calc-frontend/src/Animations/media/Tex/31d3165490bf3404.svg

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)