-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaffine.asy
More file actions
40 lines (35 loc) · 960 Bytes
/
Copy pathaffine.asy
File metadata and controls
40 lines (35 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import geometry;
size(7.5cm,0);
pen bpp=linewidth(bp);
point A=(1,0); //dot("A", A, SW);
point B=(2,2); //dot("B", B, N);
point C=(0,1);
//dot("C", C, -dir(C--A,C--B));
draw(A--B--C--cycle);
pair genC(pair a,real theta)
{
real cs, ss ;
cs = cos(pi/2-theta/2);
ss = sin(pi/2-theta/2);
return (cs*a.x-ss*a.y,cs*a.x+ss*a.y)/2/sin(theta/2);
}
pen[] myColors = {red, green, blue, cyan, magenta, yellow};
transform t1;
pair c;
pair [] alphas={(0,0),(1,1),(0,1),(-1,0)};
int i=0;
for(pair a: alphas){
c = genC(a,pi/3);
t1= rotate(60,c) ;
point Ad = t1*A;
point Bd = t1*B;
point Cd = t1*C;
//dot("$A_{"+string(a)+"}$", Ad, SW);
//dot("$B_{"+string(a)+"}$", Bd, SW);
//dot("$C_{"+string(a)+"}$", Cd, SW);
draw(Ad--Bd--Cd--cycle,myColors[i]);
draw((c+(-.15,0))--(c+(.15,0)),myColors[i]); draw((c+(0,-.15))--(c+(0,.15)),myColors[i]);
label("$a=("+string(a.x)+","+string(a.y)+")$",c,3S);
i=i+1;
}
//draw(((-.15,0))--((.15,0))); draw(((0,-.15))--((0,.15)));