Question

In: Advanced Math

I'm stuck on this python exercise using plots Consider the hyperbolic paraboloid function: z=x^2−y^2 Create several...

I'm stuck on this python exercise using plots

Consider the hyperbolic paraboloid function:

z=x^2−y^2

Create several plots of the hyperbolic paraboloid function. Use true aspect ratio and label all axes.

Any help would be appreciated!Matlab can be used as long as the code can be used in Python as well

Solutions

Expert Solution

from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import numpy as np

fig = plt.figure()
ax = fig.gca(projection='3d')

#making numbers starting from 0 to 5 (0 0.1 0.2 0.3 ............4.9 5)
t1 = np.linspace(0, 5, 51)
t2 = np.linspace(0,2*math.pi,21)
[r,the]=np.meshgrid(t1,t2);
x1=np.multiply(r,np.cos(the));
y1=np.multiply(r,np.sin(the));
z1=np.square(x1)-np.square(y1);

# Plot the surface.

surf = ax.plot_surface(x1, y1, z1, cmap=cm.coolwarm,
                       linewidth=0, antialiased=False)
ax.set_title('hyperbolic paraboloid')
ax.set_xlabel('x1')
ax.set_ylabel('y1')
ax.set_zlabel('z1')


# please see this https://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html#mplot3d-tutorial
#you can use subplot also

#ax.legend()
# Customize the z axis.
#ax.set_zlim(-1.01, 1.01)
#ax.zaxis.set_major_locator(LinearLocator(10))
#ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))

# Add a color bar which maps values to colors.
#fig.colorbar(surf, shrink=0.5, aspect=5)

plt.show()


Related Solutions

h Consider a solid T enclosed by the paraboloid z = x^2 +y^2 and the plane...
h Consider a solid T enclosed by the paraboloid z = x^2 +y^2 and the plane z = 4 (the solid above the paraboloid and below the plane). Let M the (closed) surface representing the boundary surface of T. The surface M consists of two surfaces: the paraboloid M1 and the lid M2. Orient M by an outward normal. Let F=(z,2y,-2) Compute the integral using the Divergence theorem. Carry out the computation of the triple integral using the spherical coordinates.
So we have a paraboloid x^2 + y^2 - 2 = z and the plane x...
So we have a paraboloid x^2 + y^2 - 2 = z and the plane x + y +z = 1 how do we find the center of mass? For some reason we have to assume the uniform density is 8? Seems complicated because I don't know where to start?
Find the surface area of the part of the paraboloid x = y^2 + z^2 that...
Find the surface area of the part of the paraboloid x = y^2 + z^2 that lies inside the cylinder y^2 + z^2 = 25
Consider the following function: f (x , y , z ) = x 2 + y...
Consider the following function: f (x , y , z ) = x 2 + y 2 + z 2 − x y − y z + x + z (a) This function has one critical point. Find it. (b) Compute the Hessian of f , and use it to determine whether the critical point is a local man, local min, or neither? (c) Is the critical point a global max, global min, or neither? Justify your answer.
find the surface area of the paraboloid z = 4−x^2 −y^2 in the first octant.
find the surface area of the paraboloid z = 4−x^2 −y^2 in the first octant.
The plane x + y + 2z = 12 intersects the paraboloid z = x2 +...
The plane x + y + 2z = 12 intersects the paraboloid z = x2 + y2 in an ellipse. Find the points on the ellipse that are nearest to and farthest from the origin. nearest point      (x, y, z) =    farthest point      (x, y, z) =   
Given function f(x,y,z)=x^(2)+2*y^(2)+z^(2), subject to two constraints x+y+z=6 and x-2*y+z=0. find the extreme value of f(x,y,z)...
Given function f(x,y,z)=x^(2)+2*y^(2)+z^(2), subject to two constraints x+y+z=6 and x-2*y+z=0. find the extreme value of f(x,y,z) and determine whether it is maximum of minimum.
F(x,y,z) = x^2z^2i + y^2z^2j + xyz k S is the part of the paraboloid z...
F(x,y,z) = x^2z^2i + y^2z^2j + xyz k S is the part of the paraboloid z = x^2+y^2that lies inside the cylinder x^2+y^2 = 16, oriented upward.
Find the maximum and minimum of the function f(x, y, z) = (x^2)(y^2)z in the region...
Find the maximum and minimum of the function f(x, y, z) = (x^2)(y^2)z in the region D = {(x, y, z)|x^2 + 2y^2 + 3z^2 ≤ 1}.
Consider the surfaces x^2 + y^2 + z^2 = 1 and (z +√2)2 = x^2 +...
Consider the surfaces x^2 + y^2 + z^2 = 1 and (z +√2)2 = x^2 + y^2, and let (x0, y0, z0) be a point in their intersection. Show that the surfaces are tangent at this point, that is, show that the have a common tangent plane at (x0, y0, z0).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT