📄 sine.py
字号:
import qcadimport mathdef start(str): n=0 # counter res=32 # resolution of sin # x-axis: qcad.rsPyAddLine(0, 0, 2*math.pi, 0) while n<2*math.pi: qcad.rsPyAddLine(n, 0, n, -0.05) n+=math.pi/4 # y-axis: qcad.rsPyAddLine(0, -1, 0, 1) # sinus n=0.0 step=(2*math.pi)/res while n<2*math.pi: qcad.rsPyAddLine(n, math.sin(n), n+step, math.sin(n+step)) n+=step return(1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -