(defun c:ht(/ x y bc cs) (setq p0 (getpoint "请选择起点")) (setq x (car p0) ) (setq bc (getreal "请输入步长")) (setq cs (getint "请输入次数")) (command "pline" p0) (repeat cs (setq x (+ x bc )) (princ x) (setq y ( + (* x x) (* 2 x))) (princ y) (setq p1 (list x y ) ) (princ p1) (command p1 )