(defun c:fplot (/ res start x step ce) (setq res 150 start -5.0 x start step (/ 10.0 (float res)) i 0) (setq ce (getvar "cmdecho")) (setvar "cmdecho" 0) (command "3Dmesh" res res) (while (< i (1+ res)) (setq j 0 y start) (while (< j res) (setq j (1+ j) y (+ y step)) (setq a (- (- x (expt x 3.0)) (expt y 3.0))) (setq b (exp (/ (+ (* x x) (* y y)) -8.0))) (setq c (exp (- (* x (* -1.0 x)) (/ (* y y) 4)))) (setq z (- (+ (* (* 0.28 a) b) c) 0.1)) (if (< z 0) (setq z 0)) (command (list x y z)) ) (setq i (1+ i) x (+ x step)) ) (setvar "cmdecho" ce) )