xmin=-2.2;
xmax=2.2;
ymin=-2.2;
ymax=2.2;

Setwindow([xmin,xmax], [ymin,ymax]);

C1=Paramplot('[2*cos(t), 2*sin(t)]', 't=[0,2*%pi]','N=150');
C2=Paramplot('[cos(t)+1, sin(t)]', 't=[0,2*%pi]','N=150');


theta=%pi/3;
x0=2*cos(theta)*cos(theta);
y0=2*cos(theta)*sin(theta);
x1=2*cos(theta);
y1=2*sin(theta);

L1=Listplot([0,0], [x1,y1]);
L2=Listplot([x0,y0], [2,0]);
L3=Listplot([x0,y0], [x1,y1]);
AG1=Anglemark([2,0], [0,0], [x0,y0], 0.4);
AG2=Paramark([0,0], [x0,y0], [2,0], 0.3);
a=0.6;
C3=Paramplot('[a*cos(t), a*sin(t)]', 't=[0,%pi/2]', 'N=150');

//Windisp(C1, C2, C3, L1, L2, AG1, AG2);


invL3=Listplot([x1,y1], [x0,y0]);  // L3と逆向きの線分
invC3=Paramplot('[a*cos(-t), a*sin(-t)]', 't=[-%pi/2, 0]');  //C3と逆向き
Ah1=Arrowheaddata([x0,y0], invL3, 1.2, 25, 1.5, 'l');  // 矢じり
Ah2=Arrowheaddata([x1,y1], L3, 1.2, 25, 1.5, 'l');     //
Ah3=Arrowheaddata([a,0], invC3, 1.2, 25, 1.5, 'l');    //
Ah4=Arrowheaddata([0,a], C3, 1.2, 25, 1.5, 'l');       //


Openfile('tex/arrow_sample.tex');
Beginpicture('1.2cm');
Drwline(C1, C2, 1.2);
Drwline(L1, L2, AG1, AG2, 1);
Drwline(L3, C3, Ah1, Ah2, Ah3, Ah4, 1.5);

Setpen(3);
Drwpt([x0,y0]);
Drwpt([x1,y1]);
Drwpt([2,0]);
Setpen(0.8);
Expr([x0,y0], 'nw', 'P');
Expr([x1,y1], 'ne', 'Q');
Expr([0.3,0.2], 'c', '\theta');
Expr([2,0], 'se', 'A');
Setpen(1);
Endpicture(1);
Closefile();
