Graphing Changes on the Number Line
Loading the math board and drawing, please wait…
In collections
Addieren und Subtrahieren von ganzen und rationalen Zahlen
This example demonstrates how to graph changes on the number line, showing how points move on the number line. The core math concepts involved include integer addition and subtraction, and the movement of points on the number line. The construction involves using GeoGebra's Sequence, Element, Textfield, and other commands and objects. This example is suitable for middle school math education, part
GeoGebra Commands & Parameters
Sequence(Random[1, 10], i, 1, 10) → randomNumbers, {5, 8, 10, 3, 10, 9, 1, 6, 1, 3}Element(randomNumbers, Mod[questionCount, Length[randomNumbers]] + 1) → randomNumberTextfield(input) → inputBoxJoin({Sequence[Segment[Corner[4] + (RasterPixMat * ((k * RasterStepXY), 0)), Corner[4] + (RasterPixMat * ((k * RasterStepXY), RasterMaxY))], k, 0, RasterMaxX / RasterStepXY], Sequence[Segment[Corner[4] + (RasterPixMat * (0, (k * RasterStepXY))), Corner[4] + (RasterPixMat * (RasterMaxX, (k * RasterStepXY)))], k, 0, RasterMaxY / RasterStepXY]}) → RasterStreckenJoin({Sequence[Text[UnicodeToLetter[65 + k], Midpoint[Corner[4] + (RasterPixMat * ((k * RasterStepXY), RasterMaxY)), Corner[4] + (RasterPixMat * (((k + 1) * RasterStepXY), RasterMaxY))], false, true, 0, -1], k, 0, RasterMaxX / RasterStepXY - 1], Sequence[Text[("" * k), Midpoint[Corner[4] + (RasterPixMat * (RasterMaxX, ((k - 1) * RasterStepXY))), Corner[4] + (RasterPixMat * (RasterMaxX, (k * RasterStepXY)))], false, true, 1, 0], k, 1, RasterMaxY / RasterStepXY]}) → RasterBeschriftungSequence(Sequence[Corner[4] + (RasterPixMat * ((k * RasterStepXY), (m * RasterStepXY))), k, 0, RasterMaxX / RasterStepXY], m, 0, RasterMaxY / RasterStepXY) → RasterPunkteEllipse(Midpoint[PointsAZK(1), PointsAZK(2)] + (sqrt(Distance[PointsAZK(2), Midpoint[PointsAZK(1), PointsAZK(2)]]^(2) - Distance[PointsBZK(2), Midpoint[PointsAZK(1), PointsAZK(2)]]^(2)), 0), Midpoint[PointsAZK(1), PointsAZK(2)] + ((-sqrt(Distance[PointsAZK(2), Midpoint[PointsAZK(1), PointsAZK(2)]]^(2) - Distance[PointsBZK(2), Midpoint[PointsAZK(1), PointsAZK(2)]]^(2))), 0), Distance[PointsAZK(1), PointsAZK(2)] / 2) → ellZKIf(step < 5, -7, 3) → numberStone1If(step < 5, 10, -8) → numberStone2If(step < 5, -5, 2) → numberStone3If(step < 5, -8, -6) → numberStone4If(step < 5, 3, 7) → numberStone5If(step < 5, 5, -2) → numberStone6Sequence(IsInRegion[AllPStones(k), RegionZK(1)], k, 1, Length[AllPStones]) → StoneInRegionSum(Sequence[If[StoneInRegion(k), AllNumbersStones(k), 0], k, 1, Length[AllNumbersStones]]) → actualTemperatureSequence(PointsThermoEnd(1) + (k * (0, Distance[PointsThermoEnd(1), PointsThermoEnd(2)] / (thermoEnd - thermoStart))), k, 0, thermoEnd - thermoStart, 1) → PointsThermoRemoveUndefined(Sequence[If[Mod[TemperatureList(k), thermoStepMark] ≟ 0, Segment[PointsThermo(k) + (((-segLengthThermo)) / 2, 0), PointsThermo(k) + (segLengthThermo / 2, 0)]], k, 1, Length[PointsThermo]]) → segMarkThermoRemoveUndefined(Sequence[If[Mod[TemperatureList(k), thermoStepCap] ≟ 0, Text[((("\textsf{\(" * If[TemperatureList(k) > 0, "+", ""]) * TemperatureList(k)) * "\)}"), PointsThermo(k) + ((6 / 5 * segLengthThermo), 0.05), false, true, 0, 0]], k, 1, Length[PointsThermo]]) → CapThermoText(((("\textsf{\bold{\(" * If[actualTemperature > 0, "+", ""]) * actualTemperature) * "\)}}"), PointsThermo(IndexOf[actualTemperature, TemperatureList]) + ((-6 / 5 * segLengthThermo), 0.05), false, true, 0, 0) → CapActualTemperatureSequence(((dimStoneA * cos(k°)), (dimStoneB * sin(k°))), k, 0, 360, 5) → PointStoneText((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone1 > 0, "+", numberStone1 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone1)), (abs(numberStone1) * "")]) * "}}}"), PStone1 + (0, 0.05), false, true, 0, 0) → txtStone1Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone2 > 0, "+", numberStone2 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone2)), (abs(numberStone2) * "")]) * "}}}"), PStone2 + (0, 0.05), false, true, 0, 0) → txtStone2Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone3 > 0, "+", numberStone3 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone3)), (abs(numberStone3) * "")]) * "}}}"), PStone3 + (0, 0.05), false, true, 0, 0) → txtStone3Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone4 > 0, "+", numberStone4 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone4)), (abs(numberStone4) * "")]) * "}}}"), PStone4 + (0, 0.05), false, true, 0, 0) → txtStone4Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone5 > 0, "+", numberStone5 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone5)), (abs(numberStone5) * "")]) * "}}}"), PStone5 + (0, 0.05), false, true, 0, 0) → txtStone5Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone6 > 0, "+", numberStone6 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone6)), (abs(numberStone6) * "")]) * "}}}"), PStone6 + (0, 0.05), false, true, 0, 0) → txtStone6Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone7 > 0, "+", numberStone7 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone7)), (abs(numberStone7) * "")]) * "}}}"), PStone7 + (0, 0.05), false, true, 0, 0) → txtStone7Textfield(input021) → InputBox021Textfield(input031) → InputBox031Textfield(input041) → InputBox041Textfield(input051) → InputBox051Textfield(input061) → InputBox061Textfield(input071) → InputBox071SelectedIndex(dropdown031) → index031If(actualTemperature > -2, index031 ≟ 2, index031 ≟ 3) → correctdd031SelectedIndex(dropdown061) → index061If(actualTemperature > -4, index061 ≟ 2, index061 ≟ 3) → correctdd061SelectedIndex(dropdown081) → index081SelectedIndex(dropdown082) → index082Segment(ZGStart + ((-ZGEdge), 0), ZGStart + (ZGLength + ZGEdge, 0)) → ZGSegSequence(ZGStart + (k / (ZGMax - ZGMin) * (ZGLength, 0)), k, 0, ZGMax - ZGMin) → ZGPointsSequence(Segment[ZGPoints(k) + (0, If[Mod[k, ZGCap] ≟ 1, ZGDis02, ZGDis01]), ZGPoints(k) - (0, If[Mod[k, ZGCap] ≟ 1, ZGDis02, ZGDis01])], k, 1, ZGMax - ZGMin + 1) → ZGSegListSequence(Text[(("\textsf{\small{\bold{\(" * (ZGMin + k - 1)) * "\)}}}"), ZGPoints(k) + (If[ZGMin + k - 1 < 0, -0.15, 0], (-ZGDis02)), false, true, 0, -1], k, 1, ZGMax - ZGMin + 1, ZGCap) → ZGCapListText("\textsf{\textcolor{db6114}{\small{\bold{\(-2\)}}}}", ZGPoints(ZGMin - 2 - 1) + (If[ZGMin - 2 - 1 < 0, -0.15, 0], (-ZGDis02)), false, true, 0, -1) → CapZG02Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[number031 > 0, "+", number031 ≟ 0, "\phantom{+}", "\(-\)"] * abs(number031)), (abs(number031) * "")]) * "}}}"), Pos031 + (0, 0.05), false, true, 0, 0) → txtStone031Segment(PosZG02 + (0, ZGDis02 + 0.25), PosZG04 + (0, ZGDis02 + 0.25)) → seg03Text((((("\textsf{\textcolor{db6114}{\small{\bold{\(" * If[actualTemperature < -2, "-", "+"]) * "\) ") * abs(number031)) * "}}}}"), Midpoint[seg03], false, true, 0, 1) → CapZG03Text((("\textsf{\textcolor{db6114}{\small{\bold{\(" * actualTemperature) * "\)}}}}"), ZGPoints(ZGMin + actualTemperature - 1) + (If[actualTemperature < 0, -0.15, 0], (-ZGDis02)), false, true, 0, -1) → CapZG04Segment(ZGStart081 + ((-ZGEdge), 0), ZGStart081 + (ZGLength08 + ZGEdge, 0)) → ZGSeg081Segment(ZGStart082 + ((-ZGEdge), 0), ZGStart082 + (ZGLength08 + ZGEdge, 0)) → ZGSeg082Sequence(ZGStart081 + (k / (ZGMax - ZGMin) * (ZGLength08, 0)), k, 0, ZGMax - ZGMin) → ZGPoints081Sequence(ZGStart082 + (k / (ZGMax - ZGMin) * (ZGLength08, 0)), k, 0, ZGMax - ZGMin) → ZGPoints082Sequence(Segment[ZGPoints081(k) + (0, If[Mod[k, ZGCap] ≟ 1, ZGDis02, ZGDis01]), ZGPoints081(k) - (0, If[Mod[k, ZGCap] ≟ 1, ZGDis02, ZGDis01])], k, 1, ZGMax - ZGMin + 1) → ZGSegList081Sequence(Segment[ZGPoints082(k) + (0, If[Mod[k, ZGCap] ≟ 1, ZGDis02, ZGDis01]), ZGPoints082(k) - (0, If[Mod[k, ZGCap] ≟ 1, ZGDis02, ZGDis01])], k, 1, ZGMax - ZGMin + 1) → ZGSegList082Sequence(Text[(("\textsf{\small{\bold{\(" * (ZGMin + k - 1)) * "\)}}}"), ZGPoints081(k) + (If[ZGMin + k - 1 < 0, -0.15, 0], (-ZGDis02)), false, true, 0, -1], k, 1, ZGMax - ZGMin + 1, ZGCap) → ZGCapList081Sequence(Text[(("\textsf{\small{\bold{\(" * (ZGMin + k - 1)) * "\)}}}"), ZGPoints082(k) + (If[ZGMin + k - 1 < 0, -0.15, 0], (-ZGDis02)), false, true, 0, -1], k, 1, ZGMax - ZGMin + 1, ZGCap) → ZGCapList082If(step ≟ 2, correct021, step ≟ 7, correct071, true, step ≟ 3, correct031 ∧ correctdd031, step ≟ 4, correct041, step ≟ 5, correct051, step ≟ 6, correct061 ∧ correctdd061) → clickableBtnNextText((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[number061 > 0, "+", number061 ≟ 0, "\phantom{+}", "\(-\)"] * abs(number061)), (abs(number061) * "")]) * "}}}"), Pos061 + (0, 0.05), false, true, 0, 0) → txtStone061Segment(PosZG05 + (0, ZGDis02 + 0.25), PosZG07 + (0, ZGDis02 + 0.25)) → seg06Text((((("\textsf{\textcolor{db6114}{\small{\bold{\(" * If[actualTemperature < -4, "-", "+"]) * "\) ") * abs(number061)) * "}}}}"), Midpoint[seg06], false, true, 0, 1) → CapZG06Text((("\textsf{\textcolor{db6114}{\small{\bold{\(" * actualTemperature) * "\)}}}}"), ZGPoints(ZGMin + actualTemperature - 1) + (If[actualTemperature < 0, -0.15, 0], (-ZGDis02)), false, true, 0, -1) → CapZG07Segment(PosZG081(1) + (0, ZGDis02 + 0.25), PosZG081(2) + (0, ZGDis02 + 0.25)) → seg081Segment(PosZG082(1) + (0, ZGDis02 + 0.25), PosZG082(2) + (0, ZGDis02 + 0.25)) → seg082Text("\textsf{\textcolor{db6114}{\small{\bold{\(-3\)}}}}", ZGPoints(ZGMin - 3 - 1) + (If[-4 < 0, -0.15, 0], (-ZGDis02)), false, true, 0, -1) → CapZG05If(step ≟ 2 ∨ step ≟ 5, (4.75, 8.25), step ≟ 3 ∨ step ≟ 6, (2, 6.25), step ≟ 4 ∨ step ≟ 7, (2, 4), (1, 1)) → PosBtnShowSolution