aUCBLogo Demos and Tests / test_coordinate_transform
to test_coordinate_transform
phi=137
w1=1
; perspective
clearScreen
W=toMatrix
(list
(list cos w1 -sin w1 0)
(list sin w1 cos w1 0)
(list 0 0 1)
)
T=toMatrix
(list
(list 1 0 1 )
(list 0 cos phi -sin phi)
(list 0 sin phi cos phi)
)
T1=invertMatrix T
mat=ModelviewMatrix
center=FloatArray last mat
R=toMatrix butLast mat
repeat 360
[ R=T1*W*T*R
(setModelviewMatrix R center)
setPenColor HSBA # 1 1 0.3
repeat 4 [fd 100 rt 90]
updateGraph
]
end