;TANGENT FUNCTION
(defun Tan (x)
(cond ((= (cos x) 0.0)(if (minusp x) -1.0E200 1.0E200))
(t (/ (sin x) (cos x)))
)
)
;SECANT FUNCTION
(defun Sec (x)
(if (= (cos x) 0)
(if (minusp x) -1.0E200 1.0E200)
(/ 1.0 (cos x))
)
)
;;COSECANT FUNCTION
(defun CoSec (x)
(if (= (sin x) 0)
(if (minusp x) -1.0E200 1.0E200)
(/ 1.0 (sin x))
)
)
;COTANGENT FUNCTION
(defun CoTan (x)
(cond ((= (sin x) 0.0)
(if (minusp x) -1.0E200 1.0E200))
(t (/ (cos x) (sin x))))
)
;ARC COSECANT FUNCTION
(defun ACoSec (x)
(cond ((< (abe x) 1.0)(princ "\n*ERROR* (abs x) < 1.0 from ACSC function\n") nil)
((= x 1.0) 0.0)
((= x -1.0) pi)
(T (atan (/ (/ 1.0 x)(sqrt(- 1.0 (/ 1.0 (* x x)))))))
)
)
;ARC SECANT FUNCTION
(defun ASec (x)
(cond ((< (abe x) 1.0)(princ "\n*ERROR* (abs x) < 1.0 from ASEC function\n") nil)
((= x 1.0) 0.0)
((= x -1.0) pi)
(T (- (/ pi 2.0) (atan (/ (/ 1.0 x)(sqrt(- 1.0 (/ 1.0 (* x x))))))))
)
)
;ARC SINE
(defun ASin (x)
(cond ((= x 1.0) (/ pi 2.0))
((= x -1.0) (/ pi -2.0))
((< (abs x) 1.0) (atan (/ x (sqrt(- 1.0 (* x x))))))
(t (princ "\n*ERROR* (abs x) > 1.0 from ASIN function. \n") nil)
)
)
;ARC COSINE
(defun ACoSin (x)
(cond ((= x 1.0) 0.0)
((= x -1.0) pi)
((< (abs x) 1.0)(- (/ pi 2.0) (atan (/x (sprt(- 1.0 (* x x)))))))
(t (princ "\n*ERROR* (abs x) >1.0 from ACOS function\n") nil)
)
)
객체 선택시 Shift키를 사용하여 선택에 추가(PICKADD) (0) | 2021.06.17 |
---|---|
CAD파일 치명적 오류로 저장도 못하는 상황 대처 방법 (0) | 2021.06.11 |
치수의 숫자값을 강제입력으로 변경해주는 lisp (0) | 2021.06.09 |
dimcen명령어와 dimcenter명령어의 차이점 (0) | 2021.06.03 |
DYNMODE(시스템 변수) (0) | 2021.06.03 |