REM projective Transformation
OPTION ANGLE DEGREES
LET t=10                       ! elevation  
LET v=16                       ! Half of virtical angle
SET COLOR MODE "NATIVE"         ! enables true color
GLOAD "zenkouji.jpg" 
ASK PIXEL SIZE (0,0; 1,1) a,b   ! inquire pixel size of the image
DIM p(a,b)                      ! prepare array elements 
ASK PIXEL ARRAY (0,1) p         ! store color infomations of all points
CLEAR                           ! erase the image
SET BITMAP SIZE 401,401            ! re-size the window
SET WINDOW -200, 200, -100, 300    ! re-arrage the coordinate
DRAW grid(100,100) 
LET d=b/2/TAN(v)/COS(t)
LET c=d*SIN(t) 
DIM m(4,4)                      ! transformation shall be assigned by an array 
MAT m=IDN
LET m(2,2)=COS(t)
LET m(2,4)=-SIN(t)/d
DRAW pict1 WITH m
PICTURE pict1
   MAT PLOT CELLS, IN  -a/2 + 1, c+b/2 ; a/2  , c-b/2 + 1 : p
END PICTURE
END 
 
