这个程序那不对,为啥不能运行,我是在刊物上抄的请高手指正一下啊。
(defun C: myARC()
(setq pt1(getpoint"请选择园弧起点:")
pt2(getpoint"\n请选择园弧终点:")
L0(/(distance pt1 pt2)(abs(getral"\n请输入弧
长:")))
amax pi amin 0 )
(if(>=L0 1) )progn (prompt"弧长小于弦长,出错!")
(exit)))
(while (not (equal l l0 le-15))
(setq a(/(+amax amin) 2)
L(/(sina)a))
(if (> L L0)(setq amina )(setq amax a))
)
(command "arc" pt1 "e" pt2 "a"(strcat(rtos(* a 2)2
16) "r"))
(princ)