 ; Tess - draw a tesseract.
 ; Copyright 1994 by Rocket Software
 ; Why stop with 3D?
 (DEFUN C:TESS (/ pa pax pay paz len lenq len3 p400 p404 p004 p040 p440 p444
                                p044 p111 p311 p313 p113 p131 p331 p333 p133)
  (setq pa (getpoint "Base point: "))
  (setq pax (car pa))
  (setq pay (cadr pa))
  (setq paz (caddr pa))
  (setq len (getdist pa "Side length: "))
  (setq lenq (/ len 4.0))
  (setq len3 (* len 0.75))
  (setq p400 (list (+ pax len) pay paz))
  (setq p404 (list (+ pax len) pay (+ paz len)))
  (setq p004 (list pax pay (+ paz len)))
  (setq p040 (list pax (+ pay len) paz))
  (setq p440 (list (+ pax len) (+ pay len) paz))
  (setq p444 (list (+ pax len) (+ pay len) (+ paz len)))
  (setq p044 (list pax (+ pay len) (+ paz len)))
  (setq p111 (list (+ pax lenq) (+ pay lenq) (+ paz lenq)))
  (setq p311 (list (+ pax len3) (+ pay lenq) (+ paz lenq)))
  (setq p313 (list (+ pax len3) (+ pay lenq) (+ paz len3)))
  (setq p113 (list (+ pax lenq) (+ pay lenq) (+ paz len3)))
  (setq p131 (list (+ pax lenq) (+ pay len3) (+ paz lenq)))
  (setq p331 (list (+ pax len3) (+ pay len3) (+ paz lenq)))
  (setq p333 (list (+ pax len3) (+ pay len3) (+ paz len3)))
  (setq p133 (list (+ pax lenq) (+ pay len3) (+ paz len3)))
  (command "3dpoly" p131 p040
                    p440 p331 p311 p400 p440
                    p444 p333 p313 p404 p444
                    p044 p133 p113 p004 p044
                    p040
                    pa   p400 p404 p004 pa
                    p111 p311 p313 p113 p111
                    p131 p133 p333 p331 p131 "")
 (princ))