資源簡(jiǎn)介
代碼片段和文件信息
#?-*-?coding:?utf-8?-*-?
#!/usr/bin/python
import?math
from?tkinter?import?*
class?PTS:
????def?__init__(self):
????????self.x?=?0
????????self.y?=?0
points?=?[]
def?LineToDemo():
????screenx?=?400
????screeny?=?400
????canvas?=?Canvas(width?=?screenxheight?=?screenybg?=?‘white‘)
????AspectRatio?=?0.85
????MAXPTS?=?15
????h?=?screeny
????w?=?screenx
????xcenter?=?w?/?2
????ycenter?=?h?/?2
????radius?=?(h?-?30)?/?(AspectRatio?*?2)?-?20
????step?=?360?/?MAXPTS
????angle?=?0.0
????for?i?in?range(MAXPTS):
????????rads?=?an
評(píng)論
共有 條評(píng)論