CAD-计算机绘图作业-玫瑰线等.docVIP

  • 17
  • 0
  • 约1.83千字
  • 约 4页
  • 2023-06-27 发布于湖北
  • 举报
一:自定义函数: 绘制正弦曲线:y=a*sin(2*X*pi/t+ph) 程序: (defun sinn (x0 y0 a t1 ph) (setq dt (/ pi 18) tt 0 ph (* ph (/ pi 180))) (command pline) (repeat 730 (setq x (+ x0 tt)) (setq y (+ y0 (* a (sin (+ ph (* tt (/ (* pi 2) t1))))))) (command (list x y)) (setq tt (+ tt dt)) ) (command) (command pedit l f ) ) 输入:Command (sinn 100 100 20 6 720) 运行截图: 二:自定义命令:课本5-16 (defun C:zheng() (setq p (getpoint \n Base point:)) (setq n (getint \nNumber of side:)) (setq s (getdist \n side length:)) (setq a (getangle \n startangle:)) (setq i 0 b (/ (* 2 pi) n) a (* a (/ pi 180)))

文档评论(0)

1亿VIP精品文档

相关文档