Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am currently looking for solution for 4-6 but I wanted to give some background

ID: 3794337 • Letter: I

Question

I am currently looking for solution for 4-6 but I wanted to give some background information. I am coding in python and using its numpy library.

(1) Start Spyder and create a new file. The new file should begin by importing numpy and matplotlib: import numpy as np import matplotlib.pyplot as pl

(2) A set of parametric equations for a curve is a pair of functions x(t) and y(t) for a t b. The idea is that for any given time t (between a and b), x(t) gives the x-coordinate of a point on the curve and y(t) gives the y-coordinate. For example, x(t) = cos(t), y(t) = sin(t), 0 t 2 gives parameric equations for a familiar curve. You can find it by typing X, Y = [], [] for t in arange(0, 2*pi, 0.001): X.append(cos(t)) Y.append(sin(t)) pl.plot(X, Y) Describe the shape and clearly explain why these commands plot it.

(3) Plot the curve given by the parametric equations x(t) = t cos(t), y(t) = tsin(t), 0 t 10.

(4) If you didn’t do so for the last problem, create a list of points that appear in the curve from the last problem. Use a matrix to change this to a list that which contains the coordinates that would result from rotating 90 clockwise and plot the resulting figure.

(5) Reflect the figure from problem 3 across the line y = 5x. Does the shape seem to “point” in a different direction?

(6) Every matrix which does not do any scaling must be a reflection or a rotation. Note that reflecting across a line doesn’t do any scaling, and neither does reflecting across two lines. Find a single matrix that corresponds to reflecting across the line y = x and then reflecting across the line y = x. Plot the result of performing these reflections on the figure from 3. Is this a reflection or a rotation?

Explanation / Answer

n,m=map(int,raw_input().split()) a=[] for i in range(n): a.append(map(int,raw_input().split())) for i in range(m): for j in range(n): a[i][j],a[j][i]=a[j][i],a[i][j] for i in a: #printing transpose print i def foo(): n,m=map(int,raw_input().split()) a=[] for i in range(n): a.append(map(int,raw_input().split())) for i in range(m): for j in range(i+1, n): # ensure j > i a[i][j],a[j][i]=a[j][i],a[i][j] for i in a: #printing transpose print i