summaryrefslogtreecommitdiff
path: root/FSF-2020/linear-algebra/vector-spaces
diff options
context:
space:
mode:
authorsimranchhattani2020-07-11 23:40:32 +0530
committerGitHub2020-07-11 23:40:32 +0530
commit9451877998a75f4044459365531d6b05f776c35a (patch)
tree74a21e9e33f6cea0b544e48e5d9618af56f1837e /FSF-2020/linear-algebra/vector-spaces
parent0ddf557bde12f37d6053403e5f4ff16ff863296e (diff)
downloadFSF-mathematics-python-code-archive-9451877998a75f4044459365531d6b05f776c35a.tar.gz
FSF-mathematics-python-code-archive-9451877998a75f4044459365531d6b05f776c35a.tar.bz2
FSF-mathematics-python-code-archive-9451877998a75f4044459365531d6b05f776c35a.zip
Add files via upload
Diffstat (limited to 'FSF-2020/linear-algebra/vector-spaces')
-rw-r--r--FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Intersection_of_Subspaces.py52
-rw-r--r--FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Subspace_Non_Example.py25
2 files changed, 77 insertions, 0 deletions
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Intersection_of_Subspaces.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Intersection_of_Subspaces.py
new file mode 100644
index 0000000..ec82daa
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Intersection_of_Subspaces.py
@@ -0,0 +1,52 @@
+from manimlib.imports import *
+class ThreeDSpace(ThreeDScene):
+
+
+ def construct(self):
+ axes = ThreeDAxes()
+ self.set_camera_orientation(phi = 80*DEGREES,theta =110*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.09)
+
+
+
+
+ cube = Cube(stroke_width=5,color=WHITE).shift([1.5,1.5,1.5]).scale(1.5)
+ cube.set_fill(TEAL)
+
+ cube.set_opacity(0.4)
+
+
+ plane1 = Polygon([0,0,3],[3,0,3],[3,3,0],[0,3,0])
+ plane1.set_opacity(0.65)
+ plane1.set_fill(PURPLE)
+ plane1.set_color(PURPLE)
+
+
+ plane2 = Polygon([0,3,3],[3,3,3],[3,0,0],[0,0,0])
+ plane2.set_opacity(0.7)
+ plane2.set_fill(RED)
+ plane2.set_color(RED)
+ line = Line(color=YELLOW,set_opacity=100).shift([1.5,1.5,1.5]).scale(1.5)
+
+ vgroup = VGroup(plane1,plane2,line,cube)
+ vgroup.shift([-1,-1,-1])
+
+ dot = Dot(color=BLACK).shift([0.5,0.5,0.5]).scale(1)
+ text = TextMobject(r"\text{The}",r"\text{line}",r"\text{representing the intersection of the two planes is a Subspace.}",opacity = 0.6).scale(0.7).shift(3*UP)
+ text[1].set_color(YELLOW)
+ self.add_fixed_in_frame_mobjects(text)
+ self.play(ShowCreation(text))
+
+
+ self.play(ShowCreation(cube))
+ self.play(ShowCreation(plane1))
+ self.play(ShowCreation(plane2))
+
+ self.play(ShowCreation(line),ShowCreation(dot))
+
+
+ self.wait(15)
+
+
+
+ \ No newline at end of file
diff --git a/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Subspace_Non_Example.py b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Subspace_Non_Example.py
new file mode 100644
index 0000000..115a722
--- /dev/null
+++ b/FSF-2020/linear-algebra/vector-spaces/Vector-Spaces/Subspaces/Subspace_Non_Example.py
@@ -0,0 +1,25 @@
+from manimlib.imports import *
+class ThreeDSpace(ThreeDScene):
+
+
+ def construct(self):
+ axes = ThreeDAxes()
+ self.add(axes)
+ self.set_camera_orientation(phi = 80*DEGREES,theta =110*DEGREES)
+ self.begin_ambient_camera_rotation(rate=0.09)
+ plane1 = Polygon([-1.5,1.5,-1.5],[1.5,1.5,-1.5],[1.5,-1.5,1.5],[-1.5,-1.5,1.5])
+ plane1.set_opacity(0.65)
+ plane1.set_fill(GREEN)
+ plane1.set_color(GREEN)
+
+
+ plane2 = Polygon([-1.5,1.5,1.5],[1.5,1.5,1.5],[1.5,-1.5,-1.5],[-1.5,-1.5,-1.5])
+ plane2.set_opacity(0.7)
+ plane2.set_fill(MAROON_A)
+ plane2.set_color(MAROON_A)
+ line = Line(color=YELLOW,set_opacity=100,start=[1.5,1.2,1.2],end=[-1.5,1.2,1.2])
+
+
+ self.play(ShowCreation(plane1),ShowCreation(plane2),ShowCreation(line))
+ self.wait(10)
+