分段函数绘图
几何画板及绘图内容加载中,请稍等……
本范例演示如何使用 GeoGebra 绘制分段函数的图像。涉及的核心数学概念包括函数、分段函数、解析几何。作图要点包括使用 Random, RandomElement, Point, Ray, Segment, If 等命令和对象来创建随机点和射线,并通过条件语句绘制不同区间的函数图像。适合高中数学教学和函数图像绘制的学习。
GeoGebra 命令及参数
Random(-2, 2 + If[reset1, 0, 0]) → bRandomElement(KeepIf[x ≠ 0, Sequence[i, i, -3, 3 + If[reset1, 0, 0]]]) → aRandom(2, 7 + If[reset1, 0, 0]) → mPoint(xAxis) → ARay(A, (x(Corner[2]), 0)) → rAPoint(rA) → BRandomElement(KeepIf[(x ≠ 0) ∧ (x ≥ Max[xmin, ymin]) ∧ (x ≤ Min[xmax, ymax]), Sequence[i, i, (-abs((xmin * ymin))), abs((xmax * ymax)) + If[reset1, 0, 0]]]) → numbersectionexamRandomElement(KeepIf[(x ≠ 0) ∨ (x ≠ 1), Sequence[i, i, -7, 7 + If[reset1, 0, 0]]]) → nRandom(3, Min[abs(xmin), xmax] + If[reset1, 0, 0]) → cRay(B, (x(Corner[2]), 0)) → rBRandom(1, 2 + If[reset1, 0, 0]) → r1Random(xmin + 2, xmax - 3 + If[reset1, 0, 0]) → rn1Random(1, 2 + If[reset1, 0, 0]) → r2Random(1, 2 + If[reset1, 0, 0]) → r3Random(1, 2 + If[reset1, 0, 0]) → r4Random(rn1 + 1, xmax - 1 + If[reset1, 0, 0]) → rn2Random(1, 5 + If[reset1, 0, 0]) → rf1RandomElement(KeepIf[x ≠ rf1, Sequence[i, i, 1, 5 + If[reset1, 0, 0]]]) → rf2RandomElement(KeepIf[(x ≠ rf1) ∧ (x ≠ rf2), Sequence[i, i, 1, 5 + If[reset1, 0, 0]]]) → rf3Segment(A, B) → mdlRay(A, (x(Corner[1]), 0)) → lARay(B, (x(Corner[1]), 0)) → lBIf(rf1 ≟ 1, Element[listf, 1], If[rf1 ≟ 2, Element[listg, 1], If[rf1 ≟ 3, Element[listhp, 1], If[rf1 ≟ 4, Element[listhm, 1], Element[listk, 1]]]]) → myf1If(rf2 ≟ 1, Element[listf, 2], If[rf2 ≟ 2, Element[listg, 2], If[rf2 ≟ 3, Element[listhp, 2], If[rf2 ≟ 4, Element[listhm, 2], Element[listk, 2]]]]) → myf2Random(1, 5 + If[reset1, 0, 0]) → rf4RandomElement(KeepIf[(x ≠ rf1) ∧ (x ≠ rf3), Sequence[i, i, 1, 5 + If[reset1, 0, 0]]]) → rf5If(rf3 ≟ 1, Element[listf, 3], If[rf3 ≟ 2, Element[listg, 3], If[rf3 ≟ 3, Element[listhp, 3], If[rf3 ≟ 4, Element[listhm, 3], Element[listk, 3]]]]) → myf3If(rf4 ≟ 1, Element[listf, 4], If[rf4 ≟ 2, Element[listg, 4], If[rf4 ≟ 3, Element[listhp, 4], If[rf4 ≟ 4, Element[listhm, 4], Element[listk, 4]]]]) → myf4If(rf5 ≟ 1, Element[listf, 5], If[rf5 ≟ 2, Element[listg, 5], If[rf5 ≟ 3, Element[listhp, 5], If[rf5 ≟ 4, Element[listhm, 5], Element[listk, 5]]]]) → myf5Random(rn1 + 1, xmax - 1 + If[reset1, 0, 0]) → rn3