Pythagoras’ læresætning.
Her er et af de mange beviser for Pythagoras’ læresætning. Tryk på “næste” for at gå et trin frem.
Figure figure = Position [0,0] Size[x,y] Origin[x/12,y*15/16] Unit x/12 Color "white";
//Axes axes = Color "black";
//Grid grid = Color "blue";
//Units units = Color "black";
Timer timer1 = From 0 To 4 Step 0.1 Tick 80;
Timer timer2 = From 0 To 20 Step 0.1 Tick 20;
Variable timer21 = if timer2 < 10 then timer2 else 10 endif;
Variable timer22 = if timer2 < 10 then 0 else timer2-10 endif;
State state = From 0 To 3 Initial 0 Trigger 1 start timer1 Trigger 2 start timer2;
PushButton nextButton = Text "Næste" Action incr state Position [350,10] Size [80,25];
PushButton resetButton = Text "Forfra" Action reset state, reset timer1, reset timer2 Position [500,10] Size [80,25];
Function turn( Vector v, Number a ) = [ v:0*cos(a)-v:1*sin(a), v:0*sin(a)+v:1*cos(a) ];
Point A = [4,5.5] Size 2.5 Color "black";
Point B = [1,7] Size 2.5 Color "black";
Point C = [1,5.5] Size 2.5 Color "black";
Line a = Start B Dir C-B Size 1.5 Color "black";
Line b = Start C Dir A-C Size 1.5 Color "black";
Line c = Start A Dir B-A Size 1.5 Color "black";
Label Alab = "A" At A Offset [10,0] Color "black";
Label Blab = "B" At B Offset [10,0] Color "black";
Label Clab = "C" At C Offset [10,-5] Color "black";
Label alab = "a" At (B+C)/2 Offset [2,5] Color "black";
Label blab = "b" At (A+C)/2 Offset [-20,-5] Color "black";
Label clab = "c" At (A+B)/2 Offset [-10,-10] Color "black";
Variable aVal = length( B - C );
Variable bVal = length( A - C );
Variable cVal = length( A - B );
Text t1 = "Pythagoras' læresætning siget at:"
Offset [350,75] Color "black";
Text t2 = "a2 + b2 = c2"
Offset [350,100] Color "black";
Text t3 = "Lad os bevise det!"
Offset [350,125] Color "black";
Visibility vis1 = state >= 1;
Line kv1 = Start [0,0] Dir [4.5,0] Size 1.5 Color "black";
Line kv2 = Start [0,0] Dir [0,4.5] Size 1.5 Color "black";
Line kv3 = Start [4.5,4.5] Dir [-4.5,0] Size 1.5 Color "black";
Line kv4 = Start [4.5,4.5] Dir [0,-4.5] Size 1.5 Color "black";
Visibility vis2 = timer1 > 1;
Variable A1 = [4.5-bVal,4.5];
Variable B1 = [4.5,4.5-aVal];
Variable C1 = [4.5,4.5];
Line a1 = Start C1 Dir B1-C1 Size 1.5 Color "blue";
Line b1 = Start A1 Dir C1-A1 Size 1.5 Color "blue";
Line c1 = Start B1 Dir A1-B1 Size 1.5 Color "blue";
Label a1lab = "a" At (B1+C1)/2 Offset [0,0] Color "black";
Label b1lab = "b" At (C1+A1)/2 Offset [0,0] Color "black";
Label c1lab = "c" At (A1+B1)/2 Offset [0,0] Color "black";
Visibility vis3 = timer1 > 2;
Variable vinkel3 = timer22 / 10 * pi / 2;
Variable A2 = [4.5,bVal] - [bVal*(1-cos(vinkel3)),0];
Variable B2 = [4.5-aVal,0] - [bVal*(1-cos(vinkel3)),0];
Variable C2 = [4.5,0] - [bVal*(1-cos(vinkel3)),0];
Line a2 = Start C2 Dir B2-C2 Size 1.5 Color "blue";
Line b2 = Start A2 Dir C2-A2 Size 1.5 Color "blue";
Line c2 = Start B2 Dir A2-B2 Size 1.5 Color "blue";
Label a2lab = "a" At (B2+C2)/2 Offset [0,0] Color "black";
Label b2lab = "b" At (C2+A2)/2 Offset [0,0] Color "black";
Label c2lab = "c" At (A2+B2)/2 Offset [0,0] Color "black";
Visibility vis4 = timer1 > 3;
Variable A3 = [bVal*cos(vinkel3),0];
Variable B3 = [0,bVal*sin(vinkel3)] + turn( [0,aVal], -vinkel3 );
Variable C3 = [0,bVal*sin(vinkel3)];
Line a3 = Start C3 Dir B3-C3 Size 1.5 Color "blue";
Line b3 = Start A3 Dir C3-A3 Size 1.5 Color "blue";
Line c3 = Start B3 Dir A3-B3 Size 1.5 Color "blue";
Label a3lab = "a" At (B3+C3)/2 Offset [0,0] Color "black";
Label b3lab = "b" At (C3+A3)/2 Offset [0,0] Color "black";
Label c3lab = "c" At (A3+B3)/2 Offset [0,0] Color "black";
Visibility vis5 = timer1 >= 4;
Variable vinkel4 = timer21 / 10 * pi / 2;
Variable A4 = [aVal,4.5] + turn( [-aVal,-bVal], vinkel4 );
Variable B4 = [aVal,4.5];
Variable C4 = [aVal,4.5] + turn( [-aVal,0], vinkel4 );
Line a4 = Start C4 Dir B4-C4 Size 1.5 Color "blue";
Line b4 = Start A4 Dir C4-A4 Size 1.5 Color "blue";
Line c4 = Start B4 Dir A4-B4 Size 1.5 Color "blue";
Label a4lab = "a" At (B4+C4)/2 Offset [0,0] Color "black";
Label b4lab = "b" At (C4+A4)/2 Offset [0,0] Color "black";
Label c4lab = "c" At (A4+B4)/2 Offset [0,0] Color "black";
Text t4 = "Arealet uden for de fire kopier af"
Offset [350,150] Color "black";
Text t5 = "trekant ABC er c2."
Offset [350,175] Color "black";
Visibility vis6 = timer2 >= 20;
Text t6 = "Men nu ser vi, at samme areal"
Offset [350,200] Color "black";
Text t7 = "også er a2 + b2."
Offset [350,225] Color "black";
Visibility vis7 = state >= 3;
Text t8 = "Altså er a2 + b2 = c2."
Offset [350,250] Color "black";