早教吧作业答案频道 -->英语-->
autolisp改错(defungeer(x0y0)(setqm(getreal"\npleaseinputm:")z(getint"\npleaseinputz:")b(getreal"\npleaseinputb:")d(getreal"\npleaseinputd:"))(setqd2(*mz))(setqd1(+d2m)d3(-d2m))(setqd22(/d22.0)d11(/d1
题目详情
autolisp改错
(defun geer(x0 y0)
(setq m (getreal "\n please input m:" )
z (getint "\n please input z:" )
b (getreal "\n please input b:" )
d (getreal "\n please input d:" )
)
(setq d2 ( * m z))
(setq d1 ( + d2 m) d3( - d2 m))
(setq d22 (/ d2 2.0) d11 (/ d1 2.0) d33 (/ d3 2.0) d00 (/ d 2.0))
(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50))
(command "zoom" "a")
(command "layer" "s" "3" " ")
(command "line"(list (- x0 10) y0) (list (+ x0 b 10) y0))
(command "layer" "s" "0" " ")
(command "line"(list x0 (+ y0 d00 8)) (list x0 (+ y0 d22)) (list (+ x0 b) (+ y0 d22))
(list (+ x0 b) (+ y0 d00 8)) "c")
(command "line"(list x0 (- y0 d00 2)) (list x0 (- y0 d22)) (list (+ x0 b) (- y0 d22))
(list (+ x0 b) (- y0 d00 2)) "c")
(command "layer" "s" "1" " ")
(command "hatch" "u" "45" "4" "n" "w"(list(- x0 2) (- y0 d22 2)) (list(+ x0 b 2) (+ y0 d22 2)) " ")
(command "layer" "s" "0" " ")
(command "line"(list x0 (+ y0 d00 8)) (list x0 (- y0 d00 2)))
(command "line"(list (+ x0 b) (+ y0 d00 8)) (list (+ x0 b) (- y0 d00 2)))
(command "line"(list x0 (+ y0 d00 2)) (list (+ x0 2) (+ y0 d00)) (list (- (+ x0 b) 2) (+ y0 d00))
(list (+ x0 b) (+ y0 d00 2)) )
(command "line"(list x0 (- y0 d00 2)) (list (+ x0 2) (- y0 d00)) (list (- (+ x0 b) 2) (- y0 d00)) (list (+ x0 b) (- y0 d00 2)) )
(command "line"(list (+ x0 2) (- y0 d00)) (list (+ x0 2) (+ y0 d00)) )
(command "line"(list (- (+ x0 b) 2) (- y0 d00)) (list (- (+ x0 b) 2) (+ y0 d00)) )
(command "line"(list x0 (+ y0 d22)) (list (+ x0 m) (+ y0 d11)) (list (- (+ x0 b) m) (+ y0 d11)) (list (+ x0 b) (+ y0 d22)) )
(command "line"(list x0 (- y0 d22)) (list (+ x0 m) (- y0 d11)) (list (- (+ x0 b) m) (- y0 d11)) (list (+ x0 b) (- y0 d22)) )
(command "layer" "s" "2" " ")
(setq a d)
(setq a1 d1)
(setq a2 d2)
(setq a3 (+ d 8))
(setq a4 b)
(setq d (itoa d) d1 (itoa d1) d2 (itoa d2) b (itoa b) c (itoa (+ d 8)))
(setq d (strcat "%%c" d) d1 (strcat "%%c" d1) d2 (strcat "%%c" d2) c (strcat "%%c" c))
(command "dim")
(command "dimtxt" "8")
(command "hor"(list x0 y0) (list (+ x0 b) y0) (list x0 (- y0 d11 14)) b)
(command "ver"(list x0 (- y0 d00)) (list x0 (+ y0 d00)) (list (+ x0 (/ a4 2.0)) y0) d)
(command "ver"(list x0 (- y0 d11)) (list x0 (+ y0 d11)) (list (+ x0 a4 30) y0) d1)
(command "ver"(list x0 (- y0 d22)) (list x0 (+ y0 d22)) (list (+ x0 a4 20) y0) d2)
(command "ver"(list x0 (- y0 d00)) (list x0 (+ y0 d00 8)) (list (+ x0 a4 10) y0) c)
(command "exit")
)
运行时总说“; 错误:输入的列表有缺陷”
(defun geer(x0 y0)
(setq m (getreal "\n please input m:" )
z (getint "\n please input z:" )
b (getreal "\n please input b:" )
d (getreal "\n please input d:" )
)
(setq d2 ( * m z))
(setq d1 ( + d2 m) d3( - d2 m))
(setq d22 (/ d2 2.0) d11 (/ d1 2.0) d33 (/ d3 2.0) d00 (/ d 2.0))
(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50))
(command "zoom" "a")
(command "layer" "s" "3" " ")
(command "line"(list (- x0 10) y0) (list (+ x0 b 10) y0))
(command "layer" "s" "0" " ")
(command "line"(list x0 (+ y0 d00 8)) (list x0 (+ y0 d22)) (list (+ x0 b) (+ y0 d22))
(list (+ x0 b) (+ y0 d00 8)) "c")
(command "line"(list x0 (- y0 d00 2)) (list x0 (- y0 d22)) (list (+ x0 b) (- y0 d22))
(list (+ x0 b) (- y0 d00 2)) "c")
(command "layer" "s" "1" " ")
(command "hatch" "u" "45" "4" "n" "w"(list(- x0 2) (- y0 d22 2)) (list(+ x0 b 2) (+ y0 d22 2)) " ")
(command "layer" "s" "0" " ")
(command "line"(list x0 (+ y0 d00 8)) (list x0 (- y0 d00 2)))
(command "line"(list (+ x0 b) (+ y0 d00 8)) (list (+ x0 b) (- y0 d00 2)))
(command "line"(list x0 (+ y0 d00 2)) (list (+ x0 2) (+ y0 d00)) (list (- (+ x0 b) 2) (+ y0 d00))
(list (+ x0 b) (+ y0 d00 2)) )
(command "line"(list x0 (- y0 d00 2)) (list (+ x0 2) (- y0 d00)) (list (- (+ x0 b) 2) (- y0 d00)) (list (+ x0 b) (- y0 d00 2)) )
(command "line"(list (+ x0 2) (- y0 d00)) (list (+ x0 2) (+ y0 d00)) )
(command "line"(list (- (+ x0 b) 2) (- y0 d00)) (list (- (+ x0 b) 2) (+ y0 d00)) )
(command "line"(list x0 (+ y0 d22)) (list (+ x0 m) (+ y0 d11)) (list (- (+ x0 b) m) (+ y0 d11)) (list (+ x0 b) (+ y0 d22)) )
(command "line"(list x0 (- y0 d22)) (list (+ x0 m) (- y0 d11)) (list (- (+ x0 b) m) (- y0 d11)) (list (+ x0 b) (- y0 d22)) )
(command "layer" "s" "2" " ")
(setq a d)
(setq a1 d1)
(setq a2 d2)
(setq a3 (+ d 8))
(setq a4 b)
(setq d (itoa d) d1 (itoa d1) d2 (itoa d2) b (itoa b) c (itoa (+ d 8)))
(setq d (strcat "%%c" d) d1 (strcat "%%c" d1) d2 (strcat "%%c" d2) c (strcat "%%c" c))
(command "dim")
(command "dimtxt" "8")
(command "hor"(list x0 y0) (list (+ x0 b) y0) (list x0 (- y0 d11 14)) b)
(command "ver"(list x0 (- y0 d00)) (list x0 (+ y0 d00)) (list (+ x0 (/ a4 2.0)) y0) d)
(command "ver"(list x0 (- y0 d11)) (list x0 (+ y0 d11)) (list (+ x0 a4 30) y0) d1)
(command "ver"(list x0 (- y0 d22)) (list x0 (+ y0 d22)) (list (+ x0 a4 20) y0) d2)
(command "ver"(list x0 (- y0 d00)) (list x0 (+ y0 d00 8)) (list (+ x0 a4 10) y0) c)
(command "exit")
)
运行时总说“; 错误:输入的列表有缺陷”
▼优质解答
答案和解析
(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50))
有误
缺少括号
应为:(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50)))
而且你画直线的命令用的也不对,自己查书对照一下
有误
缺少括号
应为:(command "limits" (list 0 0) (list (+ x0 b 50) (+ y0 d11 50)))
而且你画直线的命令用的也不对,自己查书对照一下
看了 autolisp改错(def...的网友还看了以下:
x/(y+z+u)=y/(z+u+x)=z/(u+y+x)=u(x+y+z)求(x+y)/(z+u 2020-05-21 …
符合函数求导,z=z(x,y),F(x+z/y,y+z/x)=0之后F对x求导,可以令u=x+z/ 2020-06-12 …
已知x/y+z+u=y/z+u+x=z/u+x+y=u/x+y+z,求(y+x/z+u)+(y+z 2020-06-12 …
已知x/(y+z+u)=y/(z+u+x)=z/(u+x+y)=u/(x+y+z),求(x+y)/ 2020-06-12 …
已知x/(y+z+u)=y/(z+u+x)=z/(u+x+y)=u/(x+y+z),求(x+y)/ 2020-06-12 …
如果O+O=U+U+U,O+Z=U+U+U+U,那么Z+Z+U=()个O.如果设U=6,那么O=( 2020-06-18 …
autolisp改错(defungeer(x0y0)(setqm(getreal"\nplease 2020-07-22 …
变换方程取x作为函数u=y-z,v=y+z自变量取x作为函数u=y-z,v=y+z作自变量,变换方 2020-07-25 …
关于二元复合函数的一阶偏导公式的疑问若z=f(u,v),u=g(x,y),v=h(x,y)有:∂z 2020-07-25 …
设u=e^xyz^2,其中z=z(x,y)是由x+y+z+xyz=0所确定的隐函数,求u对x的偏导数 2020-11-01 …