囧_
初学v-lisp.一小段囧字程序.纯属娱乐,:D 绝对原创(defun c:jiong (/);jiong是命令
(setq *error* abbtrap);错误函数定义
;;;(setvar "cmdecho" 0);回显关
(setvar "blipmode" 0);点标记关
(setvar "blipmode" 0);捕捉取消
(prompt"\n囧囧囧囧囧囧囧囧囧\n囧\t /\t \\囧
\n囧/\t\t \\ 囧
\n囧 \t\t 囧
\n囧\t囧囧囧\t囧
\n囧\t囧囧\t 囧
\n囧囧囧囧囧囧囧囧囧
");显示在命令栏的字符
(setq p0_0 (getpoint "\n一囧\t 囧 \t 囧"));获取选者的一点
(if (= p0_0 nil)
(exit));如果没点.强制exit执行错误函数
(setq p0_1 (polar p0_0 0 40));开始++--计算很多点
(setq p0_2 (polar p0_0 (* pi 0.5) 45))
(setq p0_3 (polar p0_2 0 40))
(setq p1_0.1 (polar p0_0 0 10))
(setq p1_0 (polar p1_0.1 (* pi 0.5) 10))
(setq p1_1 (polar p1_0 0 20))
(setq p1_2 (polar p1_0 (* pi 0.5) 10))
(setq p1_3 (polar p1_2 0 20))
(setq p9_0 (polar p0_0 0 5))
(setq p9_1 (polar p9_0 (* pi 0.5) 27))
(setq p9_2 (polar p0_0 0 17))
(setq p9_3 (polar p9_2 (* pi 0.5) 40))
(setq p8_0 (polar p0_0 0 23))
(setq p8_1 (polar p8_0 (* pi 0.5) 40))
(setq p8_2 (polar p0_0 0 35))
(setq p8_3 (polar p8_2 (* pi 0.5) 27));以上全是++--的算点pi是180°
(line p0_0 p0_1);执行line函数起点,端点
(line p0_0 p0_2)
(line p0_1 p0_3)
(line p0_2 p0_3)
(line p1_0 p1_1)
(line p1_0 p1_2)
(line p1_1 p1_3)
(line p1_2 p1_3)
(line p9_1 p9_3)
(line p8_1 p8_3)
(setvar "osmode" 183)
(princ);退出
);结束
(defun abbtrap (b);错误函数定义
(alert "是左击!囧")
(setvar "osmode" 183)
)
(defun line (pt1 pt2);line函数
(entmake (list (cons 0 "LINE")(cons 10 pt1)(cons 11 pt2)))
);画一条(0类型)line.(10)起点,(11)端点
命令:jiong 注解怎么都成乱码了?,,,同意lisp有兴趣的初学朋友们.文件里头有详细的注解.
页:
[1]