面朝大海,春暖华开

focus on scientific computue, 3dgis, spatial database
专注于科学计算、GIS空间分析

 

AutoCAD visual lisp实例:函数绘制

 1(defun c:mysin ()
 2  (setq    x  0
 3    dx (/ pi 100)
 4  )
 5  (setq y 0)
 6  (command "line")
 7
 8  (while (<= x (* 2 pi))
 9    (setq y (sin x))
10    (command (list x y))
11
12    (setq x (+ x dx))
13  )
14
15  (command "")
16  (command "line"
17       (list 0 0)
18       (list (* 2 pi) 0)
19       ""
20  )
21  (command "line"
22       (list 0 -1)
23       (list 0 1)
24       ""
25  )
26  (command "zoom" "e")
27)
28

posted on 2005-07-29 09:04  风过 无痕  阅读(1782)  评论(0编辑  收藏  举报

导航

向日葵支付宝收钱码