知識社群登入
位置: AutoCAD開放式教學 > 討論區 > 討論
大拱門
1樓
http://www-groups.dcs.st-and.ac.uk/~history/Curves/Catenary.html


2樓
(defun cosh(x / )
  (/ (+ (exp x) (exp (* -1 x))) 2.0)
  ); end of cosh()
; -----------------------------------------------

(setq no 16)
(setq x1 -3.0 x2 +3.0 dx (/ (- x2 x1) no))

; for x= x1 to x2 step dx do ,,,
(setq x x1 x2 (+ x2 (/ dx 10.0)))

(command "spline")
(while (<= x x2)
  (setq y (cosh x))
  (command (list x y))

  (setq x (+ x dx))
  ); end of while

(command "" "" "")
(princ)

附件
1. big-door.LSP (1 KB)