5dfa4c30-b5a5-47eb-8510-d1483b2ebf90
prompter
I want to implement a rotation in 2d: given an angle for x and y rotation how are the corresponding matrices for rotation around the x and y axis computed?
ac6eaebb-00ea-4f0d-8ce1-54dd4a6999aa
5dfa4c30-b5a5-47eb-8510-d1483b2ebf90
assistant
To rotate a point (x, y) by an angle 'θ' in a 2D plane, the transformation matrix is:

'''shell
[cos(θ)  -sin(θ)]
[sin(θ)   cos(θ)]
'''

This rotation matrix represents a counter-clockwise rotation of the point by angle 'θ'.
01ea20bc-0cc8-4a0b-a592-d4eef7f41ea5
ac6eaebb-00ea-4f0d-8ce1-54dd4a6999aa
prompter
Provide python code