2007年6月30日 星期六

[轉貼]:兩個矢量的點積

 
;; ! Function : Computes the dot products of two vectors
;; !
;; ! Arguments: 'v1' - First vector
;; !            'v2' - Second Vector
;; !
;; ! Returns  : 'scl'  - The dot product of the two vectors which is a scalar
;; !                     value
;; ! Theory:    Say you have two vectors
;; !            A= ax i +  ay j + az k
;; !            B= bx i +  by j + bz k
;; !
;; ! then A . B = ax.bx + ay.by + az.bz
;; ! (C) 1999-2004, Four Dimension Technologies, Bangalore
;; ! e-mail   : rakesh.rao@4d-technologies.com
;; ! Web      : www.4d-technologies.com
;; ! ****************************************************************************
;; 兩個矢量的點積
(defun GE_VecDotProduct (v1 v2)
  (apply '+ (mapcar '* v1 v2))
)
 
[轉貼]:兩個矢量的點積
http://publishblog.blogchina.com/blog/tb.b?diaryID=5754891

沒有留言: