File:Spherical mean.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(526 × 631 pixels, file size: 38 KB, MIME type: image/png)

Captions

Captions

Add a one-line explanation of what this file represents
Public domain 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]
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.
This math image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}.


It is recommended to name the SVG file “Spherical mean.svg”—then the template Vector version available (or Vva) does not need the new image name parameter.

File history

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

Date/TimeThumbnailDimensionsUserComment
current02:11, 3 April 2007Thumbnail for version as of 02:11, 3 April 2007526 × 631 (38 KB)Oleg Alexandrov (talk | contribs){{PD-self}}

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file: