把变量变化写成“按计算结果”的算式表示

把变量变化写成“按计算结果”的算式表示
几何画板及绘图内容加载中,请稍等……
2026-01-21 17:55
这个范例演示如何把“变化量”组织成可计算的表达式,并在图形与文本反馈中呈现推导过程。核心数学概念包括:整数加减运算(Addition、Subtraktion、Ganze Zahlen)以及与随机试验相关的统计量(如期望值 Erwartungswert、方差 Varianz)。作图与交互要点:使用 GeoGebra 的脚本化流程生成题目与步骤控制,例如用 Sequence、Element 组织对象序列,用 Textfield 与 Text 进行输入与提示文本拼接(Join);用 If 与 RemoveUndefined 处理条件分支与空值移除;在计算部分用 Sum 对求和量进行汇总,并通过 SelectedIndex 控制当前步骤/选项;同时配合几何构造对象(如 Ellipse、CircleArc、Segment)以及向量辅助(UnitOrthogonalVector)生成所需的几何关系;为

GeoGebra 命令及参数

  1. Sequence(Random[1, 10], i, 1, 10) → randomNumbers, {6, 6, 4, 3, 8, 3, 1, 3, 6, 3}
  2. Element(randomNumbers, Mod[questionCount, Length[randomNumbers]] + 1) → randomNumber
  3. Textfield(input) → inputBox
  4. Join({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]}) → RasterStrecken
  5. Join({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]}) → RasterBeschriftung
  6. Sequence(Sequence[Corner[4] + (RasterPixMat * ((k * RasterStepXY), (m * RasterStepXY))), k, 0, RasterMaxX / RasterStepXY], m, 0, RasterMaxY / RasterStepXY) → RasterPunkte
  7. Ellipse(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) → ellZK
  8. If(step < 4, -4, 5) → numberStone1
  9. If(step < 4, -6, 1) → numberStone2
  10. If(step < 4, 5, -4) → numberStone3
  11. If(step < 4, 3, -2) → numberStone4
  12. Sequence(IsInRegion[AllPStones(k), RegionZK(1)], k, 1, Length[AllPStones]) → StoneInRegion
  13. Sum(Sequence[If[StoneInRegion(k), AllNumbersStones(k), 0], k, 1, Length[AllNumbersStones]]) → actualTemperature
  14. Sequence(PointsThermoEnd(1) + (k * (0, Distance[PointsThermoEnd(1), PointsThermoEnd(2)] / (thermoEnd - thermoStart))), k, 0, thermoEnd - thermoStart, 1) → PointsThermo
  15. RemoveUndefined(Sequence[If[Mod[TemperatureList(k), thermoStepMark] ≟ 0, Segment[PointsThermo(k) + (((-segLengthThermo)) / 2, 0), PointsThermo(k) + (segLengthThermo / 2, 0)]], k, 1, Length[PointsThermo]]) → segMarkThermo
  16. RemoveUndefined(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]]) → CapThermo
  17. Text(((("\textsf{\bold{\(" * If[actualTemperature > 0, "+", ""]) * actualTemperature) * "\)}}"), PointsThermo(IndexOf[actualTemperature, TemperatureList]) + ((-6 / 5 * segLengthThermo), 0.05), false, true, 0, 0) → CapActualTemperature
  18. Sequence(((dimStoneA * cos(k°)), (dimStoneB * sin(k°))), k, 0, 360, 5) → PointStone
  19. Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone1 > 0, "+", numberStone1 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone1)), (abs(numberStone1) * "")]) * "}}}"), PStone1 + (0, 0.05), false, true, 0, 0) → txtStone1
  20. Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone2 > 0, "+", numberStone2 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone2)), (abs(numberStone2) * "")]) * "}}}"), PStone2 + (0, 0.05), false, true, 0, 0) → txtStone2
  21. Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone3 > 0, "+", numberStone3 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone3)), (abs(numberStone3) * "")]) * "}}}"), PStone3 + (0, 0.05), false, true, 0, 0) → txtStone3
  22. Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone4 > 0, "+", numberStone4 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone4)), (abs(numberStone4) * "")]) * "}}}"), PStone4 + (0, 0.05), false, true, 0, 0) → txtStone4
  23. Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone5 > 0, "+", numberStone5 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone5)), (abs(numberStone5) * "")]) * "}}}"), PStone5 + (0, 0.05), false, true, 0, 0) → txtStone5
  24. Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone6 > 0, "+", numberStone6 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone6)), (abs(numberStone6) * "")]) * "}}}"), PStone6 + (0, 0.05), false, true, 0, 0) → txtStone6
  25. Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone7 > 0, "+", numberStone7 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone7)), (abs(numberStone7) * "")]) * "}}}"), PStone7 + (0, 0.05), false, true, 0, 0) → txtStone7
  26. SelectedIndex(dropdown051) → index051
  27. SelectedIndex(dropdown052) → index052
  28. Textfield(input011) → InputBox011
  29. Textfield(input041) → InputBox041
  30. UnitOrthogonalVector(Segment[PointParkedStones(1), PointZKStones(1)]) → vBogenZK1
  31. UnitOrthogonalVector(Segment[PointZKStones(4), PointParkedStones(2)]) → vBogenZK2
  32. CircleArc(Midpoint[Vertex[randStoneParked1(1), 18], Vertex[randStoneZK1(1), 18]] + (0.5 * vBogenZK1), Vertex[randStoneParked1(1), 18], Vertex[randStoneZK1(1), 18]) → bogenZK1
  33. CircleArc(Midpoint[Vertex[randStoneZK2(1), 54], Vertex[randStoneParked2(1), 54]] + (0.5 * vBogenZK2), Vertex[randStoneZK2(1), 54], Vertex[randStoneParked2(1), 54]) → bogenZK2
  34. Segment(Point[bogenZK1, 0], Point[bogenZK1, 0] + (0.01 * UnitVector[Tangent[Point[bogenZK1, 0], bogenZK1]])) → arrowBogenParked1
  35. Segment(Point[bogenZK2, 1], Point[bogenZK2, 1] - (0.01 * UnitVector[Tangent[Point[bogenZK2, 1], bogenZK2]])) → arrowBogenParked2
  36. Segment(Point[bogenZK1, 1], Point[bogenZK1, 1] - (0.01 * UnitVector[Tangent[Point[bogenZK1, 1], bogenZK1]])) → arrowBogenZK1
  37. Segment(Point[bogenZK2, 0], Point[bogenZK2, 0] + (0.01 * UnitVector[Tangent[Point[bogenZK2, 0], bogenZK2]])) → arrowBogenZK2
  38. Text((((("\textsf{\bold{" * If[actualTemperature > 0, "+", ""]) * "\(") * actualTemperature) * "\) °C}}"), PosDigitaleAnzeige + (0, 0.05), false, true, 0, 0) → txtDigitaleAnzeige
  39. If(step < 4, 0.5, 0.8) → disCalc
  40. Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone4 > 0, "+", numberStone4 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone4)), (abs(numberStone4) * "")]) * "}}}"), PosCalc(3) + (0, 0.05), false, true, 0, 0) → txtCalc3
  41. Text((("\textsf{\bold{\textcolor{white}{" * If[showMinusStone, (If[numberStone3 > 0, "+", numberStone3 ≟ 0, "\phantom{+}", "\(-\)"] * abs(numberStone3)), (abs(numberStone3) * "")]) * "}}}"), PosCalc(5) + (0, 0.05), false, true, 0, 0) → txtCalc5
  42. Text("\textsf{{\textcolor{black}{+}}}", PosCalc(2) + (0, 0.05), false, true, 0, 0) → txtCalc2
  43. Text("\textsf{{\textcolor{black}{\(-\)}}}", PosCalc(4) + (0, 0.05), false, true, 0, 0) → txtCalc4
  44. Text("\textsf{{\textcolor{black}{=}}}", PosCalc(6) + (0, 0.05), false, true, 0, 0) → txtCalc6
  45. Segment(Corner[txtE021, 3], Corner[txtE021, 3] + (0.8 * Vector[Corner[txtE021, 3], PosCalc(1)])) → arrowE021
  46. Segment(Corner[txtE022, 4] + (1.5, 0), Corner[txtE022, 4] + (1.5, 0) + (0.85 * Vector[Corner[txtE022, 4] + (1.5, 0), PosCalc(2)])) → arrowE022
  47. Segment(Corner[txtE023, 4] + (1.5, 0), Corner[txtE023, 4] + (1.5, 0) + (0.8 * Vector[Corner[txtE023, 4] + (1.5, 0), PosCalc(4)])) → arrowE023
  48. Segment(Corner[txtE031, 4] + (2, 0), Corner[txtE031, 4] + (2, 0) + (0.85 * Vector[Corner[txtE031, 4] + (2, 0), Pos03(1)])) → arrowE031
  49. Segment(Corner[txtE032, 4] + (1, 0), Corner[txtE032, 4] + (1, 0) + (0.85 * Vector[Corner[txtE032, 4] + (1, 0), Pos03(2)])) → arrowE032
  50. Segment(Corner[txtE032, 4] + (2, 0), Corner[txtE032, 4] + (2, 0) + (0.85 * Vector[Corner[txtE032, 4] + (2, 0), Pos03(3)])) → arrowE033
  51. RemoveUndefined({RO1, If[optionsRight > 1, RO2], If[optionsRight > 2, RO3], If[optionsRight > 3, RO4], If[optionsRight > 4, RO5]}) → ListeRichtig
  52. RemoveUndefined({If[optionsTotal - optionsRight > 0, FO1], If[optionsTotal - optionsRight > 1, FO2], If[optionsTotal - optionsRight > 2, FO3], If[optionsTotal - optionsRight > 3, FO4]}) → ListeFalsch
  53. Shuffle(Join[{ListeRichtig, ListeFalsch}]) → Reihenfolge, {"\textsf{+2 + \(-2\) \(-\) \(-4\) =}", "\textsf{(+2) (\(-2\)) (\(-4\)) =}", "\textsf{(+2) + (\(-2\)) \(-\) (\(-4\)) =}"}
  54. Text(Reihenfolge(1), Corner[4] + (pixMat * (PosStart + (36, 16) + (((1 - 1) * disPixX), ((1 - 1) * disPixY)))), false, true, 1, 0) → txtO1
  55. Text(Reihenfolge(2), Corner[4] + (pixMat * (PosStart + (36, 16) + (((2 - 1) * disPixX), ((2 - 1) * disPixY)))), false, true, 1, 0) → txtO2
  56. Text(Reihenfolge(3), Corner[4] + (pixMat * (PosStart + (36, 16) + (((3 - 1) * disPixX), ((3 - 1) * disPixY)))), false, true, 1, 0) → txtO3
  57. Text(Reihenfolge(4), Corner[4] + (pixMat * (PosStart + (36, 18) + (((4 - 1) * disPixX), ((4 - 1) * disPixY)))), false, true, 1, 0) → txtO4
  58. If(correctMC, "\textsf{✓ Richtig}", (¬correctMC) ∧ (txtO1 ∈ ListeRichtig ∧ option1 ∨ txtO2 ∈ ListeRichtig ∧ option2 ∨ txtO3 ∈ ListeRichtig ∧ option3 ∨ txtO4 ∈ ListeRichtig ∧ option4), "\textsf{✘ Teilweise richtig}", "\textsf{✘ Falsch}") → txtMCFeedback
  59. Max(x({Corner[txtO1, 2], Corner[txtO2, 2], Corner[txtO3, 2], Corner[txtO4, 2]})) → xMax
  60. Text(If[txtO1 ∈ ListeRichtig, txtTrue, txtFalse], (If[disPixX ≟ 0, xMax, x(Corner[txtO1, 2])], y(Midpoint[Corner[txtO1, 2], Corner[txtO1, 3]])) + (0.35, 0.125), false, true, 1, 0) → txtMCFB1
  61. Text(If[txtO2 ∈ ListeRichtig, txtTrue, txtFalse], (If[disPixX ≟ 0, xMax, x(Corner[txtO2, 2])], y(Midpoint[Corner[txtO2, 2], Corner[txtO2, 3]])) + (0.35, 0.125), false, true, 1, 0) → txtMCFB2
  62. Text(If[txtO3 ∈ ListeRichtig, txtTrue, txtFalse], (If[disPixX ≟ 0, xMax, x(Corner[txtO3, 2])], y(Midpoint[Corner[txtO3, 2], Corner[txtO3, 3]])) + (0.35, 0.125), false, true, 1, 0) → txtMCFB3
  63. Text(If[txtO4 ∈ ListeRichtig, txtTrue, txtFalse], (If[disPixX ≟ 0, xMax, x(Corner[txtO4, 2])], y(Midpoint[Corner[txtO4, 2], Corner[txtO4, 3]])) + (0.35, 0.125), false, true, 1, 0) → txtMCFB4
  64. If(step ≟ 1, correct011, step ≟ 6, correctMC, true, step ≟ 2, anim02 ≟ 2, step ≟ 3, anim03 ≟ 1, step ≟ 4, correct041, step ≟ 5, correctdd051 ∧ correctdd052) → clickableBtnNext
  65. If(step ≟ 2, anim02 ≟ 0 ∨ anim02 ≟ 2, step ≟ 3, anim03 ≟ 0 ∨ anim03 ≟ 1, true) → clickableBtnBack
  66. Join({Corner[txt072, 1] + (0, -1.5) + {(2.15, 1.78), (2.87, 1.78), (3.65, 1.78)}, Corner[txt073, 1] + (0, -1.5) + {(2.15, 1.78), (2.87, 1.78), (3.65, 1.78)}}) → Pos07
  67. Segment(Corner[txtE071, 3], Corner[txtE071, 3] + (0.8 * Vector[Corner[txtE071, 3], Pos07(1)])) → arrowE071
  68. Segment(Corner[txtE073, 4], Corner[txtE073, 4] + (0.8 * Vector[Corner[txtE073, 4], Pos07(3)])) → arrowE073
  69. Segment(Corner[txtE074, 3], Corner[txtE074, 3] + (0.8 * Vector[Corner[txtE074, 3], Pos07(4)])) → arrowE074
  70. Segment(Corner[txtE076, 4], Corner[txtE076, 4] + (0.8 * Vector[Corner[txtE076, 4], Pos07(6)])) → arrowE076
  71. Segment(Midpoint[Corner[txtE072, 3], Corner[txtE072, 4]], Midpoint[Corner[txtE072, 3], Corner[txtE072, 4]] + (0.85 * Vector[Midpoint[Corner[txtE072, 3], Corner[txtE072, 4]], Pos07(2)])) → arrowE072
  72. Segment(Midpoint[Corner[txtE075, 3], Corner[txtE075, 4]], Midpoint[Corner[txtE075, 3], Corner[txtE075, 4]] + (0.85 * Vector[Midpoint[Corner[txtE075, 3], Corner[txtE075, 4]], Pos07(5)])) → arrowE075
  73. Text((((("\textsf{\bold{\textcolor{" * If[step < 4, "black", "black"]) * "}{") * If[showMinusStone, (If[actualTemperature > 0, "+", actualTemperature ≟ 0, "\phantom{+}", "\(-\)"] * abs(actualTemperature)), (abs(actualTemperature) * "")]) * "}}}"), PosCalc(1) + (0, 0.05), false, true, 0, 0) → txtCalc1