作者juihua (漱石)
看板Cad_Cae
标题Re: [问题] 请问要怎麽画出爱心的图案?
时间Thu Nov 3 09:18:13 2005
※ 引述《sjgau (sjgau)》之铭言:
: http://myblog.pchome.com.tw/_/myblog/?blog_id=sjgau&y=2005&m=09&an=11726&acn=3247
: (setvar "cmdecho" 0)
: ; plot r= G(theta)
: ; r=a(1-sinθ)
: (setq a 2.5)
: (setq no (getint "Please input no= "))
: (setq t1 (* -1 pi)
: t2 (* +1 pi)
: dt (/ (- t2 t1) no)
: t2 (+ t2 (* 0.1 dt))
: )
: ; for theta= t1 to t2 step dt do ...
: ; dt= (t2 - t1)/no
: ; no= ?
: (command "PLINE")
: (setq theta t1)
: (while (< theta t2)
: ; // r=a(1-sinθ)
: (setq r (* a (- 1.0 (sin theta))))
: (setq x (* r (cos theta))
: y (* r (sin theta))
: )
: (setq p1 (list x y))
: (command p1)
: (setq theta (+ theta dt))
: )
: (command "")
: (princ)
:
那麽请问该如何呼叫出 AutoCAD自动画函数图形的程式?
3D图案是否也是用函数建立会比较好看呢?
谢谢指教!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.164.1.3
1F:推 sjgau:case by case, 属於上帝的归上帝,属於魔鬼的归魔鬼 11/03 10:03
2F:→ sjgau:(load "test.lsp") 11/03 10:04