Question: Q2. Write a python code to do the following operations. (E) 3.2 1. Create three vectors in 3D space in form of Numpy arrays: 1.0

Q2. Write a python code to do the following operations. (E") 3.2 1. Create three vectors in 3D space in form of Numpy arrays: 1.0 -3.0 -0.01 a = 2.1 az az -2.2 5.2 2. Define a function vec_proj() which takes in two vectors (NumPy arrays) and returns the projection of the first vector on the second vector. Then, apply this function to calculate the projection of a, on a and the projection of a on a,. 3. Define a function vec_angle() which takes in two vectors (Numpy arrays) and returns the angle (in degree) between these two vectors. Then, apply this function to calculate the angle between a and a,, the angle between a, and az, and the angle between az and a. 4. Define a function vec_vol() which takes in three vectors (NumPy arrays) and returns the area of the parallelepiped spanned by these three vectors. Then, apply this function to calculate the area of the parallelepiped spanned by a, a, and az (4 X 5 = 20 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
