diff options
author | vishal786-commits | 2020-06-16 13:30:58 +0530 |
---|---|---|
committer | GitHub | 2020-06-16 13:30:58 +0530 |
commit | 7f39c6fcf7990fafe53fe2aeb2c2f7bfd429b970 (patch) | |
tree | f9b567e41a00d11e20cc2b9d5c036c52c1f84a6d /FSF-2020/calculus-of-several-variables | |
parent | 24a759834626921654aba1fbae74c70e3a3d7b1c (diff) | |
download | FSF-mathematics-python-code-archive-7f39c6fcf7990fafe53fe2aeb2c2f7bfd429b970.tar.gz FSF-mathematics-python-code-archive-7f39c6fcf7990fafe53fe2aeb2c2f7bfd429b970.tar.bz2 FSF-mathematics-python-code-archive-7f39c6fcf7990fafe53fe2aeb2c2f7bfd429b970.zip |
Create file4_cube_surface.py
Diffstat (limited to 'FSF-2020/calculus-of-several-variables')
-rw-r--r-- | FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py new file mode 100644 index 0000000..5963996 --- /dev/null +++ b/FSF-2020/calculus-of-several-variables/triple-and-surface-integrals/flux/file4_cube_surface.py @@ -0,0 +1,71 @@ +from manimlib.imports import* + + + +class cuber(ThreeDScene): + def construct(self): + + axes=ThreeDAxes() + cube=Cube() + # cube.scale(1) + cube.shift(RIGHT+DOWN+OUT) + + + + sq3=Square(color=RED, fill_opacity=0.85) + sq3.rotate(PI/2, axis=UP) + sq3.shift(DOWN+OUT+2*RIGHT) + + x=TextMobject("x") + y=TextMobject("y") + z=TextMobject("z") + + x.rotate(PI/2, axis=RIGHT) + x.rotate(PI/4,axis=OUT) + x.shift(5.8*DOWN) + + y.rotate(PI/2, axis=RIGHT) + y.rotate(PI/8,axis=OUT) + y.shift(5.8*RIGHT) + + z.rotate(PI/2, axis=RIGHT) + z.rotate(PI/5,axis=OUT) + z.shift(3.2*OUT+0.4*LEFT) + axis_label=VGroup(x,y,z) + + v1=Vector(color=YELLOW,buff=15) + v1.rotate(PI/4,axis=RIGHT) + v1.shift(2*RIGHT+1*DOWN+1*OUT) + + + n1=TextMobject(r"$\vec{n}$",color=YELLOW) + n1.scale(0.8) + n1.rotate(PI/2,axis=RIGHT) + n1.shift(3*RIGHT+1.3*OUT+DOWN) + + + + self.set_camera_orientation(phi=75 * DEGREES,theta=-15*DEGREES) + self.play(ShowCreation(axes),ShowCreation(axis_label)) + self.play(ShowCreation(cube, run_time=3)) + self.begin_ambient_camera_rotation(rate=-0.2) + # self.move_camera(phi=150*DEGREES,theta=-45*DEGREES, run_time=3) + self.wait(1) + self.play(ShowCreation(sq3)) + + self.wait(1) + self.play(ShowCreation(v1),ShowCreation(n1)) + self.wait(1) + self.stop_ambient_camera_rotation() + self.wait(2) + + + # self.play(Write(t1)) + # self.play(Transform(vg,t1)) + # self.wait(3) + # self.play(ReplacementTransform(t1,t2)) + # self.wait(3) + # # self.move_camera(phi=50*DEGREES,theta=-45*DEGREES,run_time=3) + # self.wait(8) + # self.move_camera(phi=75 * DEGREES, run_time=3) + # self.wait(3) |