星期六, 9月 28, 2024

Black hole-star binary system simulation




我自己最近在做一些物理模型,其中一個是黑洞與恆星雙星系統,一開始是這樣



simulate a binary star system with perspective the small star is a blackhole, sucking particles from its companion. particle flux from the companion star to blackhole.


結果 得到


完全沒有看到黑洞吞噬恆星物質的氣流,試了一個晚上,怎麼做都不理想,或許這個問題不是基本力學做得到的,因此考慮加上古典力學

simulate a binary star system with perspective the small star is a blackhole, sucking particles from its companion. particle flux from the companion star to blackhole. Particles flow obeys Hamilton dynamics.


結果改善很多,但是只能模擬恆星和黑洞擦身而過,模擬互相繞行公轉還需要繼續努力。



星期三, 9月 25, 2024

Simulate Photosynthesis Process at Quantum Level

 光合作用是地球上最重要的化學反應,也是最大的奧秘。透過量子力學的工具,人們開始對光合作用有些初步的了解,目前科學家仍然在繼續探索這個主題,尤其是對於為什麼植物能夠百分之百的利用太陽光能,而人類太陽能電池的效率至今連兩成都不到。




Change to JS (瀏覽器環境), add REACT ( (製作UI介面)




Debug



Schematic

星期三, 9月 18, 2024

Shortest Path Algorithm

 產生 Shortest path algorithm 使用 JavaScript 語言








求解動畫




修正(因為部分程式碼不被連覽器支援)




QuickSort

 產生 QuickSort 程式,使用 JavaScript 語言

[AI 可以產生 C 程式,或 Python 程式...,但如果要直接在瀏覽器執行,須改為JavaScript 程式,然後告訴 AI 一併生成 REACT 元件以產生輸出輸入介面,就可以在瀏覽器上直接執行看到結果或是偵錯。]




視覺化





Learning Evolution of Technical English

科普傳播

Laser weapons protect aircraft from surface- and air-launched threats. (Video Credit: Lockheed Martin)


Quiz (F16 with laser weapons)

Words in the episode. Select one word in each item.

1. Unprecedented, unparalleled, unequaled 

2. Infrared, ultraviolet, visible 

3. Shipborne, airborne, carrier 

4. Hospitable, hostile, friendly 

5. Acquisition, relinquishing, abandoning 


Word anatomy:

Infra: infrared, infrastructure

Infrared: infra + red, below (La.) + red (Proto Indo-European)
 
Ultra: ultralight, ultraviolet

ultraviolet: ultra + violet, beyond + violet (from flower), La. + La.

Shipborne: Ship + borne (from bear)
Airborne: air + borne

Proceed: Pro (forward) + ceed (from La. cedere)
Precedent: Pre (before) + cedent (From La. cedere)
Prehistoric: pre + historic
President: pre + sident ( from La. sedere, sit) 

Algorithm: al-Khwarizmi

viper, La.
serpent, La, - Gr. (creep, from herpein)
snake, old Eng. - Proto Germanic

Herpetology, Herpet + ology, Gr.
Reptile, La.  


protect, pro+tect, forward+ cover(shield), Latin

detect: de +tect, off/away, cover, La.

defeat: de + feat, away + make, undo, unmake,  La.


Fact, something done, deed, La. 
Factor
Factory



科技英文的演進


Domino
AD, Anno Domini

What's your name?


星期日, 9月 15, 2024

Computer Algorithms



Interactive Games (拉丁字根)


Etymology for

Development of


甚麼是演算法(Algorithm)


為什麼要學演算法


我不是資訊工程系主修,我如何運用AI學習演算法



以下介紹著名的電腦演算法,在AI的協助下,即使不懂程式語言,也可以藉由AI 視覺化求解過程來觀察演算法如何解決一些常見的問題,像是找到兩個地點之間的最短距離,推銷員的最佳拜訪路徑等等。


最大公約數 (GCD, Greatest Common Divisor)



 Tower of Hanoi 





Visualize QuickSort (數字排序最常用的演算法之一)




Visualize Shortest Path (在一個網路中找到兩點之間的最短路徑與距離)






Visualize TSP (Traveling Salesman Problem) by A* search (一個推銷員要拜訪所有客戶城市,每個城市只能拜訪一次,最後要回到出發城市,請為他/她計算最短的拜訪路徑)




Add editing on canvas by click and drop. (在網頁畫布上直接增加刪除城市)

Hanoi Problem

demospeedytimely


Hint 1:

Tower of hanoi





Incorrect sequence




Correct 




Algorithm in C







自由探索 Hanoi 主題: 程式設計,程式執行,動畫,遊戲,...


Hint 2: 其他作法


illustrate



animation 

生成類似多格漫畫



Add REACT

Whack-a-Mole

打地鼠, Whack-a-Mole Game





生成原始版




不會動(出槌)




繪製可愛元素





加入Q版地鼠(加入後可是看不見)






修復









加入音效(可惜沒馬上成功)




告知聽不到,修復後成功了(限Windows版)


自由探索打地鼠主題: 程式設計,程式執行,動畫,遊戲,...,或是其他遊戲