Вы находитесь на странице: 1из 2

ellipsoid

Generate ellipsoid

Syntax
[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr,n)
[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr)
ellipsoid(axes_handle,...)
ellipsoid(...)

Description
[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr,n) generates a surface mesh described by three n+1-
by-n+1 matrices, enabling surf(x,y,z) to plot an ellipsoid with center (xc,yc,zc) and semi-axis
lengths (xr,yr,zr).
[x,y,z] = ellipsoid(xc,yc,zc,xr,yr,zr) uses n = 20.
ellipsoid(axes_handle,...) plots into the axes with handle axes_handle instead of the current
axes (gca).
ellipsoid(...) with no output arguments plots the ellipsoid as a surface.

surf
Surface plot

Syntax
surf(X,Y,Z)
surf(X,Y,Z,C)
surf(Z)
surf(Z,C)
surf(ax,___)
surf(___,Name,Value)
s = surf(___)

Description
surf(X,Y,Z) creates a three-dimensional surface plot. The function plots the values in matrix Z as
heights above a grid in the x-y plane defined by Xand Y. The function also uses Z for the color data, so
color is proportional to height.

rotate
Rotate object about specified origin and direction

Syntax
rotate(h,direction,alpha)
rotate(...,origin)

Description
The rotate function rotates a graphics object in three-dimensional space.

Ejemplos
[x, y, z] = ellipsoid(0,0,0,10,5,5,30);
S = surf(x, y, z);
axis equal
xlabel('X')
ylabel('Y')
zlabel('Z')
%rotate(S,[0 0 1],45)

%%
[x, y, z] = ellipsoid(0,0,0,10,5,5,30);
S = surf(x, y, z);
axis equal
xlabel('X')
ylabel('Y')
zlabel('Z')
rotate(S,[0 0 1],90)

Вам также может понравиться