A Triangle with Three Distinguished Collinear Points
- Instruction of Geometry by Use of a Drawing Game on a Display -
by
Kazunori FUJITA, Akiko MATSUSHIMA and Hiroo FUKAISHI
(Received July 13, 2005)
Abstract
An effective use of a computer makes mathematics classes much more interesting and motivates many students to learn.
In elementary geometry we have five significant notions for a triangle; that is, the center of gravity, the incenter, the excenter, the circumcenter and the orthocenter of a triangle.
Concerning those five points we have a natural problem. Determine a triangle on the plane with one of the following conditions :
( 1) Three of those five points lie in a common straight line,
(2) A vertex lies on the straight line through two of those five points.
In this paper we present a drawing game for a student to find a solution to the above problem with fun, and obtain some results from our various experiments.
§ 1. Introduction
In the sequel to [3] our study aims to develop a drawing game on a display as a teaching material for elementary geometry classes with activities using computers.
In elementary geometry we have five significant notions for a triangle; that is, the center of gravity, the incenter, the excenter, the circumcenter and the orthocenter
of a triangle. Concerning those points we have a natural problem. Determine a trian- gle on the plane with one of the following conditions :
( 1) Three of those five points lie in a common straight line,
(2) A vertex lies on the straight line through two of those five points.
In this paper we present a drawing game for a student to find a solution to the above problem with fun, and obtain some results from our various experiments. Some of them are already known. In fact, "Mathematical Discovery" due to G. Polya [6]
indicates the spirit of our research in mathematics education. For terminology of geometry throughout the paper, consult [1], [2] and [5].
As for the present paper, the first author gave a general idea for drawing a triangle and related figures on a display and made some preliminary programs for teaching materials in elementary geometry just like a computer game. The second author wrote the programs for all the figures and gave the proofs of all theorems under the direction of the first author. The last author joined the discussions and arranged for publishing.
§ 2. A program for drawing game
We divide our operation into the drawing part and the printing part, due to the circumstances of our computer machines.
PART ONE : To draw a triangle and related figures.
A program for drawing game of Theorem 1 in § 3 is written in Visual Basic Ver. 6.0 by Microsoft Corporation and consists of the following five steps (see List 1).
Step 1. Set the coordinates axes and the initial position each vertex of a triangle -6.ABC and draw each side in black.
Step 2. Plot the orthocenter H in red, the circum-circle with the circumcenter O in blue, and the inscribed circle with the incenter / in green. Draw the straight line through H and O in red.
Step 3. According to the indication by the mouse, move each vertex A, B, C of the triangle from the initial position to an arbitrary position.
Step 4. Draw a perpendicular from each vertex A, B, C to the opposite side with a
Step 5. When DABC is obtuse, extend each side up to H with a dotted green line.
PART Two : To process a bitmap file (bmp) by
~TEX
2c:, to exhibit it on another display, and to print it.§ 3. Results
Let V be a point arbitrarily fixed on the plane and DABC be a triangle on the same plane. Any point P on the plane is uniquely determined by a continued ratio
( ,\ : µ : v ) where
----+
VP=
,\VA+µVB+vVC,\+µ+v
The ratio ( ,\ : µ : v) is called the barycentric coordinates of P with respect to DABC (see [4; P.164-165], [1; P.217-218]).
For example, the barycentric coordinates of a vertex A is given by ( 1 : 0 : 0 ) . In DABC, put a = BC, b = CA, c = AB as usual. Then the barycentric coordi- nates of significant points in DABC are given as follows :
(1:1:1)
(sin2A: sin2B: sin2C) (a:b:c)
(-a:b:c) (a:-b:c)
(a
:b:-c)(tanA: tanB: tanC)
for the center of gravity G;
for the circumcenter O;
for the incenter /;
for the excenter Ia in the interior of LA;
for the excenter h in the interior of LB;
for the excenter le in the interior of L C;
for the orthocenter H, if DABC is not a right triangle.
Observing the figures drawn on a display, we obtain the following theorems. In each figure of the theorems the third distinguished point is slightly moved from the straight line through the first and second distinguished points for illustration.
Theorem 1.
If
the circumcenter 0, the orthocenter H and the incenter I of !:::.ABC are collinear, then !:::.ABC is an isosceles triangle (Fig. 1) .Proof By the assumption the incenter / lies on the Euler line OGH. We have
for some scalar t.
Hence
-
GO= tGI __.(sin2A) GA+(sin2B) GB+(sin2C)
Ge =
t (aGA+bGB+cGC) .sin2A +sin2B+sin2C a +b+c
We have
( sin 2A - sin 2C) GA+ ( sin 2B - sin 2C )
GB
= t { ( a - c) GA + ( b - c)GB } ,
sin2A +sin2B+ sin2C a+b+c
smce GC =-GA-GB.
Hence
( sin 2A - sin 2C) : ( sin 2B - sin 2C)
= (
a - c) : ( b - c) ,- -
since the vectors GA and GB are linearly independent.
By the law of sines for !:::.ABC,
( a cos A - c cos C ) : ( b cos B - c cos C)
= (
a - c) : ( b - c) . By the law of cosines for !:::.ABC,a ( b2
+c2
-a2) - c ( a2 +b2-c2) :
b (c2
+a2 -b2) - c ( a2 +b2-c2)
2bc 2ab 2ca 2ab
= (a-c):
(b-c).We have
(a-b)(b-c)(c-a)(a+b+c)2
=
0.Therefore,
a
=
b or b=
c or c=
a .•
Theorem 2. If a vertex A, the circumcenter O and the incenter I of ~ABC are collinear, then ~ABC is an isosceles triangle with AB = AC (Fig. 2).
Proof By the assumption we have
for some scalar t.
Hence
We have
---t
AO = tAI
(sin2B) AB+(sin2C)
AC =
t (bAB+cAC).
sin2A +sin2B+sin2C
a +b+c
sin 2B : sin 2C
=
b : c.By the laws of sines and cosines for ~ABC,
cos B = cos C.
Therefore,
LB =LC.
•
Theorem 3. ( [1]) If a vertex A, the circumcenter O and the center of gravity G of
~ABC are collinear, then ~ABC is an isosceles triangle with AB = AC or a right triangle with LA
=
90° (Figs. 3.1 - 3.2).Theorem 3 is given as Exercise 8 of § 1.6 in [1]. We give a proof for completeness.
Proof By the assumption we have
for some scalar t.
Hence
Hence
- > --->
AO= tAG
(sin2B) AB+(sin2C)
AC =
t (AB;AC).
sin 2A + sin 2B + sin 2C
sin 2B sin 2C = 1 : 1.
Therefore,
LB
=
LC or LA=
90°.•
Theorem 4.
If
a vertex A, the circumcenter O and the orthocenter H of l:::,.ABC are collinear, then !:::.ABC is an isosceles triangle with AB = AC or a right triangle withLA = 90° (Fig. 4).
Proof Case 1. 1:::,.ABC is not a right triangle.
By the assumption we have
for some scalar t.
Hence
---+ -
AO= tAH
( sin 2B)
AB+ (
sin 2C)AC =
t { ( tan B)AB
+ ( tan C)AC } .
sin2A +sin2B+sin2C tan A+ tanB + tanC Hence
sin 2B : sin 2C = tan B tan C . By the laws of sines and cosines for !:::.ABC,
cos B = cos C.
Therefore,
LB= LC.
Case 2. LA= 90°. The points A, 0 and H are collinear.
Case 3. LB = 90° or LC = 90°. The points A, 0 and H are not collinear.
D
Theorem 5.
If
the center of gravity G, the incenter I and the excenter Ia in the interior of LA in l:::,.ABC are collinear, then !:::.ABC is an isosceles triangle with AB = AC (Fig. 5).Proof Since the vertex A lies on the straight line I G Ia , we have AI= tAG
for some scalar t.
Hence
bAB+cAC
=
t (AB;AC).
a+b+c Hence
b c
=
1 1.Therefore,
b = C.
•
Theorem 6. If the orthocenter H, the incenter I and the excenter Ia in the interior of LA in DABC are collinear, then DABC is an isosceles triangle with AB = AC or a right triangle with LA = 90° (Fig. 6).
Proof Case 1. DABC is not a right triangle.
Since the vertex A lies on the straight line I H Ia, we have
for some scalar t.
Hence
Hence
AH= tAI
(tanB) AB+ (tanC) AC
=
t ( bAB+cAC).tanA+tanB+tanC -a+b+c
tanB: tanC = b c.
By the laws of sines and cosines for DABC, cos B = cos C.
Therefore,
LB= LC.
Case 2. LA = 90°. The points H, I and Ia are collinear.
Case 3. LB= 90° or LC= 90°. The points H, I and Ia are not collinear.
D
Theorem 7.
If
the orthocenter Hand the excenters h, le in the interior of LB, LC in DABC, respectively, are collinear, then DABC is a right triangle with LA = 90° (Fig. 7).Proof Case 1. DABC is not a right triangle.
Since the vertex A lies on the straight line h H le, we have
for some scalar t.
Hence
Hence
AH = tAlb
( tan
B) AB+ (
tan C)AC =
t { (-b) AB+
cAC } .
tanA+tanB+tanC a-b+c
tanB
tanC
=
-bC
In the above equation the left-hand side
>
0 and the right-hand side<
0, which is a contradiction.Case 2. LA = 90°. The points H, h and le are collinear.
Case 3. LB= 90° or LC= 90°. The points H, h and le are not collinear.
D
References
[1] H. S. M. Coxeter: Introduction to Geometry, 2nd ed., John Wiley and Sons Inc, New
York, 1980. 〔コクセター (銀林 浩・訳): 幾何学入門 第2版, 明治図書, 東京,
1982.〕
[2] H. S. M. Coxeter and S. L. Greitzer: Geometry revised, New Mathematical Library, Number 6, School Mathematics Study Group, Random House, Inc., New York, 1967.
〔コークスタ ー, グレイツァー (寺阪英孝・訳): 幾何学再入門, SMSG双書, 河 出書房新社, 東京, 1970.〕
[3] K. Fujita, A. Matsushima and H. Fukaishi : A Locus of the Orthocenter of a Triangle Instruction in Geometry by a Moving Locus on a Computer, Mem. Fae. Educ., Kagawa University II, 55 (2005), 1-13.
[4] 一松 信: 代数学入門 第三課, 近代科学杜, 東京, 1994. 〔= Sin Hitotumatu : Introduction to Algebra, The Third Lesson, Kindai-kagaku-sha, Tokyo, 1994.〕
[5] D. Pedoe : Geometry, Dover Puhl. Inc., New York, 1970.
[6] G. Polya: Mathematical Discove
ハ,
on understanding, learning, and teaching problem solving, Vol. l - 2, John Wiley and Sons, Inc., New York, 1962. 〔ポリア(柴垣和三 雄, 金山靖夫・訳):数学の問題の発見的解き方, I - Il, みすず書房, 東京, 1964,1967.〕
Kazunori FUJITA
Department of Mathematics, Faculty of Education, Kagawa University 1-1 Saiw証cho, Takamatsu-shi, Kagawa, 760-8522, JAPAN
E-mail address : fujita@ed.kagawa-u.ac.jp Akiko MATSUSHIMA
Student of Master Course, Graduate School of Education, Kagawa University 1-1 Saiwai-cho, Takamatsu-shi, Kagawa, 760-8522, JAPAN
Hirao FUKAISHI
Department of Mathematics, Faculty of Education, Kagawa University 1-1 Saiw旺cho, Takamatsu-shi, Kagawa, 760-8522, JAPAN
E-mail address : fukaishi@ed.kagawa-u.ac.jp
Fig. 1
A
Fig. 3.1
Fig. 4
\
\
\Fig. 2
B
Fig. 3.2
Fig. 5
/ '
f
List 1. A program for drawing game of Theorem 1 Dim sx As Double, ex As Double
Dim sy As Double, ey As Double Dim ax As Double, ay As Double Dim bx As Double, by As Double Dim ex As Double, cy As Double Dim k As Integer
Dim ra(4) As Double
Dim hx, hy, ox, oy As Double Dim xh, yh, xo, yo As Double Dim qxh, qyh, qxo, qyo As Double
Drawing the initial figure Private Sub Form_A.ctivate()
Form 1 .DrawMode
=
vbNotXorPen Forml .Line (ax, ay)-(bx, by) Forml .line (bx, by)-(cx, cy) Forml .Line (ex, cy)-(ax, ay) Orthocenter ax, ay, bx, by, ex, cy Circum ax, ay, bx, by, ex, cy lncircle ax, ay, bx, by, ex, cy Ed_Line xh, yh, XO, yo, l 2 qxh=
xh: qyh=
yhqxo = xo: qyo = yo End Sub
Setting the form, the coordinate axes and the initial values of the coordinates of each vertex of a triangle Private Sub Form_Load()
Forml .Top= 100 Form 1 .Left
=
l 00Forml .Width
=
0.6 * Screen.Width Forml .Height=
0.8 * Screen.Height sx=
-15ex= 15 wx
=
ex - sxwy = wx * Form 1 .Scale Height / Form 1 .ScaleWidth sy = -0.5 * wy
ey
=
0.5 * wyForm 1 .Scale (sx, ey)-(ex, sy) Forml .BackColor = vbWhite Forml .DrawWidth
=
1 ax= -3: ay = 8 bx = -5: by= -5 ex= 6: cy=
2k
=
1 End SubAction corresponding to the left button of mouse
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If k
=
2 Thenk
=
1 Exit Sub End If k=2d l = Sqr((ax - X) A 2 + (ay - Y) A 2) If dl < 1 Then
Forml .Line (ax, ay)-(bx, by) Forml .Line (ex, ey)-(ax, ay) Forml.Line (X, Y)-(bx, by) Forml .Line (ex, cy)-(X, Y)
Orthocenter ax, ay, bx, by, ex, ey Orthoeenter X, Y, bx, by, ex, cy Circum ax, ay, bx, by, ex, cy Circum X, Y, bx, by, ex, ey lneircle ax, ay, bx, by, ex, ey lncircle X, Y, bx, by, ex, cy Ed_Line qxh, qyh, qxo, qyo, 12 Ed_Line xh, yh, xo, yo, 12 qxh = xh: qyh = yh qxo = xo: qyo = yo ax= X: ay = Y Exit Sub End If
d2
=
Sqr((bx - X) A 2 + (by - Y) A 2)· If d2 < 1 Then
Form l .Line (bx, by)-(ax, ay) Forml.Line (ex, cy)-(bx, by) Forml .Line (X, Y)-(ax, ay) Form 1 .Line (ex, cy)-(X, Y)
Orthocenter ax, ay, bx, by, ex, cy Orthocenter ax, ay, X, Y, ex, cy Cireum ax, ay, bx, by, ex, cy Circum ax, ay, X, Y, ex, ey lncircle ax, ay, bx, by, ex, cy lncircle ax, ay, X, Y, ex, cy Ed_Line qxh, qyh, qxo, qyo, l 2 Ed_Line xh, yh, xo, yo, 12 qxh = xh: qyh = yh qxo = xo: qyo = yo bx= X: by= Y Exit Sub End If
d3 = Sqr((cx - X) A 2 + (cy - Y) A 2) If d3 < l Then
Forml .Line (ex, cy)-(bx, by) Forml .Line (ax, ay)-(cx, cy)
Forml .Line (X, Y)-(bx, by) Form l .Line (ax, ay)-(X, Y)
Orthocenter ax, ay, bx, by, ex, cy Orthocenter ax, ay, bx, by, X, Y Circum ax, ay, bx, by, ex, cy Circum ax, ay, bx, by, X, Y lneircle ax, ay, bx, by, ex, ey lncircle ax, ay, bx, by, X, Y Ed_Line qxh, qyh, qxo, qyo, 12 Ed_Line xh, yh, xo, yo, 12 qxh = xh: qyh = yh qxo = xo: qyo = yo ex= X: cy = Y End If
End Sub
Action corresponding to the movement of mouse
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If k
=
l Then Exit Subdl = Sqr((ax - X) A 2 + (ay - Y) A 2) If dl < 1 Then
Forml .Line (ax, ay)-(bx, by) Forml .Line (ex, cy)-(ax, ay) Forml.Line (X, Y)-(bx, by) Forml .Line (ex, cy)-(X, Y)
Orthocenter ax, ay, bx, by, ex, cy Orthocenter X, Y, bx, by, ex, cy Cireum ax, ay, bx, by, ex, cy Circum X, Y, bx, by, ex, cy lneircle ax, ay, bx, by, ex, ey lneircle X, Y, bx, by, ex, cy Ed_Line qxh, qyh, qxo, qyo, 12 Ed_Line xh, yh, xo, yo, 12 qxh = xh: qyh = yh qxo
=
xo: qyo=
yoax= X: ay = Y Exit Sub End If
d2
=
Sqr((bx - X) A 2 + (by - Y) A 2) If d2 < l ThenForm 1 .Line (bx, by)-(ax, ay) Form 1 .Line (ex, ey)-(bx, by) Forml .Line (X, Y)-(ax, ay) Form 1 .Line (ex, cy)-(X, Y)
Orthocenter ax, ay, bx, by, ex, cy Orthoeenter ax, ay, X, Y, ex, ey Circum ax, ay, bx, by, ex, ey Circum ax, ay, X, Y, ex, cy lncircle ax, ay, bx, by, ex, cy
lneircle ax, ay, X, Y, ex, ey Ed_Line qxh, qyh, qxo, qyo, 12 Ed_Line xh, yh, xo, yo, 12 qxh = xh: qyh = yh qxo = xo: qyo = yo bx= X: by= Y Exit Sub
End If
d3 = Sqr((ex - X) A 2 + (ey - Y) A 2) If d3 < 1 Then
Form 1 .Line (ex, ey)-(bx, by) Form 1 .Line (ax, ay)-(ex, cy) Forml .Line (X, Y)-(bx, by) Form l .Line (ax, ay)-(X, Y)
Orthoeenter ax, ay, bx, by, ex, cy Orthoeenter ax, ay, bx, by, X, Y Cireum ax, ay, bx, by, ex, ey Cireum ax, ay, bx, by, X, Y lneircle ax, ay, bx, by, ex, ey lncircle ax, ay, bx, by, X, Y Ed_Line qxh, qyh, qxo, qyo, 12 Ed_Line xh, yh, xo, yo, 12 qxh = xh: qyh = yh qxo = xo: qyo = yo ex= X: ey = Y End If
End Sub
Presentation of the orthoeenter of a triangle Private Sub Orthocenter(jxa, jya, jxb, jyb, jxe, jyc)
xa = jxa: ya = jya xb = jxb: yb = jyb xe = jxc: ye = jye
ux = x b - xa: uy = yb - ya vx = xa - xc: vy = ya - ye wx = xc - xb: wy = ye - yb a= Sqr(wx A 2 + wy A 2) b = Sqr(vx A 2 + vy A 2) e = Sqr(ux A 2 + uy A 2) ah
=
b A 2 + e A 2 - a A 2 bh = e A 2 + a A 2 - b A 2 ch = a A 2 + b A 2 - e A 2If ah>= 0 And bh >= 0 And ch>= 0 Then p 1 = xb * ye - xc * yb: q 1
=
-wy * ya - wx * xa p2 = xc * ya - xa * ye: q2 = -vy * yb - vx * xb p3=
xa * yb - xb * ya: q3=
-uy * ye - ux * xc xd=
(p 1 * wy - q 1 * wx) / a A 2yd = (-p 1 * wx - q 1 * wy) / a A 2 xe = (p2 * vy - q2 * vx) / b A 2 ye = (-p2 * vx - q2 * vy) / b A 2 xf
=
(p3 * uy - q 3 * ux) / e A 2yf
=
(-p3 * UX - q3 * Uy) / e A 2xh
=
(q2 * wy - ql * vy) / (wx * vy - wy * vx) yh=
(ql * vx - q2 * wx) / (wx * vy - wy * vx) Forml .DrawStyle=
2Forml .Line (xa, ya)-(xd, yd), vbBlue Form 1 .Line (xb, yb)-(xe, ye), vbBlue Form 1 .Line (xc, yc)-(xf, yf), vbBlue Forml .DrawStyle
=
0Forml .DrawWidth
=
5Forml .PSet (xh, yh), QBColor(l 2) Forml .DrawWidth
=
1Else
If bh < 0 Then
dm
=
xa: xa=
xb: xb=
dm dm=
ya: ya= yb: yb = dm End IfIf ch< 0 Then
dm
=
xa: xa=
xc: xc=
dmd m
=
ya: ya=
ye: ye=
d m End Ifux
=
xb - xa: uy = yb - ya vx = xa - xc: vy=
ya - yewx
=
xe - xb: wy=
ye - yb d =wx*vy-wy*vx If Abs(d) > 0.001 Thena
=
Sqr(wx A 2 + wy A 2) b=
Sqr(vx A 2 + vy A 2) c=
Sqr(ux A 2 + uy A 2)p 1
=
xb * ye - xc * yb: q 1 = -wy * ya - wx * xa q2=
-vy * yb - vx * xbxd
=
(p 1 * wy - q 1 * wx) / a A 2 yd=
(-pl * wx - ql * wy) / a A 2 xh=
(q2 * wy - q 1 * vy) / d yh=
(q 1 * vx - q2 * wx) / d H_Prolong xb, yb, xa, ya H_Prolong xc, ye, xa, ya Form 1 .DrawStyle = 2Forml .Line (xh, yh)-(xd, yd), vbBlue Forml .Line (xb, yb)-(xh, yh), vbBlue Forml .Line (xc, yc)-(xh, yh), vbBlue Form 1 .DrawStyle
=
0Form 1 .DrawWidth
=
5Form l .PSet (xh, yh), QBColor(l 2) Form 1 .DrawWidth
=
1End If End If End Sub
Extension of two sides at the adjacent vertex with an obtuse angle Private Sub H_Prolong(xl, yl, x2, y2)
Form 1 .DrawWidth
=
1I = Sqr((x 1 - x2) A 2 + (yl - y2) A 2) ra(l)
=
Sqr((xl - sx) A 2 + (yl - sy) A 2) ra(2)=
Sqr((x 1 - ex) A 2 + (yl - sy) A 2) ra(3)=
Sqr((x 1 - ex) A 2 + (yl - ey) A 2) ra(4)=
Sqr((xl - sx) A 2 + (yl - ey) A 2) r=
ra(l)For i
=
2 To 4If ra(i) > r Then r == ra(i) Next i
p
=
r / Itx
=
(1 - p) * x 1 + p * x2 ty=
(1 - p) * yl + p * y2 Form 1 .DrawStyle=
2Forml.Line (x2, y2)-(tx, ty), QBColor(2) Form 1 .DrawStyle
=
0End Sub
Presentation of the circumcenter of a triangle Private Sub Circum(xa, ya, xb, yb, xc, ye)
mx
=
(xa + xb) / 2: my=
(ya + yb) / 2 nx=
(xa + xc) / 2: ny == (ya + ye) / 2ux
=
xb - xa: uy=
yb - yavx
=
xc - xa: vy=
ye - yawx = xc - xb: wy = ye - yb d
=
ux * vy - vx * uy If Abs(d) > 0.01 Thena
=
Sq r(wx A 2 + wy A 2)b
=
Sqr(vx A 2 + vy A 2) c=
Sqr(ux A 2 + uy A 2)s
=
(a + b + c) / 2Ls
=
Sqr(s * (s - a) * (s - b) * (s - c)) r=
(a * b * c) / (4 * Ls)p
=
ux * mx + uy * my q=
vx * nx + vy * ny xo=
(p * vy - q * uy) / d yo=
(q * ux - p * vx) / d Forml .DrawWidth=
5 Forml .PSet (xo, yo), vbBlue Forml .DrawWidth=
1Forml .Circle (xo, yo), r, vbBlue End If
End Sub
Presentation of the ineenter of a triangle Private Sub lneircle(xa, ya, xb, yb, xe, ye)
ux = xb - xa: uy = yb - ya vx = xe - xa: vy = ye - ya
· wx = xc - xb: wy = ye - yb d
=
ux * vy - vx * uy If Abs(d) > 0.01 Thena
=
Sq r(wx A 2 + wy A 2) b = Sqr(vx A 2 + vy A 2) c=
Sqr(ux A 2 + uy" 2) s = (a + b + c) / 2Ls = Sqr(s * (s - a) * (s - b) * (s - c)) r = Ls / s
p 1
=
ya * x b - yb * xa Lf = uy * xe - ux * ye + p 1 e=
-Lf / Abs(Lf)p2 = ya * xc - ye * xa Lg
=
vy * xb - vx * yb + p2 f = -Lg / Abs(Lg)ql =pl +e*r*c q2
=
p2 + f * r * bXi = (q 1 * vx - q2 * ux) / (ux * vy - uy * vx) Yi = (q 1 * vy - q2 * uy) / (ux * vy - uy * vx) Form 1 .DrawWidth = 5
Forml .PSet (Xi, Yi), QBColor(2) Form l .DrawWidth
=
1Forml .Circle (Xi, Yi), r, vbBlue End If
End Sub
Drawing the straight line passing through two points Private Sub Ed_Line(xl, yl, x2, y2, c)
If Abs(xl - x2) <= Abs(yl - y2) Then
edxl
=
((xl - x2) * sy - xl * y2 + x2 * yl) / (yl - y2) edyl=
syedx2 = ((xl - x2) * ey - x 1 * y2 + x2 * yl) / (yl - y2) edy2 = ey
Else
edxl = sx
edyl = ((yl - y2) * sx + x l * y2 - x2 * yl) / (x 1 - x2) edx2
=
exedy2 = ((yl - y2) * ex + x l * y2 - x2 * yl) / (x 1 - x2) End If
Form 1 .Line (edx 1 , edyl )-(edx2, edy2), QBColor(c) End Sub