You are on page 1of 19

Práctica de Aplicacion #1

Graficando superficies
Curso: Cálculo de Varias Variables

Estudiante: Kevin Josue Intriago Magallan

Primer ejemplo de preproducción:

[x,y]=meshgrid(-4:.25:4);
z=y.^3;
surf(x,y,z)
axis square
xlabel('Eje X'),ylabel('Eje Y'),zlabel('Eje Z')

figure();

DOS PLANOS

[x,y]=meshgrid(-2:.1:2);
surf(x,y,-x+y,'FaceColor','blue')
hold on

1
surf(x,y,2.*x+y-1,'FaceColor','red')

figure();

DOS CILINDROS PARABÓLICOS

[x,y]=meshgrid(-10:.5:10);
z=4-y.^2;w=4-x.^2;surf(x,y,z)
hold on
surf(x,y,w)

2
figure();

FUNCION

[x,y]=meshgrid(-3*pi:.25:3*pi);
z=sin(sqrt(x.^2+y.^2));
surf(x,y,z)
axis([-3*pi 3*pi -3*pi 3*pi -2 2])
colormap bone

3
figure();

SUBGRAFICOS

[x,y]=meshgrid(-3:.2:3);
z1=-x.*y.*exp(-x.^2-y.^2);
z2=x.^2.*y.^2.*exp(-x.^2-y.^2);
subplot(1,2,1)
surf(x,y,z1),axis vis3d
daspect([10 10 1])
subplot(1,2,2)
surf(x,y,z2),axis vis3d
daspect([10 10 1])

4
figure();

SUPERFICIE CON SUS CURVAS DE NIVEL

[x,y]=meshgrid(-4:.1:4);
surfc(x,y,exp(-x.^2)+exp(-y.^2))
axis([-4 4 -4 4 -0.5 2])
view(60,-15),axis off

5
figure();

CURVAS DE NIVEL

[x,y]=meshgrid(-2:.1:2);
z=exp(-x.^2-y.^2);
[C,h]=contour(x,y,z,7),axis square

C = 2×490
0.1253 -0.3395 -0.3000 -0.2000 -0.1000 0 0.1000 0.2000
117.0000 -1.4000 -1.4106 -1.4295 -1.4403 -1.4439 -1.4403 -1.4295
h =
Contour with properties:

LineColor: 'flat'
LineStyle: '-'
LineWidth: 0.5000
Fill: off
LevelList: [0.1253 0.2503 0.3752 0.5002 0.6251 0.7501 0.8750]
XData: [41×41 double]
YData: [41×41 double]
ZData: [41×41 double]

Show all properties

clabel(C,h)
title('Curvas de nivel de z=e^{-x^2-y^2}','FontSize',14)

6
figure();

SUPERFICIE DE REVOLUCION
t=0:.1:4;[x,y,z]=cylinder(sqrt(t));
subplot(1,2,1)
plot(t,sqrt(t))
axis square,title('Curva que genera la superficie')
subplot(1,2,2)
surf(x,y,z),axis vis3d
title('Superficie')

7
figure();

CONO TRUNCADO
t=0:.05:2;[x,y,z]=cylinder(2*(1-t./3));
subplot(1,2,1)
plot(t,2*(1-t./3)),axis([0 2 0 3])
axis square
subplot(1,2,2)
surf(x,y,z),axis vis3d

8
figure();

SUPERFICIE GENERADA POR LA HIPERBOLA

t=-2:.1:2;[x,y,z]=cylinder(sqrt(1+(t.^2)/4));
subplot(1,2,1)
plot(t,sqrt(1+(t.^2)/4)),axis([-2 2 0 3])
axis square
subplot(1,2,2)
surf(x,y,z),axis vis3d

9
figure();

CONOS
t=0:.05:1;
[x,y,z]=cylinder(t);[X,Y,Z]=cylinder(2*t);
subplot(1,2,1)
plot(t,t,t,2*t),axis([0 1 0 3])
axis square
subplot(1,2,2)
surf(x,y,z,'FaceColor','blue')
hold on
surf(X,Y,Z,'FaceColor','green')
axis vis3d

10
figure();

