Computing Assignment 2 Report

Task 1: Hexagon Creation using Rotation

Given an initial vector , we utilize the rotation matrix to generate a hexagon. The rotation matrix for an angle is defined as:

  • To create the hexagon, we rotate by radians (60 degrees) five times, appending each result to obtain the vertices of the hexagon.

Task 2: Transformations

Two distinct transformations are applied to the hexagon:

  1. Rotation by or radians:
  2. Reflection across the x-axis:
    • These transformations are applied to each vertex of the hexagon to generate the modified shapes, showing the effect of rotation and reflection.

Task 3: Composition of Transformations

The commutative property of rotation matrices allows us to combine rotations around different angles and in any order, resulting in the same transformation. This is given by the equivalence:

  • For non-commutative operations, such as a rotation followed by a reflection, the order matters. This is evident in the difference of outcomes when applying rotation and reflection in opposite sequences: