File:Volume under surface.png
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this preview: 500 × 599 pixels. Other resolutions: 200 × 240 pixels | 636 × 762 pixels.
Original file (636 × 762 pixels, file size: 56 KB, MIME type: image/png)
File information
Structured data
Captions
DescriptionVolume under surface.png | Illustration of volume under a surface (double integral) |
Date | (UTC) |
Source | self-made with MATLAB |
Author | Oleg Alexandrov |
Public domainPublic domainfalsefalse |
I, the copyright holder of this work, release this work into the public domain. This applies worldwide. In some countries this may not be legally possible; if so: I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law. |
Source code (MATLAB)[edit]
% 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
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 03:16, 30 December 2007 | 636 × 762 (56 KB) | Oleg Alexandrov (talk | contribs) | crop | |
03:15, 30 December 2007 | 1,600 × 1,200 (70 KB) | Oleg Alexandrov (talk | contribs) | {{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 |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on ar.wikipedia.org
- Usage on ast.wikipedia.org
- Usage on az.wikipedia.org
- Usage on ba.wikipedia.org
- Usage on bs.wikipedia.org
- Usage on ca.wikipedia.org
- Usage on ckb.wikipedia.org
- Usage on cs.wikipedia.org
- Usage on cv.wikipedia.org
- Usage on de.wikiversity.org
- Kurs:Mathematik (Osnabrück 2009-2011)/Teil III/Vorlesung 70
- Kurs:Mathematik (Osnabrück 2009-2011)/Teil III/Vorlesung 70/kontrolle
- Kurs:Mathematik für Anwender (Osnabrück 2011-2012)/Teil II/Vorlesung 56
- Kurs:Analysis (Osnabrück 2013-2015)/Teil III/Vorlesung 69
- Kurs:Analysis (Osnabrück 2014-2016)/Teil III/Vorlesung 69
- Kurs:Analysis (Osnabrück 2014-2016)/Teil III/Vorlesung 69/kontrolle
- Kurs:Mathematik für Anwender (Osnabrück 2019-2020)/Teil II/Vorlesung 59
- Kurs:Mathematik für Anwender (Osnabrück 2019-2020)/Teil II/Vorlesung 59/kontrolle
- Kurs:Mathematik für Anwender (Osnabrück 2020-2021)/Teil II/Vorlesung 59
- Kurs:Mathematik für Anwender (Osnabrück 2020-2021)/Teil II/Vorlesung 59/kontrolle
- Kurs:Maß- und Integrationstheorie (Osnabrück 2022-2023)/Vorlesung 9
- Kurs:Maß- und Integrationstheorie (Osnabrück 2022-2023)/Vorlesung 9/kontrolle
- Kurs:Analysis (Osnabrück 2013-2015)/Teil III/Vorlesung 69/kontrolle
- Kurs:Mathematik für Anwender (Osnabrück 2011-2012)/Teil II/Vorlesung 56/kontrolle
- Usage on el.wikipedia.org
- Usage on en.wikipedia.org
- Usage on eo.wikipedia.org
- Usage on es.wikipedia.org
- Usage on eu.wikipedia.org
- Usage on fa.wikipedia.org
- Usage on fi.wikipedia.org
- Usage on fr.wikipedia.org
- Usage on fr.wikiversity.org
- Usage on gl.wikipedia.org
- Usage on hu.wikipedia.org
- Usage on id.wikipedia.org
- Usage on ja.wikipedia.org
- Usage on jbo.wikipedia.org
- Usage on kn.wikipedia.org
- Usage on ko.wikipedia.org
- Usage on nl.wikipedia.org
- Usage on no.wikipedia.org
- Usage on pl.wikipedia.org
View more global usage of this file.