REM Perspective transformation
DIM m(4,4)                     
MAT m=IDN
LET m(2,4)=-1/500
SET COLOR MODE "NATIVE" 
GLOAD "ZENKOUJI.JPG" 
ASK PIXEL SIZE (0,0; 1,1) a,b 
DIM p(a,b)                    
ASK PIXEL ARRAY (0,1) p       
SET BITMAP SIZE 601,601       
CLEAR                         
SET WINDOW -300, 300, -50, 550 
DRAW grid(100,100)             
DRAW pict1                     
WAIT DELAY 2                   
CLEAR                          
DRAW grid(100,100)
DRAW pict1 WITH m        
PICTURE pict1
   MAT PLOT CELLS, IN  -a/2, b ; a/2-1, 1 : p
END PICTURE
END