TETAEDROS
t=0:.1:2;[x,y,z]=cylinder(t,3);
subplot(1,2,1)
surf(x,y,-z),axis vis3d,axis off
title('Tetraedro','Fontsize',14)
subplot(1,2,2)
surf(x,y,z),axis vis3d,axis off
title('Tetraedro invertido','Fontsize',14)

11
figure();

PARABOLOIDES
subplot(2,2,1)
ezsurf('x^2+y^2'),axis square
subplot(2,2,2)
ezsurf('x^2+y^2','circ'),axis square
subplot(2,2,3)
ezsurf('4-x^2-y^2'),axis square
subplot(2,2,4)
ezsurf('4-x^2-y^2','circ'),axis square

12
figure();

TORO
t=-1:.05:1;[x,y,z]=cylinder(3+sqrt(1-t.^2));
[x1,y1,z1]=cylinder(3-sqrt(1-t.^2));
subplot(2,1,1)
plot(t,3+sqrt(1-t.^2),t,3-sqrt(1-t.^2))
axis([-2 2 0 4.5]),grid, axis square
subplot(2,1,2)
surf(x,y,z)
hold on,surf(x1,y1,z1)

13
figure();

ELIPSOIDE
u=linspace(0,2*pi,50);
v=linspace(0,pi,40);
[U,V]=meshgrid(u,v);
a=5;b=2;c=1;
X=a*cos(U).*sin(V);
Y=b*sin(U).*sin(V);
Z=c*cos(V);
mesh(X,Y,Z),axis image
xlabel('X'),ylabel('Y'),zlabel('Z')

14
figure();

HEMISFERIOS
u=linspace(0,2*pi,50);
v=linspace(0,pi/2,40);
[U,V]=meshgrid(u,v);
a=2;
X=a*cos(V).*cos(U);
Y=a*cos(V).*sin(U);
Z=a*sin(V);
subplot(1,2,1)
mesh(X,Y,Z,'EdgeColor','red')
axis equal
subplot(1,2,2)
mesh(X,Y,-Z,'EdgeColor','red')
axis equal

15
figure();

GRAFICAS ADICIONALES
PARABOLOIDE ELIPTICO
[y,z]=meshgrid(-8:.5:8,-8:.5:8);
x=(3*y.^2+7*z.^2)./6

x = 33×33
106.6667 102.7917 99.1667 95.7917 92.6667 89.7917 87.1667 84.7917
97.6250 93.7500 90.1250 86.7500 83.6250 80.7500 78.1250 75.7500
89.1667 85.2917 81.6667 78.2917 75.1667 72.2917 69.6667 67.2917
81.2917 77.4167 73.7917 70.4167 67.2917 64.4167 61.7917 59.4167
74.0000 70.1250 66.5000 63.1250 60.0000 57.1250 54.5000 52.1250
67.2917 63.4167 59.7917 56.4167 53.2917 50.4167 47.7917 45.4167
61.1667 57.2917 53.6667 50.2917 47.1667 44.2917 41.6667 39.2917
55.6250 51.7500 48.1250 44.7500 41.6250 38.7500 36.1250 33.7500
50.6667 46.7917 43.1667 39.7917 36.6667 33.7917 31.1667 28.7917
46.2917 42.4167 38.7917 35.4167 32.2917 29.4167 26.7917 24.4167

surf(x,y,z)
title('paraboloide elíptico ')

16
figure();

HIPERBOLOIDE ELIPTICO DE DOS HOJAS

[y,z]=meshgrid(-8:.5:8,-8:.5:8);
x1=sqrt(4*y.^2+z.^2+100)./5;
surf(x1,y,z)
hold on
[y,z]=meshgrid(-8:.5:8,-8:.5:8);
x2=-sqrt(4*y.^2+z.^2+100)./5;
surf(x2,y,z)
title('HIPERBOLOIDE ELIPTICO DE DOS HOJAS ')

17
figure();

ELIPSOIDE

[y,z]=meshgrid(-6:.5:6,-11:.5:11);
x1=real(sqrt(100-4*y.^2-z.^2)./5);
surf(x1,y,z)
hold on
[y,z]=meshgrid(-6:.5:6,-11:.5:11);
x2=-real(sqrt(100-4*y.^2-z.^2)./5);
surf(x2,y,z)
title('ELIPSOIDE ')

18
figure();

19

You might also like