파일:Bump2D illustration.png

testwiki
둘러보기로 이동 검색으로 이동
    원본 파일 (1,604 × 986 픽셀, 파일 크기: 179 KB, MIME 종류: image/png)

    이 파일은 위키미디어 공용에 있으며, 다른 프로젝트에서 사용하고 있을 가능성이 있습니다. 해당 파일에 대한 설명이 아래에 나와 있습니다.

    파일 설명

    설명 A bump function in 2D
    날짜
    출처 자작
    저자 Oleg Alexandrov
    PNG 발전
    InfoField
     이 다이어그램 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 나는 이 작품의 저작권자로서, 이 작품을 퍼블릭 도메인으로 모두에게 공개합니다. 이 공개 선언은 전 세계적으로 유효합니다.
    만약 저작권의 포기가 법률적으로 가능하지 않은 경우,
    나는 이 작품을 법적으로 허용되는 한도 내에서 누구나 자유롭게 어떤 목적으로도 제한없이 사용할 수 있도록 허용합니다.

    설명

    이 파일이 나타내는 바에 대한 한 줄 설명을 추가합니다

    이 파일에 묘사된 항목

    다음을 묘사함

    115be195be93ff68b2c3752960f1921ada54db78

    183,286 바이트

    986 화소

    1,604 화소

    파일 역사

    날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.

    날짜/시간섬네일크기사용자설명
    현재2007년 8월 8일 (수) 04:152007년 8월 8일 (수) 04:15 판의 섬네일1,604 × 986 (179 KB)wikimediacommons>Oleg AlexandrovTrying to fix some odd issues with the bounding box.

    이 파일을 사용하는 문서가 없습니다.