이반석

2043 days ago by math2013

var('t') #변수 선언 var('x0') #변수 선언 var('y0') #변수 선언 A=matrix(3,3,[1, 0, x0, 0, 1, y0, 0, 0, 1]); B=matrix(3,3,[cos(t), -sin(t), 0, sin(t), cos(t), 0, 0, 0, 1]); C=matrix(3,3,[1, 0, -x0, 0, 1, -y0, 0, 0, 1]); D=A*B*C #r(theta) print D var('x') var('y') E=matrix(3,1,[x, y, 1]); F=D*E print F print F 
       
[                     cos(t)                     -sin(t) -x0*cos(t) +
y0*sin(t) + x0]
[                     sin(t)                      cos(t) -x0*sin(t) -
y0*cos(t) + y0]
[                          0                           0                
1]
[x*cos(t) - x0*cos(t) - y*sin(t) + y0*sin(t) + x0]
[x*sin(t) - x0*sin(t) + y*cos(t) - y0*cos(t) + y0]
[                                               1]
[x*cos(t) - x0*cos(t) - y*sin(t) + y0*sin(t) + x0]
[x*sin(t) - x0*sin(t) + y*cos(t) - y0*cos(t) + y0]
[                                               1]
[                     cos(t)                     -sin(t) -x0*cos(t) + y0*sin(t) + x0]
[                     sin(t)                      cos(t) -x0*sin(t) - y0*cos(t) + y0]
[                          0                           0                           1]
[x*cos(t) - x0*cos(t) - y*sin(t) + y0*sin(t) + x0]
[x*sin(t) - x0*sin(t) + y*cos(t) - y0*cos(t) + y0]
[                                               1]
[x*cos(t) - x0*cos(t) - y*sin(t) + y0*sin(t) + x0]
[x*sin(t) - x0*sin(t) + y*cos(t) - y0*cos(t) + y0]
[                                               1]