Nipunktcirklen.
En lille matematisk godnathistorie. Tryk på “næste” for at gå et trin frem. Du kan – når som helst – flytte trekantens hjørner A, B og C med musen.
Figure figure = Position [0,0] Size[x,y] Origin[x/3,y/2] Unit x/12 Color "white";
//Axes axes = Color "black";
//Grid grid = Color "blue";
//Units units = Color "black";
State st = From 0 To 8 Initial 0;
PushButton resetbutton = Text "Forfra" Action reset st Position [10,10] Size [80,25];
PushButton nextbutton = Text "Næste" Action incr st Position [10,40] Size [80,25];
PushButton prevbutton = Text "Tilbage" Action decr st Position [10,70] Size [80,25];
Point A = [0,0] Free Size 2.5 Color "red";
Point B = [5,3] Free Size 2.5 Color "red";
Point C = [5.5,-1] Free Size 2.5 Color "red";
Label laba = "A" At A Offset [10,0] Color "black";
Label labb = "B" At B Offset [10,0] Color "black";
Label labc = "C" At C Offset [10,0] Color "black";
Line ab1 = Start A Dir B-A Infinite Size 0.5 Color "gray";
Line bc1 = Start B Dir C-B Infinite Size 0.5 Color "gray";
Line ca1 = Start C Dir A-C Infinite Size 0.5 Color "gray";
Line ab2 = Start A Dir B-A Size 1.5 Color "black";
Line bc2 = Start B Dir C-B Size 1.5 Color "black";
Line ca2 = Start C Dir A-C Size 1.5 Color "black";
Visibility vis1 = st >= 1;
Point Ma = (B+C)/2 Size 2.5 Color "blue";
Point Mb = (A+C)/2 Size 2.5 Color "blue";
Point Mc = (B+A)/2 Size 2.5 Color "blue";
Visibility vis2 = st >= 2;
Point Afod = project( A, B, C ) Size 2.5 Color "blue";
Point Bfod = project( B, C, A ) Size 2.5 Color "blue";
Point Cfod = project( C, A, B ) Size 2.5 Color "blue";
Visibility vis3 = st >= 3;
Line ha1 = Start A Dir Afod-A Infinite Size 0.5 Color "gray";
Line hb1 = Start B Dir Bfod-B Infinite Size 0.5 Color "gray";
Line hc1 = Start C Dir Cfod-C Infinite Size 0.5 Color "gray";
Line ha2 = Start A Dir Afod-A Size 1.5 Color "black";
Line hb2 = Start B Dir Bfod-B Size 1.5 Color "black";
Line hc2 = Start C Dir Cfod-C Size 1.5 Color "black";
Variable rema = if length(B-Afod) > length(C-Afod) then B else C endif;
Variable remb = if length(A-Bfod) > length(C-Bfod) then A else C endif;
Variable remc = if length(B-Cfod) > length(A-Cfod) then B else A endif;
RightAngle raa = At Afod From angle(A-Afod) To angle(rema-Afod) Size 0.5 Color "gray";
RightAngle rab = At Bfod From angle(B-Bfod) To angle(remb-Bfod) Size 0.5 Color "gray";
RightAngle rac = At Cfod From angle(C-Cfod) To angle(remc-Cfod) Size 0.5 Color "gray";
Variable P = intersect( A, Afod, B, Bfod );
Label labp = "P" At P Offset [10,10] Color "black";
Visibility vis4 = st >= 4;
Point Ham = (A+P)/2 Size 2.5 Color "blue";
Point Hbm = (B+P)/2 Size 2.5 Color "blue";
Point Hcm = (C+P)/2 Size 2.5 Color "blue";
Visibility vis5 = st >= 5;
Variable c9 = intersect( (Ma+Afod)/2, (Ma+Afod)/2 + (B-C)^, (Mb+Bfod)/2, (Mb+Bfod)/2 + (A-C)^ );
Circle circle9 = Center c9 Radius length( c9 - Ma ) Size 1.5 Color "blue";
Visibility vis6 = st >= 6;
Variable angleA = ( angle( B - A ) + angle( C - A ) )/2;
Variable retnA = [ cos(angleA), sin(angleA) ];
Variable angleB = ( angle( C - B ) + angle( A - B ) )/2;
Variable retnB = [ cos(angleB), sin(angleB) ];
Variable angleC = ( angle( A - C ) + angle( B - C ) )/2;
Variable retnC = [ cos(angleC), sin(angleC) ];
Variable c_in = intersect( A, A + retnA, B, B + retnB );
Circle circle_in = Center c_in Radius length( c_in - project( c_in, A, B ) ) Size 1 Color "red";
Visibility vis7 = st >= 7;
Variable c_a = intersect( A, A + retnA, B, B + retnB^ );
Circle circle_a = Center c_a Radius length( c_a - project( c_a, B, C ) ) Size 1 Color "red";
Variable c_b = intersect( B, B + retnB, C, C + retnC^ );
Circle circle_b = Center c_b Radius length( c_b - project( c_b, C, A ) ) Size 1 Color "red";
Variable c_c = intersect( C, C + retnC, A, A + retnA^ );
Circle circle_c = Center c_c Radius length( c_c - project( c_c, A, B ) ) Size 1 Color "red";
Visibility vis0ex = st == 0;
Text t01 = "Lad os se på en vilkårlig trekant." Offset [20,360] Color "black";
Text t02 = "Vi markerer først sidernes midtpunkter." Offset [20,380] Color "black";
Visibility vis1ex = st == 1;
Text t11 = "Nu tegner vi højdernes fodpunkter." Offset [20,380] Color "black";
Visibility vis2ex = st == 2;
Text t21 = "og højderne, der jo - som vi ved - skæres i ét punkt, P." Offset [20,380] Color "black";
Visibility vis3ex = st == 3;
Text t31 = "Nu markeres endelig på hver højde det punkt," Offset [20,340] Color "black";
Text t32 = "som ligger midt mellem P og det hjørne," Offset [20,360] Color "black";
Text t33 = "som højden udgår fra." Offset [20,380] Color "black";
Visibility vis4ex = st == 4;
Text t41 = "Det interessante er, at alle disse ni" Offset [20,360] Color "black";
Text t42 = "punkter ligger på samme cirkel." Offset [20,380] Color "black";
Visibility vis5ex = st == 5;
Text t51 = "Den såkaldte nipunktscirkel!" Offset [20,340] Color "black";
Text t52 = "Og ikke nok med det." Offset [20,360] Color "black";
Text t53 = "Prøv at se trekantens indskrevne cirkel." Offset [20,380] Color "black";
Visibility vis6ex = st == 6;
Text t61 = "Den berører lige akkurat nipunktcirklen." Offset [20,340] Color "black";
Text t62 = "Og ikke nok med det." Offset [20,360] Color "black";
Text t63 = "Prøv at se de 'tilskrevne' cirkler." Offset [20,380] Color "black";
Visibility vis7ex = st == 7;
Text t71 = "De berører også lige akkurat nipunktcirklen." Offset [20,340] Color "black";
Text t72 = "Se, det var et rigtigt matematisk eventyr!" Offset [20,360] Color "black";
Text t73 = "Godnat. Og sov godt!" Offset [20,380] Color "black";
Visibility vis8ex = st == 8;
Text t81 = "Jeg sagde: Godnat. Og sov godt!" Offset [20,380] Color "black";