(FILECREATED " 4-Mar-85 16:41:05" {ERIS}<LISPCORE>LIBRARY>MATRIXUSE.;2 9303   

      changes to:  (VARS MATRIXUSECOMS)
		   (FNS FOO CREATE1BY3 CREATE1BY4 CREATE3BY1 CREATE3BY3 CREATE4BY1 CREATE4BY4 
			IDENTITY3BY3 IDENTITY4BY4 ROTATE4BY4.ABOUTX ROTATE4BY4.ABOUTY 
			ROTATE4BY4.ABOUTZ SCALE3BY3 SCALE4BY4 TRANSLATE3BY3 TRANSLATE4BY4 SET.XCOORD)
)


(* Copyright (c) 1985 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT MATRIXUSECOMS)

(RPAQQ MATRIXUSECOMS ((FNS CREATE1BY3 CREATE1BY4 CREATE3BY1 CREATE3BY3 CREATE4BY1 CREATE4BY4 
			   IDENTITY3BY3 IDENTITY4BY4 ROTATE3BY3 ROTATE4BY4.ABOUTX ROTATE4BY4.ABOUTY 
			   ROTATE4BY4.ABOUTZ SCALE3BY3 SCALE4BY4 TRANSLATE3BY3 TRANSLATE4BY4)
	(FNS SET.XCOORD SET.YCOORD SET.ZCOORD)
	(FNS GET.XCOORD GET.YCOORD GET.ZCOORD)))
(DEFINEQ

(CREATE1BY3
  [LAMBDA NIL                                                (* hdj "19-Feb-85 19:02")
    (ARRAY 3 (QUOTE FLOATP)
	   0 0])

(CREATE1BY4
  [LAMBDA NIL                                                (* hdj "19-Feb-85 19:02")
    (ARRAY 4 (QUOTE FLOATP)
	   0 0])

(CREATE3BY1
  [LAMBDA NIL                                                (* hdj "19-Feb-85 19:02")
    (ARRAY 3 (QUOTE FLOATP)
	   0 0])

(CREATE3BY3
  [LAMBDA NIL                                                (* hdj "19-Feb-85 19:02")
    (ARRAY 9 (QUOTE FLOATP)
	   0 0])

(CREATE4BY1
  [LAMBDA NIL                                                (* hdj "19-Feb-85 19:02")
    (ARRAY 4 (QUOTE FLOATP)
	   0 0])

(CREATE4BY4
  [LAMBDA NIL                                                (* hdj "19-Feb-85 19:01")
    (ARRAY 16 (QUOTE FLOATP)
	   0 0])

(IDENTITY3BY3
  [LAMBDA (M)                                                (* hdj "22-Feb-85 15:39")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (CREATE3BY3)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX)))
      (for X from 0 to 8 do (\PUTBASEFLOATP MATRIXBASE (DOUBLE X)
					    0.0))
      (SETELT MATRIXBASE 0 0 3 1.0)
      (SETELT MATRIXBASE 1 1 3 1.0)
      (SETELT MATRIXBASE 2 2 3 1.0)
      MATRIX])

(IDENTITY4BY4
  [LAMBDA (M)                                                (* hdj "22-Feb-85 15:41")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (CREATE4BY4)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX)))
      (for X from 0 to 15 do (\PUTBASEFLOATP MATRIXBASE (DOUBLE X)
					     0.0))
      (SETELT MATRIXBASE 0 0 4 1.0)
      (SETELT MATRIXBASE 1 1 4 1.0)
      (SETELT MATRIXBASE 2 2 4 1.0)
      (SETELT MATRIXBASE 3 3 4 1.0)
      MATRIX])

(ROTATE3BY3
  [LAMBDA (THETA RADIANSFLG M)                               (* hdj " 4-Mar-85 16:00")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (CREATE3BY3)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX))
       (COSTHETA (COS THETA RADIANSFLG))
       (SINTHETA (SIN THETA RADIANSFLG)))
      (SETELT MATRIXBASE 0 0 3 COSTHETA)
      (SETELT MATRIXBASE 0 1 3 (FMINUS SINTHETA))
      (SETELT MATRIXBASE 0 2 3 0.0)
      (SETELT MATRIXBASE 1 0 3 SINTHETA)
      (SETELT MATRIXBASE 1 1 3 COSTHETA)
      (SETELT MATRIXBASE 1 2 3 0.0)
      (SETELT MATRIXBASE 2 0 3 0.0)
      (SETELT MATRIXBASE 2 1 3 0.0)
      (SETELT MATRIXBASE 2 2 3 1.0)
      MATRIX])

