File:Volume under surface.png

原始文件(636 × 762像素,文件大小:56 KB,MIME类型:image/png


描述 Illustration of volume under a surface (double integral)
日期 (UTC)
来源 self-made with MATLAB
作者 Oleg Alexandrov
Public domain 我,本作品著作权人,释出本作品至公有领域。这适用于全世界。
在一些国家这可能不合法;如果是这样的话,那么:
我无条件地授予任何人以任何目的使用本作品的权利,除非这些条件是法律规定所必需的。

Source code (MATLAB)

% illustration of the volume under a surface

function main()
   L=5;  % box size
   N=100; % number of points in a lot of places
   lw=2; % width of lines
   alphatop=1; % transparency
   alphaside=0.82;
   alphabot=0.8;
   bluetop =[0, 1, 0.8];
   blueside=[0.2, 0.9, 0.8]; %bluetop;%[0, 0, 1];
   bluebot=[0.5, 0.5, 0.5]; %bluetop;%[0, 0, 1];
   black=[0, 0, 0];

   % the function whose surface we will plot
   f=inline('10-(x.^2-y.^2)/8', 'x', 'y');
   XX=linspace(-L, L, N);
   YY=XX;
   [X, Y]=meshgrid(XX, YY);
   Z=f(X, Y);

   % the surface of the side
   XS = [XX, 0*XX+L invert_vector(XX), 0*XX-L];
   YS = [0*XX-L, YY, 0*XX+L, invert_vector(YY)];

   XS = [XS' XS']';
   YS = [YS' YS']';

   ZS = 0*XS;
   ZS(2, :) = f(XS(2, :), YS(2, :));

% the contour of the bottom
   XD=[-L, L, L, -L, -L];
   YD=[-L, -L, L, L, -L];
   ZD=XD*0;

%  prepare figure 1 for plotting
   figure(1); clf; hold on; axis equal; axis off;
 
%  plot the function u
   surf(X, Y, Z, 'FaceColor', bluetop, 'EdgeColor','none', 'FaceAlpha', alphatop); % top
   surf(X, Y, 0*Z, 'FaceColor', bluebot, 'EdgeColor','none', 'FaceAlpha', alphabot); % bottom 
   surf(XS, YS, ZS, 'FaceColor', blueside, 'EdgeColor','none', 'FaceAlpha', alphaside); % sides

   phi = -68; theta = 28;
   view (phi, theta);

   camlight headlight; lighting phong; % make nice lightning

   print('-dpng',  '-r200', 'Volume_under_surface.png') % save to file.

function Z = invert_vector(X)

   N=length(X);
   Z = X;
   for i=1:N
      Z(i)=X(N-i+1);
   end

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2007年12月30日 (日) 03:162007年12月30日 (日) 03:16版本的缩略图636 × 762(56 KB)Oleg Alexandrovcrop
2007年12月30日 (日) 03:152007年12月30日 (日) 03:15版本的缩略图1,600 × 1,200(70 KB)Oleg Alexandrov{{Information |Description=Illustration of double integral |Source=self-made with MATLAB |Date=~~~~~ |Author= Oleg Alexandrov |Permission=See below |other_versions= }} {{PD-self}} ==Source code ([[:en:MATLAB

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件:

查看本文件的更多全域用途