Linjer (1).
Figuren viser to linjer, hvor hældningskoefficienten er a og skæringen med y-aksen er b. Du kan variere a og b for hver af de to linjer.
Figure figure = Position [0,0] Size[x,y*13/16] Origin[x/3,y*5/8] Unit x/12 Color "white";
Axes axes = Color "black";
Grid grid = Color "blue";
Units units = Color "black";
SlidePot a1 = From -2 To 2 Initial 1 Position [20,y-50] Size [150,0];
SlidePot b1 = From -2 To 4 Initial 1 Position [20,y-20] Size [150,0];
Text a1_txt = "a1 = a1,2" Offset [190,y-45] Color "blue";
Text b1_txt = "b1 = b1,2" Offset [190,y-15] Color "blue";
SlidePot a2 = From -2 To 2 Initial 2 Position [320,y-50] Size [150,0];
SlidePot b2 = From -2 To 4 Initial -1 Position [320,y-20] Size [150,0];
Text a2_txt = "a2 = a2,2" Offset [490,y-45] Color "green";
Text b2_txt = "b2 = b2,2" Offset [490,y-15] Color "green";
Line line1 = Start [0,b1] Dir [1,a1] Infinite Size 1 Color "blue";
Line line2 = Start [0,b2] Dir [1,a2] Infinite Size 1 Color "green";
Variable x0 = (b1-b2)/(a2-a1);
Variable y0 = (a2*b1-a1*b2)/(a2-a1);
Visibility vis = ( a1 != a2 );
Label cut = "Skæringspunkt: (x0,2, y0,2)" At [3,1.2] Offset [0,0] Color "black" Style "";