Challenge: Combined Transformations of a Vector
Apply a scaling transformation and a 90° rotation to a 2D vector using Python and matrix multiplication. Visualize the result with arrows and coordinate labels from the origin.
You're working with a vector:
v=[23]You will:
-
Apply a scaling matrix:
S=[2000.5] -
Apply a rotation matrix:
R=[23] -
Combine them as:
This simulates what happens when a vector is first scaled and then rotated.
Swipe to start coding
-
Complete the Python code below to:
-
Define the original vector;
-
Apply the scaling and rotation matrices;
-
Plot all vectors with labeled tips and coordinate axes;
-
-
Verify that the output vectors are correct.
Solution
Merci pour vos commentaires !
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Awesome!
Completion rate improved to 1.89
Challenge: Combined Transformations of a Vector
Glissez pour afficher le menu
Apply a scaling transformation and a 90° rotation to a 2D vector using Python and matrix multiplication. Visualize the result with arrows and coordinate labels from the origin.
You're working with a vector:
v=[23]You will:
-
Apply a scaling matrix:
S=[2000.5] -
Apply a rotation matrix:
R=[23] -
Combine them as:
This simulates what happens when a vector is first scaled and then rotated.
Swipe to start coding
-
Complete the Python code below to:
-
Define the original vector;
-
Apply the scaling and rotation matrices;
-
Plot all vectors with labeled tips and coordinate axes;
-
-
Verify that the output vectors are correct.
Solution
Merci pour vos commentaires !
Awesome!
Completion rate improved to 1.89single