Followings are the code that I wrote in Octave to creates all the plots shown in this page. You may copy these code and play with these codes. Change variables and try yourself until you get your own intuitive understanding.
< Code 1 >
th = 15*0;
r = 1.0;
arcPts = 0:1.0:th;
arcPts = arcPts*pi/180.0;
x = r*cos(th*pi/180);
y = r*sin(th*pi/180);
pt0 = [0 0];
pt1 = [x 0];
pt2 = [x y];
hFig = figure(1);
clf;
hold on;
line([pt0(1) pt1(1)],[pt0(2) pt1(2)],'LineWidth',3,'Color','black');
line([pt1(1) pt2(1)],[pt1(2) pt2(2)],'LineWidth',3,'Color','red');
line([pt0(1) pt2(1)],[pt0(2) pt2(2)],'LineWidth',3,'Color','blue');
plot(0.2*r*cos(arcPts),0.2*r*sin(arcPts),'r-');
text(0.5 * x,-1*sign(y)*0.04*r,sprintf('%0.5f',x),'HorizontalAlignment','center');
text(x + sign(x)*0.04,0.5 * y,sprintf('%0.5f',y),'HorizontalAlignment','center','Rotation',90);
text(0.5 * x,0.5 * y + 0.05,sprintf('%0.5f',r),'HorizontalAlignment','center','Rotation',th);
text(0.05 * r,0.045 * y,strcat(sprintf('%d',th),'\deg'),'HorizontalAlignment','left');
axis([-r r -r r]);
pbaspect([1 1 1]);
axis off;
hold off;
set(hFig,'Position',[300 200 700 700]);
|