anchor.diff:      (gl:vertex j k l)))
   
   (defun grid-color (x y)
  +  "set the GL and grid drawing color"
     (setq rgb (aref grid x y))
     (gl:color (first rgb)  (second rgb) (third rgb))
     rgb)
   
  +(defun closnuf (x y)
  +  (< (abs (- x y)) 5))
  +
  +
   (defmethod glut:display ((w wa-mask))
  +  "OpenGL display draw loop, quad drawing"
     (gl:clear :color-buffer)  
     (gl:disable :lighting)
     (loop for x from 0 to (- grid-size 1) do   
          (loop for y from 0 to (- grid-size 1) do  
   	    (setq j (- grid-size (+ 1 y))
  -	       factor .0018)
  +		  factor .010) ;; 0018
  +	    (setq px (floor (/ abs-x 58.0))
  +		  py (floor (/ abs-y 88.0)))
  +;;	    (gl:color (first rgb)  (second rgb) (third rgb))	    
   	    (if (not (eq (grid-color x j) '(0 0 0)))		
  +		(quad (* factor x) (* factor y) 0
  +		      (* factor (+ 1 x)) (* factor y) 0
  +		      (* factor (+ 1 x)) (* factor (+ 1 y)) 0
  +		      (* factor x) (* factor (+ 1 y)) 0))
  +	    (setq rgb '(1 1 1))
  +	    (if (closnuf y py)
   		(quad (* factor x) (* factor y) 0
   		      (* factor (+ 1 x)) (* factor y) 0
   		      (* factor (+ 1 x)) (* factor (+ 1 y)) 0
  
positive.code: (defpackage :wa
    (:use #:cl))
  (in-package :wa)
  (load "utils.lisp")
  (load "cl-event-handler/cl-event-handler.asd")
  (load "cl-evdev/cl-evdev.asd")
  (mapcar
   #'ql:quickload
   '(cl-glut 
     bordeaux-threads
     cl-event-handler
     cl-evdev))
  
  (defparameter evdev-device-file "/dev/input/event16")
  
  (defun set-device (device-file)
    (setq evdev-device-file device-file))
  
  (defun compile-wa-image ()
    (cl-user::save-lisp-and-die "wa"))
  (defun compile-wa-exec ()
    (cl-user::save-lisp-and-die "wa-demo" :executable t :toplevel 'wa))
  
  (defun set-grid (x y value)
    (setf (aref grid x y) value)
    (if (and (> tool-size 1) (< x grid-size) (< y grid-size))
        (loop for i from x to (- 1 (+ x tool-size))
  	 do (loop for j from y to (- 1 (+ y tool-size))
  	       do (if (and (< i grid-size) (< j grid-size))
  		      (setf (aref grid i j) value))))))
  (defun clear-grid (size)
    (setq grid (make-array (list size size)
  		      :initial-element '(0 0 0))
       blue '(0 0 1) )
    (set-grid 0 0 blue)
  
negative.code:   (gl:clear-color 0 0 0 0)
    (gl:matrix-mode :projection)
    (gl:load-identity)
    (gl:ortho 0 1 0 1 -3 1))
  
  (defun quad (a b c  d e f
  	     g h i  j k l)
    "create quad by loading vertices into buffers"
    (gl:with-primitive :polygon
      (gl:vertex a b c)
      (gl:vertex d e f)
  