Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
geekincode
Hyperbola
提交
32c38f9f
Hyperbola
项目概览
geekincode
/
Hyperbola
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Hyperbola
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
32c38f9f
编写于
11月 02, 2021
作者:
geekincode
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
上传新文件
上级
ffcb7c55
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
99 addition
and
0 deletion
+99
-0
Hyperbola_control.py
Hyperbola_control.py
+99
-0
未找到文件。
Hyperbola_control.py
0 → 100644
浏览文件 @
32c38f9f
from
Hyperbola_draw
import
hyperbola
import
tkinter
as
tk
from
tkinter
import
*
def
function
():
# print(e1.get(),e2.get())
# h = hyperbola()
a
=
eval
(
e1
.
get
())
b
=
eval
(
e2
.
get
())
ax_range
=
eval
(
e4
.
get
())
# line_range = eval(e5.get())
focus_ax
=
e3
.
get
()
h
=
hyperbola
(
ax_range
,
ax_range
*
7
)
h
.
hb_data
(
a
,
b
,
focus
=
focus_ax
)
h
.
hb_draw
()
h
.
asymptote
()
h
.
display
()
# def e1press1(self):
# e1.config(bg='skyblue')
# def e1press2(self):
# e1.config(bg='white')
# def e2press1(self):
# e2.config(bg='skyblue')
# def e2press2(self):
# e2.config(bg='white')
# def e3press1(self):
# e3.config(bg='skyblue')
# def e3press2(self):
# e3.config(bg='white')
root
=
Tk
()
root
.
geometry
(
'500x350'
)
root
.
geometry
(
'+400+300'
)
root
.
title
(
'双曲线'
)
root
.
resizable
(
False
,
False
)
l1
=
tk
.
Label
(
root
,
text
=
'a:'
,
font
=
(
'Arial Black'
,
12
),
width
=
3
,
height
=
1
)
l1
.
place
(
relx
=
0.25
,
rely
=
0.03
)
l2
=
tk
.
Label
(
root
,
text
=
'b:'
,
font
=
(
'Arial Black'
,
12
),
width
=
3
,
height
=
1
)
l2
.
place
(
relx
=
0.25
,
rely
=
0.13
)
l3
=
tk
.
Label
(
root
,
text
=
'焦点:'
,
font
=
(
'楷体'
,
13
),
width
=
5
,
height
=
1
)
l3
.
place
(
relx
=
0.215
,
rely
=
0.23
)
l3_
=
tk
.
Label
(
root
,
text
=
'x or y'
,
font
=
(
'Arial'
,
10
),
width
=
5
,
height
=
1
)
l3_
.
place
(
relx
=
0.65
,
rely
=
0.23
)
l4
=
tk
.
Label
(
root
,
text
=
'坐标轴长度:'
,
font
=
(
'楷体'
,
13
),
width
=
13
,
height
=
1
)
l4
.
place
(
relx
=
0.15
,
rely
=
0.33
)
e1
=
tk
.
Entry
(
root
,
show
=
None
,
bg
=
'white'
,
font
=
(
'Arial'
,
10
))
#显示成明文形式
e1
.
place
(
relx
=
0.35
,
rely
=
0.05
)
# e1.bind('<Enter>',e1press1)
# e1.bind('<Leave>',e1press2)
e2
=
tk
.
Entry
(
root
,
show
=
None
,
bg
=
'white'
,
font
=
(
'Arial'
,
10
))
#显示成明文形式
e2
.
place
(
relx
=
0.35
,
rely
=
0.15
)
# e2.bind('<Enter>',e2press1)
# e2.bind('<Leave>',e2press2)
e3
=
tk
.
Entry
(
root
,
show
=
None
,
bg
=
'white'
,
font
=
(
'Arial'
,
10
))
#显示成明文形式
e3
.
place
(
relx
=
0.35
,
rely
=
0.25
)
# e3.bind('<Enter>',e3press1)
# e3.bind('<Leave>',e3press2)
e4
=
tk
.
Entry
(
root
,
show
=
None
,
bg
=
'white'
,
font
=
(
'Arial'
,
10
))
#显示成明文形式
e4
.
place
(
relx
=
0.35
,
rely
=
0.35
)
# e5 = tk.Entry(root, show = None, bg='white', font=('Arial',10))#显示成明文形式
# e5.place(relx=0.35, rely=0.45)
# # 第5步,在窗口界面设置放置Button按键hyperbola.Kp
b
=
tk
.
Button
(
root
,
text
=
'Show Hyperbola'
,
font
=
(
'Arial'
,
12
),
width
=
15
,
height
=
1
,
bg
=
'lightcoral'
,
command
=
function
)
b
.
place
(
relx
=
0.38
,
rely
=
0.75
)
root
.
mainloop
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录