05116127.lsp

来自「Equiangular Spiral的数学图形程序」· LSP 代码 · 共 37 行

LSP
37
字号
(defun c:Equiangular()
  (setq index_value (load_dialog "F:\\周欣\\05116127.dcl"))      ;加载对话框dcl文件
  (if (not (new_dialog "duihuaguang" index_value))    ;初始化对话框
  (exit)
  )
  (setq a (atof (get_tile "a1")))
  (setq b (atof (get_tile "b1")))
  (setq m (atof (get_tile "m1")))
  (action_tile "a1" "(setq a (atof $value))")
  (action_tile "b1" "(setq b (atof $value))") 
  (action_tile "m1" "(setq m (atof $value))")

  
(start_dialog)
  (setq i 0)

  (command "erase" "all" "")
  (setvar "cmdecho" 0)
 
  (while (<= i (* 4 m))
  (setq x (/ (* i (* 2 pi)) m))
    (setq x1 (/ (* (+ i 1) (* 2 pi)) m))
   
  (setq r (* a (exp (* x (/ (cos b) (sin b))))))
  (setq r1 (* a (exp (* x1 (/ (cos b) (sin b))))))
  (setq pt0 (polar '(0.0 0.0) x r))
    (setq pt1 (polar '(0.0 0.0) x1 r1))
    (command "line" pt1 pt0 "")
  
  (setq i (1+ i))
   (command "view" "top" "")
  )
  

  (unload_dialog index_value)    ;卸载DCL文件
  (princ)
  )

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?