Challenge: Figures' Linear Transformations
Swipe to start coding
Linear transformations of the figures are commonly used in computer graphics. There are 2 main types of linear transformations:
- Rotation transformation rotates a figure around a specific point or axis.
- Scale transformation resizes a figure by changing its size along each axis.
Your task is to apply all these transformations to a rectangle one by one. As a result, we will have a composition of transformations:
- Сreate rotation matrix that rotates a figure by
np.pi / 3degrees. - Create a scaling matrix with the parameters
scale_x = 2andscale_y = 0.5. - Apply the
rotation_matrixto the square. - Apply the
scaling_matrixto the result of the previous transformation.
Løsning
Takk for tilbakemeldingene dine!
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Oppsummer dette kapittelet
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 4.76
Challenge: Figures' Linear Transformations
Sveip for å vise menyen
Swipe to start coding
Linear transformations of the figures are commonly used in computer graphics. There are 2 main types of linear transformations:
- Rotation transformation rotates a figure around a specific point or axis.
- Scale transformation resizes a figure by changing its size along each axis.
Your task is to apply all these transformations to a rectangle one by one. As a result, we will have a composition of transformations:
- Сreate rotation matrix that rotates a figure by
np.pi / 3degrees. - Create a scaling matrix with the parameters
scale_x = 2andscale_y = 0.5. - Apply the
rotation_matrixto the square. - Apply the
scaling_matrixto the result of the previous transformation.
Løsning
Takk for tilbakemeldingene dine!
single