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.
Soluzione
Grazie per i tuoi commenti!
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Can you show me the Python code for these transformations and the visualization?
Can you explain step by step how the scaling and rotation matrices are applied?
What would the final transformed vector coordinates be?
Awesome!
Completion rate improved to 1.89
Challenge: Combined Transformations of a Vector
Scorri per mostrare il 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.
Soluzione
Grazie per i tuoi commenti!
Awesome!
Completion rate improved to 1.89single