Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 704 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 704 Bytes

Rotation with broadcasting

Two dimensional coordinates can be rotated by my multiplying the 2-element vector of coordinates by 2x2 rotation matrix

img

where θ is the angle of rotation (in radians). Start from the x-y coordinates in the file points_circle.dat and rotate them by 90°. Utilize broadcasting for performing the rotation with a single np.dot call. (Hint: you may need to create additional dimensions). Plot both the original and rotated points in order to see the effect of rotation.