元のファイル(1,025 × 1,856 ピクセル、ファイルサイズ: 38キロバイト、MIME タイプ: image/png)

概要

解説 Made by myself with Matlab.
日付 2007年3月1日 (当初のアップロード日)
原典 投稿者自身による著作物
作者 Oleg Alexandrov

ライセンス

Public domain この著作物の著作権者である私は、この著作物における権利を放棄しパブリックドメインとします。これは全世界で適用されます。
一部の国では、これが法的に可能ではない場合があります。その場合は、次のように宣言します。
私は、あらゆる人に対して、法により必要とされている条件を除き、如何なる条件も課すことなく、あらゆる目的のためにこの著作物を使用する権利を与えます。
 
この 図式MATLABで作成されました。

Source code (MATLAB)

 

function main ()

% init stuff
   M=3;  lw=2.5;
   h=0.1; ii = sqrt(-1);
   XX = (-M):h:M; YY = (-M):h:M;
   [X, Y] = meshgrid (XX, YY);

% the surfce determining the contour
   type = 2; % the contour is a circle for type == 1 and something more complex otherwise

   if type == 1
      height = 2;
      Z=height - X.^2-Y.^2;
   else
      height = 0.7;
      Z=height-0.5*(X-1.78).*X.^2.*(X+1.78)-Y.^2;  % Z=f(X, Y) -surface
   end

% find the contour
%figure(1); subplot(2, 1, 1);
   figure(1); clf;
   [C, H] = contour(X, Y, Z, [0, 0]);
   set(H, 'linewidth', lw, 'EdgeColor', [0;0;156]/256);

% draw the region inside the contour
%   figure(1); subplot(2, 1, 1);
   figure(1); 
   clf; hold on; axis equal; axis off; 
   
   l=C(2, 1);
   CX=C(1,2:(l+1));  CY=C(2,2:(l+1)); % get x and y of contours
   H=fill(CX, CY, 0.6*[1, 1, 1]); set(H, 'EdgeColor', 'none'); % draw the shap

   % a hack to make the box look bigger
   white = 0.99*[1, 1, 1]; scale=1.4;
   plot(-scale*M, -scale*M, '*', 'color', white)
   plot(scale*M, scale*M, '*', 'color', white)
   
% calc the unsigned distance function
   Dist = 0*Z+1000;
   for i=1:length(XX)
      for j=1:length(YY)
	 x=X(i, j); y=Y(i, j);
	 for k=1:length(CX)
	    x0=CX(k);
	    y0=CY(k);
	    Dist(i, j) = min(Dist(i, j), sqrt((x-x0)^2+(y-y0)^2));
	 end
      end
   end
   

% signed distance
   Dist = sign(Z).*Dist;
   
% draw the signed distance
%   figure(1); subplot(2, 1, 2);
   figure(2); clf;
   hold on; axis equal; axis off;
   surf(X, Y, Dist, 'FaceColor','red', 'EdgeColor','none', 'FaceAlpha', 1);

% draw the x-y plane (the intersection of the surface above and this plane is the contour of our set)
   surf(X, Y, zeros(length(XX), length(YY)), 'FaceColor','blue', 'EdgeColor','none', 'FaceAlpha', 0.4)
   
   camlight left;lighting phong; % make nice lightning
   view(42, 22)        % angle of view (polar coordinates)

% save to file
   figure(1);   saveas(gcf, sprintf('Set%d.eps', type), 'psc2');
   figure(2);   saveas(gcf, sprintf('Function%d.eps', type), 'psc2');

% then use the following to convert to png
%   convert -append Set2.eps Function2.eps signed_distance2.png
この数学に関する画像は、ベクターイメージである SVG ファイルとして再作成されるべきです。これにはいくつかの利点があります。詳しくはCommons:Media for cleanupを参照してください。この画像の SVG 形式がすでに利用可能である場合は、アップロードしてください。アップロード後、この画像にあるこのテンプレートを{{Vector version available|新しい画像ファイル名.svg}}テンプレートで置き換えてください。

キャプション

このファイルの内容を1行で記述してください

このファイルに描写されている項目

題材

1 3 2007

ファイルの履歴

過去の版のファイルを表示するには、その版の日時をクリックしてください。

日付と時刻サムネイル寸法利用者コメント
現在の版2007年4月30日 (月) 23:482007年4月30日 (月) 23:48時点における版のサムネイル1,025 × 1,856 (38キロバイト)Oleg Alexandrov{{Information |Description= |Source= |Date= |Author= }}
2007年3月1日 (木) 04:342007年3月1日 (木) 04:34時点における版のサムネイル1,026 × 1,856 (60キロバイト)Oleg AlexandrovMade by myself with Matlab.

以下のページがこのファイルを使用しています:

グローバルなファイル使用状況

以下に挙げる他のウィキがこの画像を使っています: