파일:Simple set2.png
testwiki
둘러보기로 이동
검색으로 이동
미리 보기 크기: 749 × 599 픽셀 다른 해상도: 300 × 240 픽셀 | 600 × 480 픽셀 | 960 × 768 픽셀 | 1,267 × 1,014 픽셀
원본 파일 (1,267 × 1,014 픽셀, 파일 크기: 6 KB, MIME 종류: image/png)
이 파일은 위키미디어 공용에 있으며, 다른 프로젝트에서 사용하고 있을 가능성이 있습니다. 해당 파일에 대한 설명이 아래에 나와 있습니다.
파일 설명
| 설명Simple set2.png | Made by myself with matlab. |
| 날짜 | 2007년 2월 7일 (원본 올리기 일시) |
| 출처 | 자작 |
| 저자 | Oleg Alexandrov |
라이선스
| Public domainPublic domainfalsefalse |
| 나는 이 작품의 저작권자로서, 이 작품을 퍼블릭 도메인으로 모두에게 공개합니다. 이 공개 선언은 전 세계적으로 유효합니다. 만약 저작권의 포기가 법률적으로 가능하지 않은 경우, 나는 이 작품을 법적으로 허용되는 한도 내에서 누구나 자유롭게 어떤 목적으로도 제한없이 사용할 수 있도록 허용합니다. |
Source code (MATLAB)
% split a union of rectangles into a union of rectangles without overlaps
function main()
M=10; imag_root=sqrt(-1); lw=2.5; Ball_rad=0.03;
figure(2); clf; hold on; axis equal; axis off;
% plot the outer polygonal curve
color = [139;10;80]/256;
X=[-2.3677 1.7624 0.1177 4.6499 -3.6469 0.6659 3.4803 6.8794];
Y=[-3.1177 0.2814 -1.1440 2.6937 -0.4496 3.8268 1.5241 5.1425];
% a dummy plot to avoid a matlab bug causing some lines to appear too thin
C=1.05;
plot(C*min(X), C*min(Y), '*', 'color', 0.99*[1, 1, 1]);
plot(C*max(X), C*max(Y), '*', 'color', 0.99*[1, 1, 1]);
% plot the big rectangles, and fill their interiors
n=length(X)/2;
for i=1:n
ax=X(2*i-1); bx=X(2*i);
ay=Y(2*i-1); by=Y(2*i);
% plot the rectangle
plot([ax bx bx ax ax], [ay ay by by ay], 'linewidth', lw, 'color', color);
% round off the corners (a cosmetic thing)
round_ball(ax+imag_root*ay, Ball_rad, color');
round_ball(ax+imag_root*by, Ball_rad, color');
round_ball(bx+imag_root*ay, Ball_rad, color');
round_ball(bx+imag_root*by, Ball_rad, color');
end
% plot the interiors all the small rectangles
XS=sort(X); YS = sort (Y);
for l=1:(length(XS)-1);
for m=1:(length(YS)-1)
cx=XS(l); dx=XS(l+1);
cy=YS(m); dy=YS(m+1);
success=0; % don't fill a rectangle more than once (will show up darker then)
for i=1:n
ax=X(2*i-1); bx=X(2*i);
ay=Y(2*i-1); by=Y(2*i);
if ax <= cx & dx <= bx & ay <= cy & dy <= by & success ==0
success=1;
fill([cx dx dx cx], [cy cy dy dy], color'/2, 'FaceAlpha', 0.3, 'linewidth', 0.01, 'EdgeAlpha', 0);
end
end
end
end
% plot the edges of all rectanges
for i=1:n
ax=X(2*i-1); bx=X(2*i);
ay=Y(2*i-1); by=Y(2*i);
for l=1:length(XS);
u=XS(l);
if ax < u & u < bx
plot([u u], [ay, by], 'linewidth', lw, 'color', color);
end
end
for l=1:length(YS);
v=YS(l);
if ay < v & v < by
plot([ax bx], [v, v], 'linewidth', lw, 'color', color);
end
end
end
saveas(gcf, 'simple_set2.eps', 'psc2');
function round_ball(z, r, color)
x=real(z); y=imag(z);
Theta = 0:0.1:2*pi;
X = r*cos(Theta)+x;
Y = r*sin(Theta)+y;
Handle = fill(X, Y, color);
set(Handle, 'EdgeColor', color);
이 그림 파일은 벡터 SVG 형식으로 다시 만들어야 합니다. SVG의 장점에 대해서는 여기(영어)를 참고해 주십시오. 만약 이 그림의 SVG 버전이 이미 존재한다면 이 틀을
{{vector version available|새 파일 이름}}으로 대체해 주십시오. |
설명
이 파일이 나타내는 바에 대한 한 줄 설명을 추가합니다
이 파일에 묘사된 항목
다음을 묘사함
위키데이터 항목 없는 어떤 값
7 2 2007
image/png
파일 역사
날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.
| 날짜/시간 | 섬네일 | 크기 | 사용자 | 설명 | |
|---|---|---|---|---|---|
| 현재 | 2007년 2월 7일 (수) 05:01 | 1,267 × 1,014 (6 KB) | wikimediacommons>Oleg Alexandrov | Made by myself with matlab. |
이 파일을 사용하는 문서
다음 문서 1개가 이 파일을 사용하고 있습니다: