啵浪鼓 发表于 2011-4-6 18:40:54

角度换算

请问角度怎么换算来的,论坛里搜了一下,没有关于角度的
(50 . 4.71239)

如果已知上面的角度,可以这样写程序怎么不对呢?
...
(setq a1 (cdr (assoc 50 entt)))
(command "rotate" "last" "0,0" (strcat "@10<" a1)) ;这里旋转就只有4.71239度,不是真实的角度值

lenlenq 发表于 2011-4-6 19:12:55

4.71239是弧度

lenlenq 发表于 2011-4-6 19:15:30

写两个自定义函数
;角度转为弧度
(defun dtr (ang)
(* pi (/ ang 180.0))
)

;弧度转为角度
(defun ndtr (ang )
(/ (* ang 180) pi)
)

啵浪鼓 发表于 2011-4-6 19:34:30

非常感谢!
明经通道里翻译的AutoLips函数没有ang函数,呵呵!

lenlenq 发表于 2011-4-6 19:41:59

本帖最后由 lenlenq 于 2011-4-6 19:44 编辑

啵浪鼓 发表于 2011-4-6 19:34 static/image/common/back.gif
非常感谢!
明经通道里翻译的AutoLips函数没有ang函数,呵呵!
ang函数----什么意思?
ang函数本就没有。


(dtr 90)------>1.5708
(ndtr 1.5708)------>90.000

luhy2008 发表于 2019-7-5 16:14:57

学习了,谢谢!

烟盒迷唇 发表于 2019-7-10 20:32:54

小程序大用处
页: [1]
查看完整版本: 角度换算