Course Content

Mathematics for Data Analysis and Modeling

## Mathematics for Data Analysis and Modeling

# Challenge: Figures' Linear Transformations

Task

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 / 3`

degrees. - Create a scaling matrix with the parameters
`scale_x = 2`

and`scale_y = 0.5`

. - Apply the
`rotation_matrix`

to the square. - Apply the
`scaling_matrix`

to the result of the previous transformation.

Task

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 / 3`

degrees. - Create a scaling matrix with the parameters
`scale_x = 2`

and`scale_y = 0.5`

. - Apply the
`rotation_matrix`

to the square. - Apply the
`scaling_matrix`

to the result of the previous transformation.

Everything was clear?

# Challenge: Figures' Linear Transformations

Task

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 / 3`

degrees. - Create a scaling matrix with the parameters
`scale_x = 2`

and`scale_y = 0.5`

. - Apply the
`rotation_matrix`

to the square. - Apply the
`scaling_matrix`

to the result of the previous transformation.

Task

**Rotation transformation**rotates a figure around a specific point or axis.**Scale transformation**resizes a figure by changing its size along each axis.

**a composition** of transformations:

- Сreate rotation matrix that rotates a figure by
`np.pi / 3`

degrees. - Create a scaling matrix with the parameters
`scale_x = 2`

and`scale_y = 0.5`

. - Apply the
`rotation_matrix`

to the square. - Apply the
`scaling_matrix`

to the result of the previous transformation.

Everything was clear?

# Challenge: Figures' Linear Transformations

Task

**Rotation transformation**rotates a figure around a specific point or axis.**Scale transformation**resizes a figure by changing its size along each axis.

**a composition** of transformations:

- Сreate rotation matrix that rotates a figure by
`np.pi / 3`

degrees. - Create a scaling matrix with the parameters
`scale_x = 2`

and`scale_y = 0.5`

. - Apply the
`rotation_matrix`

to the square. - Apply the
`scaling_matrix`

to the result of the previous transformation.

Task

**Rotation transformation**rotates a figure around a specific point or axis.**Scale transformation**resizes a figure by changing its size along each axis.

**a composition** of transformations:

- Сreate rotation matrix that rotates a figure by
`np.pi / 3`

degrees. - Create a scaling matrix with the parameters
`scale_x = 2`

and`scale_y = 0.5`

. - Apply the
`rotation_matrix`

to the square. - Apply the
`scaling_matrix`

to the result of the previous transformation.

Everything was clear?

Task

**Rotation transformation**rotates a figure around a specific point or axis.**Scale transformation**resizes a figure by changing its size along each axis.

**a composition** of transformations:

- Сreate rotation matrix that rotates a figure by
`np.pi / 3`

degrees. - Create a scaling matrix with the parameters
`scale_x = 2`

and`scale_y = 0.5`

. - Apply the
`rotation_matrix`

to the square. - Apply the
`scaling_matrix`

to the result of the previous transformation.