Modeling Video Game Motion with Matrices

Lesson 23
NYS COMMON CORE MATHEMATICS CURRICULUM
M1
PRECALCULUS AND ADVANCED TOPICS
Lesson 23: Modeling Video Game Motion with Matrices
Classwork
Opening Exercise
πœ‹
cos ( )
π‘₯
3
Let 𝑅 (𝑦) = (
πœ‹
sin ( )
3
πœ‹
βˆ’ sin ( )
3
πœ‹
cos ( )
π‘₯
) (𝑦).
3
a.
π‘₯
π‘₯
Describe the geometric effect of performing the transformation (𝑦) β†’ 𝑅 (𝑦).
b.
1
1
Plot the point ( ), and then find 𝑅 ( ) and plot it.
0
0
c.
1
1
If we want to show that 𝑅 has been applied twice to (1,0), we can write 𝑅2 ( ), which represents 𝑅 (𝑅 ( )).
0
0
1
1
1
Find 𝑅2 ( ) and plot it. Then, find 𝑅3 ( ) = 𝑅 (𝑅 (𝑅 ( ))), and plot it.
0
0
0
Lesson 23:
Modeling Video Game Motion with Matrices
This work is derived from Eureka Math β„’ and licensed by Great Minds. ©2015 Great Minds. eureka-math.org
This file derived from PreCal-M1-TE-1.3.0-07.2015
S.116
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Lesson 23
NYS COMMON CORE MATHEMATICS CURRICULUM
M1
PRECALCULUS AND ADVANCED TOPICS
d.
π‘₯
π‘₯
Describe the matrix transformation (𝑦) β†’ 𝑅2 (𝑦) using a single matrix.
Exercises
1.
cos⁑(2𝑑)
Let 𝑓(𝑑) = (
sin(2𝑑)
𝑑
cos ( )
βˆ’sin(2𝑑) 1
2
) ( ), and let 𝑔(𝑑) = (
𝑑
cos(2𝑑) 0
sin ( )
2
𝑑
1
2
𝑑 ) (0).
cos ( )
2
βˆ’ sin ( )
a.
Suppose 𝑓(𝑑) represents the position of a moving object that starts at (1,0). How long does it take for this
object to return to its starting point? When the argument of the trigonometric function changes from 𝑑 to 2𝑑,
what effect does this have?
b.
If the position is given instead by 𝑔(𝑑),⁑how long would it take the object to return to its starting point? When
𝑑
the argument of the trigonometric functions changes from 𝑑 to , what effect does this have?
2
πœ‹
2
Let 𝐺(𝑑) = (
πœ‹
sin ( βˆ™ 𝑑)
2
cos ( βˆ™ 𝑑)
2.
πœ‹
0
2
) ( ).
πœ‹
1
cos ( βˆ™ 𝑑)
2
βˆ’ sin ( βˆ™ 𝑑)
a.
Draw the path that 𝑃 = 𝐺(𝑑) traces out as 𝑑 varies within the interval 0 ≀ 𝑑 ≀ 1.
b.
Where will the object be at 𝑑 = 3 seconds?
Lesson 23:
Modeling Video Game Motion with Matrices
This work is derived from Eureka Math β„’ and licensed by Great Minds. ©2015 Great Minds. eureka-math.org
This file derived from PreCal-M1-TE-1.3.0-07.2015
S.117
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Lesson 23
NYS COMMON CORE MATHEMATICS CURRICULUM
M1
PRECALCULUS AND ADVANCED TOPICS
c.
How long will it take the object to reach (0, βˆ’1)?
πœ‹
2
Let 𝐻(𝑑) = (
πœ‹
sin ( βˆ™ 𝑑)
2
cos ( βˆ™ 𝑑)
3.
πœ‹
1
2
) ( ).
πœ‹
4
cos ( βˆ™ 𝑑)
2
βˆ’ sin ( βˆ™ 𝑑)
a.
Draw the path that 𝑃 = 𝐻(𝑑) traces out as 𝑑 varies within the interval 0 ≀ 𝑑 ≀ 2.
b.
Where will the object be at 𝑑 = 1 second?
c.
How long will it take the object to return to its starting point?
4.
Suppose you want to write a program that takes the point (3, 5) and rotates it about the origin to the point
(βˆ’3, βˆ’5) over a 1-second interval. Write a function 𝑃 = 𝑓(𝑑) that encodes this rotation.
5.
If instead you wanted the rotation to take place over a 1.5-second interval, how would your function change?
Lesson 23:
Modeling Video Game Motion with Matrices
This work is derived from Eureka Math β„’ and licensed by Great Minds. ©2015 Great Minds. eureka-math.org
This file derived from PreCal-M1-TE-1.3.0-07.2015
S.118
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Lesson 23
NYS COMMON CORE MATHEMATICS CURRICULUM
M1
PRECALCULUS AND ADVANCED TOPICS
Problem Set
πœ‹
1.
cos ( )
π‘₯
4
Let 𝑅 (𝑦) = (
πœ‹
sin ( )
4
a.
b.
c.
2.
πœ‹
π‘₯
4
πœ‹ ) (𝑦). Find the following.
cos ( )
4
βˆ’ sin ( )
𝑅2 (√2)
√2
How many transformations do you need to take so that the image returns to where it started?
π‘₯
π‘₯
π‘₯
Describe the matrix transformation (𝑦) β†’ 𝑅2 (𝑦)⁑and 𝑅𝑛 (𝑦) using a single matrix.
cos(𝑑) βˆ’sin(𝑑) 1
1
For 𝑓(𝑑) = (
) ( ), it takes 2πœ‹ to transform the object at ( ) back to where it starts. How long
sin(𝑑) cos(𝑑) 1
1
does it take the following functions to return to their starting point?
cos(3𝑑) βˆ’sin(3𝑑) 1
a. 𝑓(𝑑) = (
)( )
sin(3𝑑) cos(3𝑑) 1
b.
𝑑
3
𝑓(𝑑) = (
𝑑
sin ( )
3
c.
2𝑑
5
𝑓(𝑑) = (
2𝑑
sin ( )
5
cos ( )
𝑑
1
3
𝑑 ) ( 1)
cos ( )
3
βˆ’ sin ( )
2𝑑
1
5
)( )
2𝑑
1
cos ( )
5
cos ( ) βˆ’ sin ( )
3.
cos(𝑑) βˆ’sin(𝑑) 2
Let 𝐹(𝑑) = (
) ( ), where 𝑑⁑is measured in radians. Find the following:
sin(𝑑) cos(𝑑) 1
3πœ‹
7πœ‹
), 𝐹 ( ), and the radius of the path
2
6
a.
𝐹(
b.
cos(𝑑)
Show that the radius is always √π‘₯ 2 + 𝑦 2 for the path of this transformation 𝐹(𝑑) = (
sin(𝑑)
πœ‹π‘‘
2
Let 𝐹(𝑑) = (
πœ‹π‘‘
sin ( )
2
cos ( )
4.
a.
βˆ’sin(𝑑) π‘₯
) ( ).
cos(𝑑) 𝑦
πœ‹π‘‘
4
2
πœ‹π‘‘ ) (4), where 𝑑⁑is a real number.
cos ( )
2
βˆ’ sin ( )
Draw the path that 𝑃 = 𝐹(𝑑) traces out as 𝑑 varies within each of the following intervals:
i.
0 ≀ 𝑑 ≀ 1⁑⁑
ii.
1 ≀ 𝑑 ≀ 2⁑⁑
iii.
2 ≀ 𝑑 ≀ 3⁑⁑
iv.
3 ≀ 𝑑 ≀ 4⁑⁑
b.
Where will the object be located at 𝑑 = 2.5 seconds?
c.
βˆ’8√6
How long does it take the object to reach (
)?
8√2
Lesson 23:
Modeling Video Game Motion with Matrices
This work is derived from Eureka Math β„’ and licensed by Great Minds. ©2015 Great Minds. eureka-math.org
This file derived from PreCal-M1-TE-1.3.0-07.2015
S.119
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Lesson 23
NYS COMMON CORE MATHEMATICS CURRICULUM
M1
PRECALCULUS AND ADVANCED TOPICS
πœ‹π‘‘
3
Let 𝐹(𝑑) = (
πœ‹π‘‘
sin ( )
3
πœ‹π‘‘
βˆ’1
3
πœ‹π‘‘ ) (βˆ’βˆš3).
cos ( )
3
cos ( )
5.
6.
7.
βˆ’ sin ( )
a.
Draw the path that 𝑃 = 𝐹(𝑑) traces out as 𝑑 varies within the interval 0 ≀ 𝑑 ≀ 1.
b.
How long does it take the object to reach (√3, 0)?⁑
c.
How long does it take the object to return to its starting point?⁑
Find the function that will rotate the point (4, 2) about the origin to the point (βˆ’4, βˆ’2)⁑over the following time
intervals.
a.
Over a 1-second interval
b.
Over a 2-second interval
c.
Over a -second interval
d.
How about rotating it back to where it starts over a -second interval?
1
3
4
5
Summarize the geometric effect of the following function at the given point and the time interval.
πœ‹π‘‘
a.
5 cos ( )
4
𝐹(𝑑) = (
πœ‹π‘‘
5 sin ( )
4
b.
8.
1
πœ‹π‘‘
cos ( )
2
6
𝐹(𝑑) = ( 1
πœ‹π‘‘
sin ( )
2
6
πœ‹π‘‘
4
4
πœ‹π‘‘ ) (3), 0 ≀ 𝑑 ≀ 1⁑
5 cos ( )
4
βˆ’5 sin ( )
1
2
πœ‹π‘‘
6
6
) ( ), 0 ≀ 𝑑 ≀ 1
1
πœ‹π‘‘
2
cos ( )
2
6
βˆ’ sin ( )
In programming a computer video game, Grace coded the changing location of a rocket as follows:
π‘₯
At the time 𝑑 second between 𝑑 = 0 seconds and 𝑑 = 4 seconds, the location (𝑦) of the rocket is given by
πœ‹
4
(
πœ‹
sin ( 𝑑)
4
πœ‹
4
) (√2).
πœ‹
√2
cos ( 𝑑)
4
cos ( 𝑑)⁑ βˆ’ sin ( 𝑑)
At a time of 𝑑 seconds between 𝑑 = 4 and 𝑑 = 8 seconds, the location of the rocket is given by
(
βˆ’βˆš2 +
√2
(𝑑 βˆ’ 4)
2
).
√2
βˆ’βˆš2 + (𝑑 βˆ’ 4)
2
a.
What is the location of the rocket at time 𝑑 = 0? What is its location at time 𝑑 = 8?
b.
Mason is worried that Grace may have made a mistake and the location of the rocket is unclear at time 𝑑 = 4⁑
seconds. Explain why there is no inconsistency in the location of the rocket at this time.
c.
What is the area of the region enclosed by the path of the rocket from time 𝑑 = 0 to 𝑑 = 8?
Lesson 23:
Modeling Video Game Motion with Matrices
This work is derived from Eureka Math β„’ and licensed by Great Minds. ©2015 Great Minds. eureka-math.org
This file derived from PreCal-M1-TE-1.3.0-07.2015
S.120
This work is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.