我LISP代码如下:
(defun c:p_w_x(/ a b c x0 x1 x2 y1 y2 p1 p2) (setq a 10) (setq b 20) (setq c 30) (setq x0 (/ (- 0 b) (* 2 a))) (setq x1 (- x0 0.2)) (while (<= x1 (+ x0 0.2)) (setq h 0.002) (setq x1 (+ x1 h)) (setq y1 (+ (* a x1 x1) (* b x1) c)) (setq x2 (+ x1 h)) (setq y2 (+ (* a x2 x2) (* b x2) c)) (setq p1 (list x1 y1)) (setq p2 (list x2 y2)) (command "line" p1 p2 "") ) (setq zx0 (- x0 0.4) zy0 (- (+ (* a x1 x1) (* b x1) c) 0.5) zx1 (+ zx0 0.7) zy1 (+ zy0 0.7)) (setq pz0 (list zx0 zy0) pz1 (list zx0 zy1) pz2 (list zx1 zy0) ) (command "layer" "m" 1 "c" 1 "" "") (command "qleader" pz1 pz0 "" \e) (command "layer" "m" 2 "c" 6 "" "") (command "qleader" pz2 pz0 "" \e) (command "layer" "m" 0 "on" "" "") )
但是在COMMAD命令状态下调用时就是显示不出抛物线和坐标系!
请问是什么原因??请速告诉我! |