Walking on the Number Line
Loading the math board and drawing, please wait…
This example demonstrates the addition and subtraction of integers by having a character walk along a number line. Example expressions can be shown or hidden using checkboxes. Commands like Point, Vector, If, Segment, Polygon are used. Suitable for students from upper elementary to middle school.
GeoGebra Commands & Parameters
Point(xAxis) → APoint(xAxis) → BPoint(xAxis) → CVector(C, A) → uVector(C, B) → vIf(directionA ≟ 0, 1, 0) → DirectionPoint(xAxis) → OVector(O, P) → wPoint(xAxis) → QPoint(xAxis) → RVector(Q, R) → zVector(S_1, T_1) → eVector(T_1, U_1) → fVector(V_1, W_1) → kVector(Z_1, A_2) → lVector(B_2, C_2) → mVector(F_2, G_2) → nVector(H_2, I_2) → pVector(J_2, K_2) → qVector(L_2, M_2) → rVector(N_2, O_2) → sVector(P_2, Q_2) → tVector(R_2, S_2) → u_1Vector(T_2, U_2) → v_1Vector(V_2, W_2) → g_1Point(xAxis) → D_3Vector(Q_3, R_3) → gVector(S_3, T_3) → hVector(U_3, V_3) → iVector(W_3, Z_3) → jVector(A_4, B_4) → w_1Vector(C_4, D_4) → z_1Point(xAxis) → M_4Point(xAxis) → N_4Vector(M_4, N_4) → a_1Segment(U_4, U_4 + (0, 0.7)) → d_1Segment(U_4, U_4 + (0, 0.7)) → e_1Vector(WalkStart, WalkStop) → f_1Polygon(ExpressionBoxPt, ExpressionBoxPt + (12, 0), ExpressionBoxPt + (12, 2.7), ExpressionBoxPt + (0, 2.7)) → exprBox, exprBoxB, exprBoxSegR, exprBoxSegT, exprBoxSegLVector((0, 0.4), WalkStart + (0, -1 * 0.4)) → h_1Polygon(ResetPolyPt, ResetPolyPt + (2, 0), ResetPolyPt + (2, 1), ResetPolyPt + (0, 1)) → resetPoly, resetPolySegB, resetPolySegR, resetPolySegT, resetPolySegLPolygon(CharacterBoxPt, CharacterBoxPt + (6, 0), CharacterBoxPt + (6, 2.7), CharacterBoxPt + (0, 2.7)) → characterBox, charBoxSegB, charBoxSegR, charBoxSegT, charBoxSegLPolygon(HintBoxPt, HintBoxPt + (36, 0), HintBoxPt + (36, 4), HintBoxPt + (0, 4)) → hintBox, hintBoxSegB, hintBoxSegR, hintBoxSegT, hintBoxSegLSequence(Segment[(i, 0.14), (i, -1 * 0.14)], i, -15, 20, 1) → hashTopsPolygon((-15, -6.3), (20, -6.3), (20, -0.9), (-15, -0.9)) → solutionBox, solutionBoxB, solutionBoxR, solutionBoxT, solutionBoxL