(ROTATE4BY4.ABOUTX
  [LAMBDA (THETA RADIANSFLG M)                               (* hdj "22-Feb-85 16:22")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (CREATE3BY3)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX))
       (COSTHETA (COS THETA RADIANSFLG))
       (SINTHETA (SIN THETA RADIANSFLG)))
      (for X from 0 to 15 do (\PUTBASEFLOATP MATRIXBASE (DOUBLE X)
					     0.0))
      (SETELT MATRIXBASE 0 0 4 1.0)
      (SETELT MATRIXBASE 1 1 4 COSTHETA)
      (SETELT MATRIXBASE 2 1 4 (FMINUS SINTHETA))
      (SETELT MATRIXBASE 1 2 4 SINTHETA)
      (SETELT MATRIXBASE 2 2 4 COSTHETA)
      (SETELT MATRIXBASE 3 3 4 1.0)
      MATRIX])

(ROTATE4BY4.ABOUTY
  [LAMBDA (THETA RADIANSFLG M)                               (* hdj "22-Feb-85 16:22")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (CREATE3BY3)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX))
       (COSTHETA (COS THETA RADIANSFLG))
       (SINTHETA (SIN THETA RADIANSFLG)))
      (for X from 0 TO 15 do (\PUTBASEFLOATP MATRIXBASE (DOUBLE X)
					     0.0))
      (SETELT MATRIXBASE 0 0 4 COSTHETA)
      (SETELT MATRIXBASE 0 2 4 (FMINUS SINTHETA))
      (SETELT MATRIXBASE 1 1 4 1.0)
      (SETELT MATRIXBASE 2 0 4 SINTHETA)
      (SETELT MATRIXBASE 2 2 4 COSTHETA)
      (SETELT MATRIXBASE 3 3 4 1.0)
      MATRIX])

(ROTATE4BY4.ABOUTZ
  [LAMBDA (THETA RADIANSFLG M)                               (* hdj "22-Feb-85 16:23")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (CREATE3BY3)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX))
       (COSTHETA (COS THETA RADIANSFLG))
       (SINTHETA (SIN THETA RADIANSFLG)))
      (for X from 0 to 15 do (\PUTBASEFLOATP MATRIXBASE (DOUBLE X)
					     0.0))
      (SETELT MATRIXBASE 0 0 4 COSTHETA)
      (SETELT MATRIXBASE 0 1 4 (FMINUS SINTHETA))
      (SETELT MATRIXBASE 1 0 4 SINTHETA)
      (SETELT MATRIXBASE 1 1 4 COSTHETA)
      (SETELT MATRIXBASE 2 2 4 1.0)
      (SETELT MATRIXBASE 3 3 4 1.0)
      MATRIX])

(SCALE3BY3
  [LAMBDA (Sx Sy M)                                          (* hdj "22-Feb-85 15:56")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (CREATE3BY3)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX)))
      (for X from 0 to 8 do (\PUTBASEFLOATP MATRIXBASE (DOUBLE X)
					    0.0))
      (SETELT MATRIXBASE 0 0 3 Sx)
      (SETELT MATRIXBASE 1 1 3 Sy)
      (SETELT MATRIXBASE 2 2 3 1.0)
      MATRIX])

(SCALE4BY4
  [LAMBDA (Sx Sy Sz M)                                       (* hdj "22-Feb-85 15:58")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (CREATE4BY4)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX)))
      (for X from 0 to 15 do (\PUTBASEFLOATP MATRIXBASE (DOUBLE X)
					     0.0))
      (SETELT MATRIXBASE 0 0 4 Sx)
      (SETELT MATRIXBASE 1 1 4 Sy)
      (SETELT MATRIXBASE 2 2 4 Sz)
      (SETELT MATRIXBASE 3 3 4 1.0)
      MATRIX])

