(defun c:hl(/ p1 p2 p3 a b c d h s p an1)
(setvar "cmdecho" 0)
(setq p1 (getpoint "\n插入点:"))
(setq a (getreal "\n输入第一条边长度"))
(setq b (getreal "\n输入第二条边长度"))
(setq c (getreal "\n输入第三条边长度"))
(setq p (/ (+ a b c) 2))
(setq s (sqrt (* p (- p a) (- p b) (- p c))))
(setq h (/ (+ s s) a))
(setq d (sqrt (- (* c c) (* h h))))
(setq p2 (polar p1 0 a))
(setq an1 (atan h d))
(setq p3 (polar p1 an1 c))
(command "pline" p1 p2 p3 "c")
(prin1))