Creating an Animation of a 2D Polygon

You will need the following functions:

	Map		maps a function over a list
	Table		generates a list
	Do		executes a command as a variable goes from start to finish in step sizes
	AppendTo	appends an object to a list
	Polygon	generates a closed, filled polygon 
	Graphics	represents its input s a 2D graphical image
	ListAnimate	animates a list of objects

1. Define a function that creates a unit vector with the given angle

	Name: 
	Input:
	Result:
	
Test function by generating a unit vector with angle Pi/4.

2. Define a function that creates a list of n unit vectors with angles 2 Pi / n, representing the vertices of a regular polygon.

	Name:
	Input:
	Result:
	
Test function by generating a list representing a square

3. Define a function that creates and draws a polygon made out of a list of points

	Name:
	Input:
	Result:
	
Test function by drawing a square

4. Define a function that generates a 2D rotational matrix

	Name:
	Input:
	Result:

Test function by generating a rotation by Pi/2 and applying it to the vector {0, 1}

5. Define a function that rotates a single vector by a given angle

	Name:
	Input:
	Result
	
Test function by rotating {0, 1} by Pi/2

6. Define a function that rotates a list of vectors, each by the same given angle

	Name:
	Input:
	Result:

Test function by showing a square rotated by Pi/4

7. Generate a list of polygons rotated by 0, 0.1, 0.2, 0.3, ... 2 Pi degrees as follows:

	Set variable list to an empty list
	Setup a Do loop that runs for an angle t from 0 to 2 Pi in steps of 0.1
		In the Do loop, call AppendTo to append a new regular polygon to the list, where 
		the new regular polygon is generated from a list of 6 points, rotated by angle t 

Test this code by creating a list of squares rotatd in steps of 0.5

8. Feed that list of polygons from (7) into the function ListAnimate. Adjust the step size for t in (7) to get a smooth animation

Homework: The above code can animate any 2D object defined by a list of vertices. In (2) above, we generate a list of points representing a regular polygon. Change that function to create a list of points representing a star. You can do this easily if you simply re-order the list of points. Instead of p1, p2, p3, ..., pn you reorder them  p1, p4, p7, ..., p2, p5, p8, ...., p3, p6, p9, .... The rest of the functions does not change, but it will now animate a star.