(TRANSLATE3BY3
  [LAMBDA (Tx Ty M)                                          (* hdj "22-Feb-85 15:52")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (IDENTITY3BY3)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX)))
      (SETELT MATRIXBASE 0 2 3 Tx)
      (SETELT MATRIXBASE 1 2 3 Ty)
      MATRIX])

(TRANSLATE4BY4
  [LAMBDA (Tx Ty Tz M)                                       (* hdj "22-Feb-85 15:54")
    (LET* ((MATRIX (OR (ARRAYP M)
		       (IDENTITY4BY4)))
       (MATRIXBASE (fetch (ARRAYP BASE) of MATRIX)))
      (SETELT MATRIXBASE 0 3 4 Tx)
      (SETELT MATRIXBASE 1 3 4 Ty)
      (SETELT MATRIXBASE 2 3 4 Tz)
      MATRIX])
)
(DEFINEQ

(SET.XCOORD
  [LAMBDA (VECTOR VALUE)                                     (* hdj " 4-Mar-85 16:31")
    (if (IGREATERP (ARRAYSIZE VECTOR)
		   3)
	then (SETELT (fetch (ARRAYP BASE) of VECTOR)
		     0 0 4 VALUE)
      else (ERROR "Vector too short " VECTOR])

(SET.YCOORD
  [LAMBDA (VECTOR VALUE)                                     (* hdj " 4-Mar-85 16:31")
    (if (IGREATERP (ARRAYSIZE VECTOR)
		   3)
	then (SETELT (fetch (ARRAYP BASE) of VECTOR)
		     1 0 4 VALUE)
      else (ERROR "Vector too short " VECTOR])

(SET.ZCOORD
  [LAMBDA (VECTOR VALUE)                                     (* hdj " 4-Mar-85 16:31")
    (if (IGREATERP (ARRAYSIZE VECTOR)
		   3)
	then (SETELT (fetch (ARRAYP BASE) of VECTOR)
		     2 0 4 VALUE)
      else (ERROR "Vector too short " VECTOR])
)
(DEFINEQ

(GET.XCOORD
  [LAMBDA (VECTOR)                                           (* hdj " 4-Mar-85 16:31")
    (if (IGREATERP (ARRAYSIZE VECTOR)
		   3)
	then (GETELT (fetch (ARRAYP BASE) of VECTOR)
		     0 0 4)
      else (ERROR "Vector too short " VECTOR])

(GET.YCOORD
  [LAMBDA (VECTOR)                                           (* hdj " 4-Mar-85 16:30")
    (if (IGREATERP (ARRAYSIZE VECTOR)
		   3)
	then (GETELT (fetch (ARRAYP BASE) of VECTOR)
		     1 0 4)
      else (ERROR "Vector too short " VECTOR])

(GET.ZCOORD
  [LAMBDA (VECTOR)                                           (* hdj " 4-Mar-85 16:32")
    (if (IGREATERP (ARRAYSIZE VECTOR)
		   3)
	then (GETELT (fetch (ARRAYP BASE) of VECTOR)
		     2 0 4)
      else (ERROR "Vector too short " VECTOR])
)
(PUTPROPS MATRIXUSE COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (790 7377 (CREATE1BY3 800 . 952) (CREATE1BY4 954 . 1106) (CREATE3BY1 1108 . 1260) (
CREATE3BY3 1262 . 1414) (CREATE4BY1 1416 . 1568) (CREATE4BY4 1570 . 1723) (IDENTITY3BY3 1725 . 2204) (
IDENTITY4BY4 2206 . 2727) (ROTATE3BY3 2729 . 3468) (ROTATE4BY4.ABOUTX 3470 . 4199) (ROTATE4BY4.ABOUTY 
4201 . 4930) (ROTATE4BY4.ABOUTZ 4932 . 5661) (SCALE3BY3 5663 . 6137) (SCALE4BY4 6139 . 6654) (
TRANSLATE3BY3 6656 . 6995) (TRANSLATE4BY4 6997 . 7375)) (7378 8309 (SET.XCOORD 7388 . 7693) (
SET.YCOORD 7695 . 8000) (SET.ZCOORD 8002 . 8307)) (8310 9223 (GET.XCOORD 8320 . 8619) (GET.YCOORD 8621
 . 8920) (GET.ZCOORD 8922 . 9221)))))
STOP