python程式碼
from tkinter import * #或者import tkinter as tk
import math
tk = Tk() #建構視窗名為tk
tk.geometry('1200x400')#視窗 寬1200像素
tk.title("劉任昌python tkinter三角函數")
canvas = Canvas(tk, width=1200, height=400, bg='black')
canvas.grid(row=0,column=0,padx=5,pady=5,columnspan=3)
delay=10 # milliseconds, 1/1000秒
x1,y1,z1=0,200,10#python特徵,多變數=對等值
h=190 #上下範圍,相當於數學1到-1
L1=canvas.create_line(0,200,1200,200,fill='white',width=5)
def LH():
global x1, y1, z1#global全球,local當地
x2 = x1 + 1 #換到下個+1
y2=200 - h*math.sin(0.02*x2)
z2=200 - h*math.cos(0.02*x2)
L1=canvas.create_line(x1,y1,x2,y2,fill='pink',width=10)
L2=canvas.create_line(x1,z1,x2,z2,fill='green',width=10)
if (x2 < 1200): #沒有超過, 記得將 "小於" 改成運算
x1,y1,z1=x2,y2,z2#下一個起點是現在終點
canvas.after(delay,LH)#每隔delay執行
else:
return
LH() #執行LH老猴
tk.mainloop()
https://lupeiying.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除402.格式誤用!https://lupeiying.blogspot.com/2025/04/idejupyterpython.html
刪除https://xin00.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除https://egdvcn-gh.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除408補401.https://egdvcn-gh.blogspot.com/2025/04/h1border10px-solid-red-border.html
刪除https://hsulining9999.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除429.https://hsulining9999.blogspot.com/2025/04/word-file-processing-in-pythonpythonword.html
刪除https://jiang233.blogspot.com/2025/05/pythonpowerpoint-5-06-2025.html
回覆刪除作者已經移除這則留言。
回覆刪除https://jiang-jia-ehen.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除https://laichia-jung.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除https://lu-chieh-chi.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除https://anson0501.blogspot.com/2025/05/h1colorwhitebackground.html
回覆刪除https://djhdvdhd.blogspot.com/2025/05/blog-post.html
回覆刪除https://zzy-hn.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除https://zzy-hn.blogspot.com/2025/04/javascriptpython_15.html
刪除408順利執行。https://zzy-hn.blogspot.com/2025/04/var-banks-function-abc-var-c-document.html
https://zzy-hn.blogspot.com/2025/03/idejupyterpython.html
https://youtu.be/A5xEjI0JaEM
回覆刪除https://syx0304syx.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除https://allyking097.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除https://guovupvmp.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除https://htmlsyuan.blogspot.com/2025/05/python.html
回覆刪除https://chang-yam-ci.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除常常順利執行。
刪除https://wihfaw.blogspot.com/2025/05/import-math-9z110-1316cos18-tk-tk-tk-tk.html
回覆刪除用錯網址!
刪除https://yangbokai.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除順利播放影片。https://yangbokai.blogspot.com/2025/05/pythonpowerpoint.html
刪除429.https://yangbokai.blogspot.com/2025/04/word-file-processing-in-pythonpythonword.html
https://spy0928.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除動手做,就有成長。https://spy0928.blogspot.com/2025/05/pythonpowerpoint.html
刪除作者已經移除這則留言。
回覆刪除https://d11317133.blogspot.com/2025/05/youtube-video-player.html
回覆刪除影片成功,但要用pre固定程式碼格式。https://d11317133.blogspot.com/2025/05/youtube-video-player.html
刪除422.https://d11317133.blogspot.com/2025/04/oopobject-oriented-programming_22.html
415拷貝貼上應付.https://d11317133.blogspot.com/2025/04/oopobject-oriented-programming.html
https://yezonghan.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除429.https://yezonghan.blogspot.com/2025/04/word-file-processing-in-pythonpythonword.html
刪除422極盡所能的應用所學。https://yezonghan.blogspot.com/2025/04/javascriptbuttononclickcall.html
https://ting950214.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除一定要去探究程式碼的意義,才有學習效果。https://ting950214.blogspot.com/2025/05/pythonpowerpoint.html
刪除429.貼上應付,聊勝於無!https://ting950214.blogspot.com/2025/04/word-file-processing-in-pythonpythonword.html
422不能執行. https://ting950214.blogspot.com/2025/04/javascriptbuttononclick.html
415.https://ting950214.blogspot.com/2025/04/javascript.html
https://zhuo-you-wen.blogspot.com/2025/05/pythonpowerpoint-5-06-2025.html
回覆刪除將影片名稱改為「python繪製三角函數與powerpoint製作影片」程式碼要用pre固定格式.https://zhuo-you-wen.blogspot.com/2025/05/pythonpowerpoint-5-06-2025.html
刪除422.順利執行.https://zhuo-you-wen.blogspot.com/2025/04/javascriptbuttononclickcall.html
https://xie-ni.blogspot.com/2025/05/pythonpowerpoint.html
回覆刪除影片成功。https://xie-ni.blogspot.com/2025/05/pythonpowerpoint.html
刪除429可以嵌入維基百科網頁.https://xie-ni.blogspot.com/2025/04/word-file-processing-in-pythonpythonword.html
422順利執行.https://xie-ni.blogspot.com/2025/04/javascriptbuttononclickcall.html
https://www.blogger.com/blog/posts/1663543249641752427
回覆刪除https://sccabout.blogspot.com/2025/05/from-tkinter-import-import-tkinter-as.html
回覆刪除https://huuiiiiman.blogspot.com/2025/05/from-tkinter-import-import-tkinter-as.html
回覆刪除作者已經移除這則留言。
回覆刪除https://xuan-ang.blogspot.com/2025/05/pyyhonyoutube.html
回覆刪除https://andy1015.blogspot.com/2025/05/from-tkinter-import-import-tkinter-as.html
回覆刪除https://chan0528.blogspot.com/2025/06/pythonyoutube.html
回覆刪除