判断点是否在三角形内
(defun InsideTriangle( pt p1 p2 p3 )(
(lambda ( a b c)
(or
(and (<= 0.0 a) (<= 0.0 b) (<= 0.0 c))
(and (<= a 0.0) (<= b 0.0) (<= c 0.0))
)
)
(sin (- (angle p1 pt) (angle p1 p2)))
(sin (- (angle p2 pt) (angle p2 p3)))
(sin (- (angle p3 pt) (angle p3 p1)))
)
)
谢谢分享!!!! 谢谢分享!!!! 谢谢分享 谢谢分享!!!{:1_23:} 谢谢分享!!!{:1_23:}
页:
[1]