Olympiad Corner: 利用 GW-BASIC 繪畫曼德勃羅集的方法
Olympiad Corner: 利用 GW-BASIC 繪畫曼德勃羅集的方法
Problem 1. Let A be a subset of the set S = 已知一個複數 c0,並由此定義一 170 IF J >= 6 AND J < 9 THEN
{1, 2, …, 1000000} containing exactly 個複數數列 { cn },使 cn+1 = cn2 + c0, COLOR 1 : REM BLUE
101 elements. Prove that there exist 其中 n = 0, 1, 2, ……。如果這個數列 180 IF J >= 9 AND J < 12 THEN
numbers t1, t2, … , t100 such that the sets 有界,即可以找到一個正實數 M,使 COLOR 2 : REM GREEN
190 IF J >= 12 AND J < 15 THEN
對於一切的 n,| cn | < M,那麼 c0 便屬
aj = {x + tj | x∊A } for j = 1, 2, … , 100 COLOR 15 : REM WHITE
於曼德勃羅集(Mandelbrot Set)之內。 200 IF J >= 15 THEN
are pairwise disjoint. COLOR 12 : REM RED
210 PSET (X + LEFT, (TOP – Y)* M)
Problem 2. Determine all pairs of 220 NEXT X
positive integers (a, b) such that 230 NEXT Y
240 COLOR 15 : REM WHITE
a2 250 LINE (LEFT, (TOP – W / 2) * M)
2 ab − b 3 + 1
2
– (W + LEFT, (TOP – W / 2) * M)
260 LINE (W / 2 + LEFT, (TOP – W)
is a positive integer. * M) – (W / 2 + LEFT, TOP * M)
270 END
Problem 3. A convex hexagon is given
in which any two opposite sides have the 以下是這程序的解釋:
following property: the distance between
their midpoints is 3 / 2 times the sum 可以將以上定義寫成一個 W 紀錄在電腦畫面上將要畫出
of their lengths. Prove that all the angles GW-BASIC 程序(對不起!我本人始 圖形的大小。現將 W 設定為 360(見
of the hexagon are equal. (A convex 終都是喜歡最簡單的電腦語言,而且 第 10 行),表示打算在電腦畫面上一
hexagon ABCDEF has three pairs of 我認為將 GW-BASIC 程序翻譯成其他 個 360 × 360 的方格內畫出曼德勃羅集
opposite sides: AB and DE, BC and EF, 電腦語言亦不難),方法如下: (見第 50 及 60 行)。
CD and FA.)
10 LEFT = 150 : TOP = 380 : LEFT 是繪圖時左邊的起點,TOP
(continued on page 4) W = 360 : M = .833 是圖的最低的起點(見第 210、250 及
Editors: 張 百 康 (CHEUNG Pak-Hong), Munsang College, HK 20 R = 2.64 : S = 2 * R / W 260 行)。注意:在 GW-BASIC 中,畫
高 子 眉 (KO Tsz-Mei) 30 RECEN = 0 : IMCEN = 0 面坐標是由上至下排列的,並非像一
梁 達 榮 (LEUNG Tat-Wing) 40 SCREEN 9 : CLS
般的理解,將坐標由下至上排,因此
李 健 賢 (LI Kin-Yin), Dept. of Math., HKUST 50 FOR Y = 0 TO W
吳 鏡 波 (NG Keng-Po Roger), ITC, HKPU 60 FOR X = 0 TO W 要以 “TOP − Y” 的方法將常用的坐標
Artist: 楊 秀 英 (YEUNG Sau-Ying Camille), MFA, CU 70 REC = S * (X – W / 2) + RECEN : 轉換成電腦的坐標。
Acknowledgment: Thanks to Elina Chiu, Math. Dept., HKUST IMC = S * (Y – W / 2) + IMCEN
for general assistance. 80 RE = REC : IM = IMC 由於電腦畫面上的一點並非正
On-line: http://www.math.ust.hk/mathematical_excalibur/ 90 RE2 = RE * RE : IM2 = IM * IM : 方形,橫向和縱向的大小並不一樣,
The editors welcome contributions from all teachers and J=0 故引入 M(= 5
)來調節長闊比(見
100 WHILE RE2 + IM2 <= 256 AND 6
students. With your submission, please include your name,
address, school, email, telephone and fax numbers (if available). J < 15 第 10、210、250 及 260 行)。
Electronic submissions, especially in MS Word, are encouraged.
The deadline for receiving material for the next issue is
110 IM = 2 * RE * IM + IMC
120 RE = RE2 – IM2 + REC 留意 W 祇是「畫面上」的大小,
November 30, 2003.
For individual subscription for the next five issues for the 03-04 130 RE2 = RE * RE : 並非曼德勃羅集內每一個複數點的實
academic year, send us five stamped self-addressed envelopes. IM2 = IM * IM : J = J + 1 際坐標,故需要作出轉換。R 是實際
Send all correspondence to: 的數值(見第 20 行) ,即繪畫的範圍
140 WEND
Dr. Kin-Yin LI
150 IF J < 3 THEN GOTO 220 實軸由 −R 畫至 +R,同時虛軸亦由 −R
Department of Mathematics
The Hong Kong University of Science and Technology 160 IF J >= 3 AND J < 6 THEN 畫至 +R。S 計算 W 與 R 之間的比例,
Clear Water Bay, Kowloon, Hong Kong COLOR 14 : REM YELLOW 並應用於後面的計算之中(見第 20 及
Fax: (852) 2358 1643 70 行)。
Email: makyli@ust.hk
Mathematical Excalibur, Vol. 8, No. 4, Aug 03- Oct 03 Page 2
The 2003 Hong Kong IMO team from left to right: Wei Fei Fei (Guide), Leung Chit Wan (Deputy Leader), Chung Tat Chi, Siu
Tsz Hang, Kwok Tsz Chiu, Yu Hok Pun, Yeung Kai Sing, Lau Wai Shun, Leung Tat Wing (Leader).