| Refresh | Home EGTry.com

matrix


transform (x1,y1) to (x2,y2)

matrix: a b c d tx ty
x2=a*x1+c*y1+tx
y2=b*x1+d*y1+ty


instruction stack common
10 20 matrix translate [1.0 0.0 0.0 1.0 10.0 20.0]
1 2 matrix scale [1.0 0.0 0.0 2.0 0.0 0.0]
30 matrix rotate [cos(30) sin(30) -sin(30) cos(30) 0.0 0.0]
1 2 [1 2 0 1 0 0] transform 1.0 4.0 y2=b*x1+y1 or 4=2*1+2
1 2 [1 0 2 1 0 0] transform 5.0 2.0 x2=x1+c*y or 5=1+2*2