This?
;; Angle Between Planes - Lee Mac 2010
;; Args: p1,p2,p3 - Points on First Plane
;; p4,p5,p6 - Points on Second Plane
(defun AngleBetweenPlanes ( p1 p2 p3 p4 p5 p6 )
(
(lambda ( u v )
(acos (/ (vxv u v) (* (norm u) (norm v))))
)
(v^v (mapcar '- p3 p2) (mapcar '- p2 p1))
(v^v (mapcar '- p6 p5) (mapcar '- p5 p4))
)
)
;; Vector Cross (Wedge) Product - Lee Mac 2010
;; Args: u,v - vectors in R^3
(defun v^v ( u v )
(list
(- (* (cadr u) (caddr v)) (* (cadr v) (caddr u)))
(- (* (car v) (caddr u)) (* (car u) (caddr v)))
(- (* (car u) (cadr v)) (* (car v) (cadr u)))
)
)
;; Vector Dot Product - Lee Mac 2010
;; Args: u,v - vectors in R^n
(defun vxv ( u v )
(apply '+ (mapcar '* u v))
)
;; Vector Norm - Lee Mac 2010
;; Args: v - vector in R^n
(defun norm ( v )
(sqrt (apply '+ (mapcar '* v v)))
)
;; ArcCosine - Lee Mac 2010
;; Args: -1 <= x <= 1
(defun acos ( x )
(if (<= (abs x) 1.0)
(if (equal x 0.0 1e-8)
(* pi 0.5)
(atan (/ (sqrt (- 1.0 (* x x))) x))
)
)
)