Osio 1. Luku 34
single
Challenge: Combined Transformations of a Vector
Pyyhkäise näyttääksesi valikon
Tehtävä
Pyyhkäise aloittaaksesi koodauksen
You are given a 2D vector:
v=[23]Your goal is to apply a scaling transformation followed by a 90° rotation using matrix multiplication, and visualize the results with arrows and coordinate labels from the origin.
The transformations are defined as:
- Scaling matrix: S=[2000.5]
- Rotation matrix (90°): R=[01−10]
The combined transformation is applied as:
R⋅(S⋅v)Your task:
- Define the original vector and the two matrices (
SandR). - Use matrix multiplication to compute:
- The scaled vector.
- The rotated vector.
- The combined transformation.
- Plot all vectors (
v,S·v, andR·(S·v)) as arrows from the origin with labeled tips and visible coordinate axes. - Verify that the computed vectors match the expected results after each transformation.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 1. Luku 34
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme