I would like you to be able to manipulate graphs in 2 and 3 dimensions. Today we will start with two dimensions. You should be able to translate and rotate a graph defined parametrically and implicitly. For polar equations, rotation about the origin by an angle $\phi$ is simply making the replacement $\theta \rightarrow \theta + \phi$, but translatation is probably easiest if you change from polar to parametric plot by representing the polar point $(\theta, r(\theta))$ as a point in rectangular coordinates $[r(\theta) cos(\theta), r(\theta) sin(\theta)]$ and then plotting the graph parametrically.

Write a function

Test your function as follows:

and verify that this is a graph of a circle with origin at $(1,-2)$. Note that the

Verify that

> B:=plot([op(translate([t*cos(t),t^2],[-3,1])), t=-1..1], color="Blue");

> C:=plot([op(rotate_origin([t*cos(t),t^2],Pi/3)), t=-1..1], color="Green");

> DD:=plot([op(rotate_point([t*cos(t),t^2],[-3,1],Pi/3)), t=-1..1], color="Orange");

> display([A,B,C,DD]);

Yields the picture:

Write a function

Do the same thing for an implicit equation, that is write a function

> B:=implicitplot(translate_implicit(y=x^2*cos(y)^2,[-3,1]),x=-4..-2,y=1..1.8,color="Blue");

> xmin:=min(rotate_origin([-1,0],Pi/3)[1],rotate_origin([1,0],Pi/3)[1],rotate_origin([-1,.8],Pi/3)[1],rotate_origin([1,.8],Pi/3)[1]);

> xmax:=max(rotate_origin([-1,0],Pi/3)[1],rotate_origin([1,0],Pi/3)[1],rotate_origin([-1,.8],Pi/3)[1],rotate_origin([1,.8],Pi/3)[1]);

> ymin:=min(rotate_origin([-1,0],Pi/3)[2],rotate_origin([1,0],Pi/3)[2],rotate_origin([-1,.8],Pi/3)[2],rotate_origin([1,.8],Pi/3)[2]);

> ymax:=max(rotate_origin([-1,0],Pi/3)[2],rotate_origin([1,0],Pi/3)[2],rotate_origin([-1,.8],Pi/3)[2],rotate_origin([1,.8],Pi/3)[2]);

> C:=implicitplot(rotate_origin_implicit(y=x^2*cos(y)^2,Pi/3),x=xmin..xmax,y=ymin..ymax, color="Green");

> xmin2:=min(rotate_point([-1,0],[-3,1],Pi/3)[1],rotate_point([1,0],[-3,1],Pi/3)[1],rotate_point([-1,.8],[-3,1],Pi/3)[1],rotate_point([1,.8],[-3,1],Pi/3)[1]);

> xmax2:=max(rotate_point([-1,0],[-3,1],Pi/3)[1],rotate_point([1,0],[-3,1],Pi/3)[1],rotate_point([-1,.8],[-3,1],Pi/3)[1],rotate_point([1,.8],[-3,1],Pi/3)[1]);

> ymin2:=min(rotate_point([-1,0],[-3,1],Pi/3)[2],rotate_point([1,0],[-3,1],Pi/3)[2],rotate_point([-1,.8],[-3,1],Pi/3)[2],rotate_point([1,.8],[-3,1],Pi/3)[2]);

> ymax2:=max(rotate_point([-1,0],[-3,1],Pi/3)[2],rotate_point([1,0],[-3,1],Pi/3)[2],rotate_point([-1,.8],[-3,1],Pi/3)[2],rotate_point([1,.8],[-3,1],Pi/3)[2]);

> DD:=implicitplot(rotate_point_implicit(y=x^2*cos(y)^2,[-3,1],Pi/3),x=xmin2..xmax2,y=ymin2..ymax2, color="Orange");

> display([A,B,C,DD]);

Yields the picture:

The following equation was rotated $\pi/6$ degrees clockwise around the point $(2,1)$ and then it was rotated $\pi/4$ degrees around $(-1,0)$. Find the equation after it was rotated back.

You should open up a new worksheet and start from scratch. You will have to save your work in a file and upload that file on to the course moodle. Your solution should be a sequence of commands where it is easy to change the input string and after you execute the sequence of commands you should have the correct output string. Please add documentation to your worksheet to explain how it works. Just a few sentences is sufficient, but imagine that you were opening up the worksheet for the first time and wanted to know what it did. You will be marked down if what you write is not clear and coherent.

You should finish your assignment by Wednesday, November 29 by 11:59pm. Assignments submitted after this date will be assessed a penalty of 10% per day.