Devlog

8-1 삼각함수 그리기

tau = 0:pi/20:2*pi;
omega = 0.35*pi;
figure:plot(tau, sin(omega.*tau));

xlabel('time\tau');
ylabel('sin(\omega\tau)'); % 기호 삽입

title('\it{The Graph of} \rm{y=sin(\omega\tau)}'); % 이탤릭체, 글자체 원래대로 복귀, 진하게

text(pi/omega, 0, '\bullet\leftarrow sin(\pi)', 'fontsize', 18) %점찍기, 화살표, 글자크기 조절
tau = 0:pi/20:2*pi;
omega = 0.35*pi;
figure:plot(tau, cos(omega.*tau));

xlabel('time\tau');
ylabel('cos(\omega\tau)'); % 기호 삽입

title('\it{The Graph of} \rm{y=cos(\omega\tau)}'); % 이탤릭체, 글자체 원래대로 복귀, 진하게

 

8-2 2차원 데이터의 3차원 표면 맵핑(Texture Mapping)

x=imread('lena_gray.bmp');
xt=fliplr(x);
hemisphere=[xt(:, 257:512), x, xt(:, 1:256)];
figure, imshow(hemisphere, gray(256));
figure;
sphere;
h=findobj('Type', 'surface');
xt=x(:, 512:-1:1);
set(h, 'CData', flipud(hemisphere), 'FaceColor', 'testuremap')
colormap(gray(256))
axis equal
view([90 0]);
set(gca, 'CameraViewAngleMode', 'manual');
view([65 30]);

 

 

profile

Devlog

@덩이

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!

검색 태그