So I am doing some homework for my calculus class, and the question asked us to find the volume of a parallelepiped that is being represented by three adjacent edges: PQ, PR, and PS. P, Q, R, and S are located at (-2,1,0), (3,4,3) (1,4,-1) and (3,6,4). And the values of PQ, PR and PS are as follows: (5,3,3), (3,3,-1),(5,5,4)
This got me interested to see if I could use the three vectors to generate an image of the parallelepiped using python and matplotlib.
This is what I have so far:
fig = plt.figure()
ax = fig.add_subplot(111, projection = '3d')
ax.set_xlim([-5,5])
ax.set_ylim([-5,5])
ax.set_zlim([-5,5])
ax.quiver(-2,1,0,5,3,3)
ax.quiver(-2,1,0,3,3,-1)
ax.quiver(-2,1,0,5,5,4)
Is this the correct way to go about it? I have no idea how to connect the vectors to points that would create the shape in 3d, and I have no idea how to generate the surfaces that would make it look cool. Sorry if this is a very involved question, but I am completley new to Python so I have no knowledge and little experience in figuring out the best ways to answer my questions.
Thanks!