About to start chapter 5

This commit is contained in:
Grant Sanderson 2016-08-01 20:55:35 -07:00
parent a9c7babdcd
commit 014b7bfdef
2 changed files with 21 additions and 16 deletions

View file

@ -1074,6 +1074,7 @@ class ColumnsToBasisVectors(LinearTransformationScene):
vector = self.move_matrix_columns(transposed_matrix, vector_coords) vector = self.move_matrix_columns(transposed_matrix, vector_coords)
self.scale_and_add(vector, vector_coords) self.scale_and_add(vector, vector_coords)
self.dither(3)
def move_matrix_columns(self, transposed_matrix, vector_coords = None): def move_matrix_columns(self, transposed_matrix, vector_coords = None):
matrix = np.array(transposed_matrix).transpose() matrix = np.array(transposed_matrix).transpose()

View file

@ -370,6 +370,16 @@ class ShowMatrixMultiplication(Scene):
class ApplyTwoSuccessiveTransforms(Scene): class ApplyTwoSuccessiveTransforms(Scene):
pass pass
class ComputerGraphicsAndRobotics(Scene):
def construct(self):
mob = VMobject(
TextMobject("Computer graphics"),
TextMobject("Robotics")
)
mob.arrange_submobjects(DOWN, buff = 1)
self.play(Write(mob, run_time = 1))
self.dither()
class ThreeDRotation(Scene): class ThreeDRotation(Scene):
pass pass
@ -395,22 +405,16 @@ class QuestionsToPonder(Scene):
title = TextMobject("Questions to ponder") title = TextMobject("Questions to ponder")
title.highlight(YELLOW).to_edge(UP) title.highlight(YELLOW).to_edge(UP)
self.add(title) self.add(title)
questions = map(TextMobject, [ questions = VMobject(*map(TextMobject, [
"Can you visualize these transformations?", "1. Can you visualize these transformations?",
"Can you represent them with matrices?", "2. Can you represent them with matrices?",
"How many rows and columns?", "3. How many rows and columns?",
"When does it make sense to multiply these matrices?", "4. When can you multiply these matrices?",
]) ]))
nums = VMobject(*[ questions.arrange_submobjects(DOWN, buff = 1, aligned_edge = LEFT)
TexMobject("%d."%(num+1)) questions.to_edge(LEFT)
for num in range(len(questions)) for question in questions.split():
]) self.play(Write(question, run_time = 1))
nums.arrange_submobjects(DOWN, buff = 1, aligned_edge = LEFT)
nums.to_edge(LEFT)
for num, question in zip(nums.split(), questions):
question.scale(0.8)
question.next_to(num)
self.play(Write(num), FadeIn(question))
self.dither() self.dither()
class NextVideo(Scene): class NextVideo(Scene):