Image:Spherical mean.png

From Wikipedia, the free encyclopedia

Wikimedia Commons logo This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is a freely licensed media file repository. You can help.
Public domain I, the copyright holder of this work, hereby release it into the public domain. This applies worldwide.

In case this is not legally possible:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.


Afrikaans | Alemannisch | Aragonés | العربية | Asturianu | Български | Català | Česky | Cymraeg | Dansk | Deutsch | Eʋegbe | Ελληνικά | English | Español | Esperanto | Euskara | Estremeñu | فارسی | Français | Galego | 한국어 | हिन्दी | Hrvatski | Ido | Bahasa Indonesia | Íslenska | Italiano | עברית | Kurdî / كوردی | Latina | Lietuvių | Latviešu | Magyar | Македонски | Bahasa Melayu | Nederlands | ‪Norsk (bokmål)‬ | ‪Norsk (nynorsk)‬ | 日本語 | Polski | Português | Ripoarisch | Română | Русский | Shqip | Slovenčina | Slovenščina | Српски / Srpski | Svenska | ไทย | Tagalog | Türkçe | Українська | Tiếng Việt | Walon | ‪中文(简体)‬ | ‪中文(繁體)‬ | zh-yue-hant | +/-

[edit] Matlab source code


L=5;
N=100;
h=L/N;
r=3;
f=inline('10-(x.^2-y.^2)/15', 'x', 'y');
blue=[0, 0, 1];
red =[1, 0, 0];
black=[0, 0, 0];
lw=1;
fs=20;
tiny1=0.01;
tiny2=0.03;
tiny3=0.02;

XX=-L:h:L;
YY=-L:h:L;
[X, Y]=meshgrid(XX, YY);

Z=f(X, Y);
W = Z*0;

Theta=0:h:2.2*pi;
XC=r*cos(Theta); YC = r*sin(Theta);
ZC = f(XC, YC);

figure(1); clf; hold on; axis equal; axis off;
%view (-34, 44);
view (108, 36);
surf(X, Y, Z, 'FaceColor','red', 'EdgeColor','none');
camlight right; lighting phong; % make nice lightning

% the box at the bottom
XD=[-L, L, L, -L, -L];
YD=[-L, -L, L, L, -L];
ZD=XD*0;
plot3(XD, YD, ZD, 'color', black, 'linewidth', 2*lw);

% the circle on top, and a tiny dot
plot3(XC, YC, ZC+tiny1, 'color', blue, 'linewidth', 3*lw);
fill3(tiny2*XC, tiny2*YC, f(tiny2*XC, tiny2*YC)+2*tiny1, blue, 'LineWidth', 1e-4);

% plot the base circle and a tiny dot
plot3(XC, YC, 0*ZC, 'color', blue, 'linewidth', 3*lw);

H=fill3(tiny2*XC, tiny2*YC, 0*ZC, blue, 'LineWidth', 1e-4);
get(H)

print('-dpng',  '-r300', 'spherical_mean.png') % save to file.


File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current02:11, 3 April 2007526×631 (38 KB)Oleg Alexandrov ({{PD-self}})
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):