##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: October, 2016 # Modified: 2016-12-18/21:22-0500 ##+ # # MatrixMode.icn, demonstrate the two matrix modes # Curerntly a work in progress # link fullimag procedure main() window := open("MatrixMode", "gl", "bg=black", "buffer=on", "size=400,260", "dim=3")#, "canvas=hidden") WAttrib(window,"light0=on, ambient blue-green","fg=specular white") # A torus DrawTorus(window, 0.0,0.19,-2.2, 0.3,0.4) Refresh(window) MatrixMode(window, "projection") PushMatrix(window) write(image(IdentityMatrix(window))) write(fullimage(PopMatrix(window))) MatrixMode(window, "modelview") PushMatrix(window) write(image(IdentityMatrix(window))) write(fullimage(PopMatrix(window))) # save image for the document Refresh(window) WSync(window) WriteImage(window, "../images/MatrixMode.png") close(window) end