anchor.diff:                            0.0 0.0 (- near far) 0.0
                             0.0 0.0 0.0 1.0))
              
  -           (ntrans (mat-mul (rotate-z (/ pi 1.2)) (mat-mul screen-trans (mat-mul (rotate-y (/ pi 4)) trans)))))
  +           ;; (ntrans (mat-mul (rotate-z (/ pi 1.2)) (mat-mul screen-trans (mat-mul (rotate-y (/ pi 4)) trans))))
  +           (ntrans (mat-mul (translate (- (* 2.0 pi)) 0 (- (* 2.0 pi))) (mat-mul (rotate-x (/ pi 5)) (mat-mul (rotate-z (/ pi 5)) (mat-mul (rotate-y (/ pi 5))  (mat-mul screen-trans trans)))))))
  +
  +      (let* ((xmin 0.0)
  +             (xmax (* pi 4))
  +             (ymin 0.0)
  +             (ymax (* pi 4))
  +             (xsteps 50)
  +             (ysteps 50)
  +             (dx (/ (- xmax xmin) xsteps))
  +             (dy (/ (- ymax ymin) ysteps))
  +             (cx xmin)
  +             (cy ymin))
  +        (flet ((fxy (xv yv)
  +                 (* 4.0 (sin xv) (cos yv))))
  +        
  +          (loop for i below xsteps
  +             do
  +               (loop for j below ysteps
  +                  do
  +                    (let* ((cx (+ xmin (* dx i)))
  +                           (cy (+ ymin (* dy j)))
  +                           (p1 (create-pt3d cx (fxy cx cy) cy))
  +                           (p2 (create-pt3d (+ cx dx) (fxy (+ cx dx) cy) cy))
  +                           (p3 (create-pt3d (+ cx dx) (fxy (+ cx dx) (+ cy dy)) (+ cy dy)))
  +                           (p4 (create-pt3d cx (fxy cx (+ cy dy)) (+ cy dy))))
  +                      (draw-quad canv ntrans p1 p2 p3 p4))))))
  +             ;;                      (let ((xp (create-pt3d (coerce i 'single-float) 0.0 0.0))
  +             ;;     (yp (create-pt3d 0.0 (coerce i 'single-float) 0.0))
  +             ;;     (zp (create-pt3d 0.0 0.0 (coerce i 'single-float))))
  +             ;; (draw-pt3d canv ntrans xp)
  +             ;; (draw-pt3d canv ntrans yp)
  +             ;; (draw-pt3d canv ntrans zp)))
         
  -      (loop for i from -10 to 10
  -         do
  -           (let ((xp (create-pt3d (coerce i 'single-float) 0.0 0.0))
  -                 (yp (create-pt3d 0.0 (coerce i 'single-float) 0.0))
  -                 (zp (create-pt3d 0.0 0.0 (coerce i 'single-float))))
  -             (draw-pt3d canv ntrans 
  -                        xp
  -                        left right bottom top width height)
  -             (draw-pt3d canv ntrans 
  -                        yp
  -                        left right bottom top width height)
  -             (draw-pt3d canv ntrans 
  -                        zp
  -                        left right bottom top width height)))
         (ltk:pack canv))))
   
   (declaim (inline tol-equal))
  
positive.code:   (pt1 (make-pt3d) :type pt3d)
    (pt2 (make-pt3d) :type pt3d))
  
  (defmacro scale-val (val minval maxval minnew maxnew)
    `(let ((new-diff (- ,maxnew ,minnew))
           (old-diff (- ,maxval ,minval))
           (val-diff (- ,val ,minval)))
       (+ (* (/ val-diff old-diff) new-diff) ,minnew)))
  
  (declaim (inline draw-line3d))
  (defun draw-line3d (canvas mat p1 p2 xmin xmax ymin ymax width height)
    (let ((tp1 (xform p1 mat))
          (tp2 (xform p2 mat)))
      (let ((pt1x (pt3d-x tp1))
  
negative.code: 
  ;; Convienence function to create a pt3d with x,y,z and possible w values
  ;; (declaim (inline create-pt3d))
  (defun create-pt3d (x y z &optional (w 1.0d0))
    ;; (declare (type single-float x y z w))
    (the pt3d (make-pt3d :pt (make-array 4 :element-type 'single-float :initial-contents (list (coerce x 'single-float)
                                                                                               (coerce y 'single-float)
                                                                                               (coerce z 'single-float)
                                                                                               (coerce w 'single-float))))))
  
  (declaim (inline get-pt))
  (defun get-pt (pt idx)
  