File:Bump2D illustration.png

原始檔案(1,604 × 986 像素,檔案大小:179 KB,MIME 類型:image/png


摘要

描述 A bump function in 2D
日期
來源 自己的作品
作者 Oleg Alexandrov
PNG開發
InfoField
 
本PNG 點陣圖使用MATLAB創作。
原始碼
InfoField

MATLAB code

% illustration of a bump function in two dimensions
function main()

   % the number of data points. More points means prettier picture.
   N = 300;

   % a function close to what we want, but not smooth
   Z = get_step_function (N);

   % a smooth function with small support, that will serve as mollifier
   W = get_mollifier     (N);

% get the convolution of the two, so a mollified step function
   S = conv2(Z, W);

% truncate S at the edges, and scale it
   p=0.2;
   [m, n] = size(S);
   m1 = floor(p*m)+1; m2=floor((1-p)*m)-1;
   n1 = floor(p*n)+1; n2=floor((1-p)*n)-1;
   S = S(m1:m2, n1:n2);
   S = 100*S/max(max(S));
   
% plot the surface
   figure(2); clf; hold on; axis equal; axis off;
   surf(S);
   
% make the surface beautiful
   shading interp;
   colormap autumn;

% add in a source of light
   camlight (-50, 54);
   
% viewing angle
   view(-40, 38);

   % save as png
  print('-dpng', '-r400', 'Bump2D_illustration_uncropped.png');

  % optionally, crop the margins
  !convert -trim Bump2D_illustration_uncropped.png Bump2D_illustration.png
  
% get a function which is 1 on a set, and 0 outside of it
function Z = get_step_function(N)
   XX = linspace(-1.5, 4, N);
   YY = linspace(-4, 4, N);
   [X, Y] = meshgrid(XX, YY);
   
   c = 2;
   k=1.2;
   shift=10;
   Z = (c^2-X.^2-Y.^2).^2 + k*(c-X).^3-shift;
   
   Z =1-max(sign(Z), 0);

function W = get_mollifier(N)
% now try to get a function with compact support
% as a mollifier
% We will cheat by using a gaussian

   a = 4;
   XX = linspace(-a, a, N);
   YY = linspace(-a, a, N);
   [X, Y] = meshgrid(XX, YY);
   
   K = 4;
   W = exp(-K*(X.^2+Y.^2));

   % truncate the Gaussian to make it with compact support
   trunc = 1e-2;
   W = max(W-trunc, 0);

授權條款

Public domain 我,此作品的版權所有人,釋出此作品至公共領域。此授權條款在全世界均適用。
這可能在某些國家不合法,如果是的話:
我授予任何人有權利使用此作品於任何用途,除受法律約束外,不受任何限制。

說明

添加單行說明來描述出檔案所代表的內容

在此檔案描寫的項目

描繪內容

沒有維基數據項目的某些值

維基媒體使用者名稱 繁體中文 (已轉換拼寫):​Oleg Alexandrov
作者姓名字串 繁體中文 (已轉換拼寫):​Oleg Alexandrov

著作權狀態 繁體中文 (已轉換拼寫)

檔案來源 Chinese (Taiwan) (已轉換拼寫)

上傳者的原創作品 繁體中文 (已轉換拼寫)

多媒體型式 繁體中文 (已轉換拼寫)

image/png

校驗和 繁體中文 (已轉換拼寫)

115be195be93ff68b2c3752960f1921ada54db78

斷定方法:​SHA-1 中文 (已轉換拼寫)

183,286 位元組

986 像素

1,604 像素

檔案歷史

點選日期/時間以檢視該時間的檔案版本。

日期/時間縮⁠圖尺寸用戶備⁠註
目前2007年8月8日 (三) 03:15於 2007年8月8日 (三) 03:15 版本的縮圖1,604 × 986(179 KB)Oleg AlexandrovTrying to fix some odd issues with the bounding box.
2007年8月8日 (三) 03:11於 2007年8月8日 (三) 03:11 版本的縮圖1,590 × 979(186 KB)Oleg Alexandrov{{Information |Description=A bump function in 2D |Source=self-made |Date=~~~~~ |Author= Oleg Alexandrov }} {{PD-self}} Category:Partial differential equations
2007年8月8日 (三) 03:11於 2007年8月8日 (三) 03:11 版本的縮圖1,590 × 979(186 KB)Oleg Alexandrov{{Information |Description=A bump function in 2D |Source=self-made |Date=~~~~~ |Author= Oleg Alexandrov }} {{PD-self}} Category:Partial differential equations
2007年8月8日 (三) 03:08於 2007年8月8日 (三) 03:08 版本的縮圖1,590 × 979(186 KB)Oleg Alexandrov{{Information |Description=A bump function in 2D |Source=self-made |Date=~~~~~ |Author= Oleg Alexandrov }} {{PD-self}} Category:Partial differential equations

下列頁面有用到此檔案:

全域檔案使用狀況

以下其他 wiki 使用了這個檔案: