math-exercises 3.0.148 → 3.0.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calculLitteral/inequations/inverseInequalityWithGraph.js +1 -1
- package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.js +2 -2
- package/lib/exercises/math/dataRepresentations/halfPieChartReading.js +2 -2
- package/lib/exercises/math/dataRepresentations/pieChartReading.js +2 -2
- package/lib/exercises/math/dataRepresentations/plausibleGraph.js +2 -2
- package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.js +2 -2
- package/lib/exercises/math/derivation/tangent/derivativeNumberOrImageReading.js +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +1 -1
- package/lib/exercises/math/functions/affines/interceptReading.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +1 -1
- package/lib/exercises/math/functions/basics/graphicEquation.js +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +1 -1
- package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -2
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +2 -2
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -2
- package/lib/exercises/math/functions/basics/valueTableFromGraph.js +1 -1
- package/lib/exercises/math/functions/variations/readExtremaOnGraph.js +1 -1
- package/lib/exercises/math/geometry/areas/calculateAreaFromCodedShape.js +2 -2
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVector.js +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.js +4 -4
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +4 -4
- package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +1 -1
- package/lib/exercises/math/geometry/lines/reductEquationReading.js +1 -1
- package/lib/exercises/math/geometry/optimisation/geometryExtremaReadingOnGraph.js +1 -1
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRectangle.js +4 -4
- package/lib/exercises/math/geometry/quadrilaterals/parallelogramRhombus.js +4 -4
- package/lib/exercises/math/geometry/thales/index.d.ts +2 -0
- package/lib/exercises/math/geometry/thales/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/index.js +2 -0
- package/lib/exercises/math/geometry/thales/thalesIsParallelFromAbstractFormula.js +1 -1
- package/lib/exercises/math/geometry/vectors/constructions/placePointFromPointAndVector.js +2 -2
- package/lib/exercises/math/geometry/vectors/parallelogram/parallelogramCriterion.js +4 -4
- package/lib/exercises/math/geometry/volumes/coneVolume.js +2 -2
- package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +8 -8
- package/lib/exercises/math/geometry/volumes/sphereVolume.js +1 -1
- package/lib/exercises/math/geometry/volumes/variableVolume.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +5 -5
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +5 -5
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +4 -4
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
- package/lib/exercises/math/scratch/index.d.ts +13 -0
- package/lib/exercises/math/scratch/index.d.ts.map +1 -1
- package/lib/exercises/math/scratch/index.js +14 -0
- package/lib/exercises/math/scratch/scratchCond1.d.ts +25 -0
- package/lib/exercises/math/scratch/scratchCond1.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchCond1.js +290 -0
- package/lib/exercises/math/scratch/scratchFunction1.d.ts +9 -0
- package/lib/exercises/math/scratch/scratchFunction1.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchFunction1.js +199 -0
- package/lib/exercises/math/scratch/scratchLoop1.d.ts +10 -0
- package/lib/exercises/math/scratch/scratchLoop1.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchLoop1.js +207 -0
- package/lib/exercises/math/scratch/scratchLoopCond1.d.ts +12 -0
- package/lib/exercises/math/scratch/scratchLoopCond1.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchLoopCond1.js +236 -0
- package/lib/exercises/math/scratch/scratchLoopCond2.d.ts +14 -0
- package/lib/exercises/math/scratch/scratchLoopCond2.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchLoopCond2.js +219 -0
- package/lib/exercises/math/scratch/scratchOperations1.d.ts +8 -0
- package/lib/exercises/math/scratch/scratchOperations1.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchOperations1.js +245 -0
- package/lib/exercises/math/scratch/scratchOperations2.d.ts +10 -0
- package/lib/exercises/math/scratch/scratchOperations2.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchOperations2.js +324 -0
- package/lib/exercises/math/scratch/scratchPrintXY.d.ts +9 -0
- package/lib/exercises/math/scratch/scratchPrintXY.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchPrintXY.js +194 -0
- package/lib/exercises/math/scratch/scratchStringLoop.d.ts +10 -0
- package/lib/exercises/math/scratch/scratchStringLoop.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchStringLoop.js +192 -0
- package/lib/exercises/math/scratch/scratchStringLoopCond.d.ts +12 -0
- package/lib/exercises/math/scratch/scratchStringLoopCond.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchStringLoopCond.js +270 -0
- package/lib/exercises/math/scratch/scratchStringLoopCond2.d.ts +12 -0
- package/lib/exercises/math/scratch/scratchStringLoopCond2.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchStringLoopCond2.js +273 -0
- package/lib/exercises/math/scratch/scratchStringLoopCond3.d.ts +12 -0
- package/lib/exercises/math/scratch/scratchStringLoopCond3.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchStringLoopCond3.js +275 -0
- package/lib/exercises/math/scratch/scratchSwapUsingTmp.d.ts +10 -0
- package/lib/exercises/math/scratch/scratchSwapUsingTmp.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchSwapUsingTmp.js +199 -0
- package/lib/exercises/math/scratch/scratchVarWaterfall.d.ts +10 -0
- package/lib/exercises/math/scratch/scratchVarWaterfall.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchVarWaterfall.js +371 -0
- package/lib/exercises/math/sequences/sequencePlot.js +1 -1
- package/lib/exercises/pc/mole/concentrationReading.js +1 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +5 -5
- package/lib/exercises/pc/sound/findPeriodFromGraph.js +2 -2
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +2 -2
- package/lib/geogebra/lagrange.js +1 -1
- package/lib/geogebra/spline.js +1 -1
- package/lib/index.d.ts +115 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/circle.d.ts.map +1 -1
- package/lib/math/geometry/circle.js +1 -1
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +1 -1
- package/lib/math/geometry/parabola.d.ts.map +1 -1
- package/lib/math/geometry/parabola.js +1 -1
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +1 -1
- package/lib/math/geometry/ray.d.ts.map +1 -1
- package/lib/math/geometry/ray.js +1 -1
- package/lib/math/geometry/segment.d.ts.map +1 -1
- package/lib/math/geometry/segment.js +1 -1
- package/lib/tree/nodes/node.d.ts +4 -2
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/node.js +2 -0
- package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
- package/lib/tree/nodes/nodeConstructor.js +4 -0
- package/package.json +1 -1
|
@@ -84,7 +84,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
84
84
|
const ggb = new GeogebraConstructor({
|
|
85
85
|
commands: [
|
|
86
86
|
`C = CircularSector((0,0), (1,0), (-1,0))`,
|
|
87
|
-
`SetFixed(C, true)`,
|
|
87
|
+
`SetFixed(C, true, false)`,
|
|
88
88
|
`SetLineThickness(C, 1)`,
|
|
89
89
|
// `SetVisibleInView(C, 1, false)`,
|
|
90
90
|
// ...pointsObj.flatMap((p) => p.toGGBCommand()),
|
|
@@ -92,7 +92,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
92
92
|
const midPoint = getMidPoint(points[(i + 1 + points.length) % points.length], points[i]);
|
|
93
93
|
return [
|
|
94
94
|
`C_${i} = CircularSector((0,0), ${pointsObj[(i + 1 + pointsObj.length) % pointsObj.length].toMathString()}, ${p.toMathString()})`,
|
|
95
|
-
`SetFixed(C_${i}, true)`,
|
|
95
|
+
`SetFixed(C_${i}, true, false)`,
|
|
96
96
|
`SetColor(C_${i}, "${colorWithOpacity(colors[i], 80)}")`,
|
|
97
97
|
`SetLineThickness(C_${i}, 0)`,
|
|
98
98
|
// `SetCaption(C_${i}, "$\\tiny \\text{${labels[i]}}$")`,
|
|
@@ -84,7 +84,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
84
84
|
const ggb = new GeogebraConstructor({
|
|
85
85
|
commands: [
|
|
86
86
|
`C = CircularSector((0,0), (1,0), (-1,0))`,
|
|
87
|
-
`SetFixed(C, true)`,
|
|
87
|
+
`SetFixed(C, true, false)`,
|
|
88
88
|
`SetLineThickness(C, 1)`,
|
|
89
89
|
// `SetVisibleInView(C, 1, false)`,
|
|
90
90
|
// ...pointsObj.flatMap((p) => p.toGGBCommand()),
|
|
@@ -92,7 +92,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
92
92
|
const midPoint = getMidPoint(points[(i + 1 + points.length) % points.length], points[i]);
|
|
93
93
|
return [
|
|
94
94
|
`C_${i} = CircularSector((0,0), ${pointsObj[(i + 1 + pointsObj.length) % pointsObj.length].toMathString()}, ${p.toMathString()})`,
|
|
95
|
-
`SetFixed(C_${i}, true)`,
|
|
95
|
+
`SetFixed(C_${i}, true, false)`,
|
|
96
96
|
`SetColor(C_${i}, "${colorWithOpacity(colors[i], 80)}")`,
|
|
97
97
|
`SetLineThickness(C_${i}, 0)`,
|
|
98
98
|
// `SetCaption(C_${i}, "$\\tiny \\text{${labels[i]}}$")`,
|
|
@@ -84,12 +84,12 @@ const getGGBOptions = (identifiers) => {
|
|
|
84
84
|
const ggb = new GeogebraConstructor({
|
|
85
85
|
commands: [
|
|
86
86
|
`C = Circle((0,0), 1)`,
|
|
87
|
-
`SetFixed(C, true)`,
|
|
87
|
+
`SetFixed(C, true, false)`,
|
|
88
88
|
`SetLineThickness(C, 1)`,
|
|
89
89
|
// ...pointsObj.flatMap((p) => p.toGGBCommand()),
|
|
90
90
|
...pointsObj.flatMap((p, i) => [
|
|
91
91
|
`C_${i} = CircularSector((0,0), ${pointsObj[(i + 1 + pointsObj.length) % pointsObj.length].toMathString()}, ${p.toMathString()})`,
|
|
92
|
-
`SetFixed(C_${i}, true)`,
|
|
92
|
+
`SetFixed(C_${i}, true, false)`,
|
|
93
93
|
`SetColor(C_${i}, "${colorWithOpacity(colors[i], 80)}")`,
|
|
94
94
|
`SetLineThickness(C_${i}, 0)`,
|
|
95
95
|
// `SetCaption(C_${i}, "$\\tiny \\text{${labels[i]}}$")`,
|
|
@@ -133,14 +133,14 @@ const getCorrectionGGBOptions = (identifiers) => {
|
|
|
133
133
|
const ggb = new GeogebraConstructor({
|
|
134
134
|
commands: [
|
|
135
135
|
`C = Circle((0,0), 1)`,
|
|
136
|
-
`SetFixed(C, true)`,
|
|
136
|
+
`SetFixed(C, true, false)`,
|
|
137
137
|
`SetLineThickness(C, 1)`,
|
|
138
138
|
// ...pointsObj.flatMap((p) => p.toGGBCommand()),
|
|
139
139
|
...pointsObj
|
|
140
140
|
.slice(0, -1)
|
|
141
141
|
.flatMap((_, i) => [
|
|
142
142
|
`C_${i} = CircularSector((0,0), ${pointsObj[i].toMathString()}, ${pointsObj[i + 1].toMathString()})`,
|
|
143
|
-
`SetFixed(C_${i}, true)`,
|
|
143
|
+
`SetFixed(C_${i}, true, false)`,
|
|
144
144
|
`SetColor(C_${i}, "${colorWithOpacity(colors[i], 80)}")`,
|
|
145
145
|
`SetLineThickness(C_${i}, 0)`,
|
|
146
146
|
`Text("$\\tiny \\text{${labels[i]}$", (${getMidPoint(anglesCumulated[i], anglesCumulated[i + 1]).join(",")}), true, true, 0, 0)`,
|
|
@@ -100,9 +100,9 @@ const getGGBOptions = (identifiers) => {
|
|
|
100
100
|
const commands = cloudPoints.points.flatMap((point, i) => {
|
|
101
101
|
return [
|
|
102
102
|
`${point.name}=Point({${point.getXnumber()},${point.getYnumber()}})`,
|
|
103
|
-
`SetFixed(${point.name},true)`,
|
|
103
|
+
`SetFixed(${point.name},true, false)`,
|
|
104
104
|
`Lbl_{${i}} = Text("\\tiny ${point.name}", (${point.x.toMathString()},${point.y.evaluate() + 0.7}), true, true, 0, 0)`,
|
|
105
|
-
`SetFixed(Lbl_{${i}},true)`,
|
|
105
|
+
`SetFixed(Lbl_{${i}},true, false)`,
|
|
106
106
|
];
|
|
107
107
|
});
|
|
108
108
|
const ggb = new GeogebraConstructor({
|
|
@@ -57,7 +57,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
57
57
|
`g(x) = (${penteString}) * x + (${originString})`,
|
|
58
58
|
`SetColor(g, "${orange}")`,
|
|
59
59
|
`A = (${xA},${yA})`,
|
|
60
|
-
"SetFixed(A, true)",
|
|
60
|
+
"SetFixed(A, true, false)",
|
|
61
61
|
"SetPointStyle(A, 1)",
|
|
62
62
|
];
|
|
63
63
|
const xMin = Math.min(xA, xB);
|
|
@@ -52,7 +52,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
52
52
|
`g(x) = (${penteString}) * x + (${originString})`,
|
|
53
53
|
`SetColor(g, "${orange}")`,
|
|
54
54
|
`A = (${xA},${yA})`,
|
|
55
|
-
"SetFixed(A, true)",
|
|
55
|
+
"SetFixed(A, true, false)",
|
|
56
56
|
"SetPointStyle(A, 1)",
|
|
57
57
|
];
|
|
58
58
|
const xMin = Math.min(xA, xB);
|
|
@@ -118,7 +118,7 @@ const getGGBOptions = ({ trinomCoeffs, xA, yA, }) => {
|
|
|
118
118
|
label: "$\\mathcal C_f$",
|
|
119
119
|
}),
|
|
120
120
|
`A = (${xA},${yA})`,
|
|
121
|
-
"SetFixed(A, true)",
|
|
121
|
+
"SetFixed(A, true, false)",
|
|
122
122
|
"SetPointStyle(A, 1)",
|
|
123
123
|
`g(x) = Tangent(f,A)`,
|
|
124
124
|
`SetColor(g, "${orange}")`,
|
|
@@ -35,7 +35,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
35
35
|
const commands = [
|
|
36
36
|
`l = Line[(0, ${b}), (${secondPoint[0]}, ${secondPoint[1]})]`,
|
|
37
37
|
`SetColor(l, "${randomColor()}")`,
|
|
38
|
-
"SetFixed(l, true)",
|
|
38
|
+
"SetFixed(l, true, false)",
|
|
39
39
|
];
|
|
40
40
|
const ggb = new GeogebraConstructor({
|
|
41
41
|
commands,
|
|
@@ -27,7 +27,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
27
27
|
const commands = [
|
|
28
28
|
`l = Line((0, ${b}), (${secondPoint[0]}, ${secondPoint[1]}))`,
|
|
29
29
|
`SetColor(l, "${randomColor()}")`,
|
|
30
|
-
"SetFixed(l, true)",
|
|
30
|
+
"SetFixed(l, true, false)",
|
|
31
31
|
];
|
|
32
32
|
const xMin = Math.min(0, secondPoint[0]);
|
|
33
33
|
const xMax = Math.max(0, secondPoint[0]);
|
|
@@ -47,7 +47,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
47
47
|
const yMax = Math.max(yA, yB);
|
|
48
48
|
const commands = [
|
|
49
49
|
`L = Line((${xA}, ${yA}), (${xB}, ${yB}))`,
|
|
50
|
-
"SetFixed(L, true)",
|
|
50
|
+
"SetFixed(L, true, false)",
|
|
51
51
|
`SetColor(L, "${randomColor()}")`,
|
|
52
52
|
];
|
|
53
53
|
const ggb = new GeogebraConstructor({
|
|
@@ -52,7 +52,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
52
52
|
`S = Spline(${splinePoints
|
|
53
53
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
54
54
|
.join(",")})`,
|
|
55
|
-
"SetFixed(S, true)",
|
|
55
|
+
"SetFixed(S, true, false)",
|
|
56
56
|
`SetColor(S, "${randomColor()}")`,
|
|
57
57
|
];
|
|
58
58
|
const ggb = new GeogebraConstructor({
|
|
@@ -33,7 +33,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
33
33
|
`S =Spline(${identifiers.splinePoints
|
|
34
34
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
35
35
|
.join(",")})`,
|
|
36
|
-
"SetFixed(S, true)",
|
|
36
|
+
"SetFixed(S, true, false)",
|
|
37
37
|
`SetColor(S, "${randomColor()}")`,
|
|
38
38
|
];
|
|
39
39
|
const ggb = new GeogebraConstructor({ commands });
|
|
@@ -75,7 +75,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
75
75
|
`S = Spline(${allPoints
|
|
76
76
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
77
77
|
.join(",")})`,
|
|
78
|
-
"SetFixed(S, true)",
|
|
78
|
+
"SetFixed(S, true, false)",
|
|
79
79
|
`SetColor(S, "${randomColor()}")`,
|
|
80
80
|
`SetCaption(S, "$f$")`,
|
|
81
81
|
`ShowLabel(S, true)`,
|
|
@@ -100,7 +100,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
100
100
|
`P = Polynomial(${allPoints
|
|
101
101
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
102
102
|
.join(",")})`,
|
|
103
|
-
"SetFixed(P, true)",
|
|
103
|
+
"SetFixed(P, true, false)",
|
|
104
104
|
`SetColor(P, "${randomColor()}")`,
|
|
105
105
|
`SetCaption(P, "$f$")`,
|
|
106
106
|
`ShowLabel(P, true)`,
|
|
@@ -48,14 +48,14 @@ const getGGBOptions = (identifiers) => {
|
|
|
48
48
|
`S = Spline(${fSplinePoints
|
|
49
49
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
50
50
|
.join(",")})`,
|
|
51
|
-
"SetFixed(S, true)",
|
|
51
|
+
"SetFixed(S, true, false)",
|
|
52
52
|
`SetColor(S, "${fColor}")`,
|
|
53
53
|
`SetCaption(S, "$f$")`,
|
|
54
54
|
`ShowLabel(S, true)`,
|
|
55
55
|
`T = Spline(${gSplinePoints
|
|
56
56
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
57
57
|
.join(",")})`,
|
|
58
|
-
"SetFixed(T, true)",
|
|
58
|
+
"SetFixed(T, true, false)",
|
|
59
59
|
`SetColor(T, "${gColor}")`,
|
|
60
60
|
`SetCaption(T, "$g$")`,
|
|
61
61
|
`ShowLabel(T, true)`,
|
|
@@ -43,14 +43,14 @@ const getGGBOptions = (identifiers) => {
|
|
|
43
43
|
`S = Spline(${fSplinePoints
|
|
44
44
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
45
45
|
.join(",")})`,
|
|
46
|
-
"SetFixed(S, true)",
|
|
46
|
+
"SetFixed(S, true, false)",
|
|
47
47
|
`SetColor(S, "${fColor}")`,
|
|
48
48
|
`SetCaption(S, "$f$")`,
|
|
49
49
|
`ShowLabel(S, true)`,
|
|
50
50
|
`T = Spline(${gSplinePoints
|
|
51
51
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
52
52
|
.join(",")})`,
|
|
53
|
-
"SetFixed(T, true)",
|
|
53
|
+
"SetFixed(T, true, false)",
|
|
54
54
|
`SetColor(T, "${gColor}")`,
|
|
55
55
|
`SetCaption(T, "$g$")`,
|
|
56
56
|
`ShowLabel(T, true)`,
|
|
@@ -76,7 +76,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
76
76
|
`E = (${width / 2},${height})`,
|
|
77
77
|
...["A", "B", "C", "D", "E"].flatMap((e) => [
|
|
78
78
|
`SetVisibleInView(${e},1, false)`,
|
|
79
|
-
`SetFixed(${e}, true)`,
|
|
79
|
+
`SetFixed(${e}, true, false)`,
|
|
80
80
|
]),
|
|
81
81
|
`Segment(E, C)`,
|
|
82
82
|
`Segment(D, C)`,
|
|
@@ -91,7 +91,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
91
91
|
`c = Angle(A,D,C)`,
|
|
92
92
|
`ShowLabel(c, false)`,
|
|
93
93
|
`P = Polygon(B,A,E,C)`,
|
|
94
|
-
`SetFixed(P, true)`,
|
|
94
|
+
`SetFixed(P, true, false)`,
|
|
95
95
|
`Text("$\\scriptsize B$", (0, -0.1*${height}), true, true, 0, 0)`,
|
|
96
96
|
`Text("$\\scriptsize C$", (${width}, -0.1*${height}), true, true, 0, 0)`,
|
|
97
97
|
`Text("$\\scriptsize D$", (${width}, ${height}+0.3+${Math.min(1, 0.1 * height)}), true, true, 0, 0)`,
|
|
@@ -77,7 +77,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
77
77
|
`d = Line((${aX},${aY}),(${bX},${bY}))`,
|
|
78
78
|
`SetCaption(d, "$d$")`,
|
|
79
79
|
`ShowLabel(d,true)`,
|
|
80
|
-
`SetFixed(d,true)`,
|
|
80
|
+
`SetFixed(d,true, false)`,
|
|
81
81
|
];
|
|
82
82
|
const ggb = new GeogebraConstructor({ commands });
|
|
83
83
|
return ggb.getOptions({
|
|
@@ -45,7 +45,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
45
45
|
const commands = [
|
|
46
46
|
`line = Line((${x1}, ${y1}), (${x2}, ${y2}))`,
|
|
47
47
|
`SetColor(line, "${randomColor()}")`,
|
|
48
|
-
`SetFixed(line, true)`,
|
|
48
|
+
`SetFixed(line, true, false)`,
|
|
49
49
|
];
|
|
50
50
|
const xMin = Math.min(x1, x2);
|
|
51
51
|
const yMin = Math.min(y1, y2);
|
|
@@ -19,19 +19,19 @@ const getGGBOptions = (identifiers) => {
|
|
|
19
19
|
`ShowLabel(A, true)`,
|
|
20
20
|
"SetPointStyle(A, 1)",
|
|
21
21
|
`SetPointSize(A, 4)`,
|
|
22
|
-
`SetFixed(A, true)`,
|
|
22
|
+
`SetFixed(A, true, false)`,
|
|
23
23
|
"O = (0,0)",
|
|
24
|
-
`SetFixed(O, true)`,
|
|
24
|
+
`SetFixed(O, true, false)`,
|
|
25
25
|
`SetCaption(O, "0")`,
|
|
26
26
|
`ShowLabel(O, true)`,
|
|
27
27
|
`SetPointSize(O, 4)`,
|
|
28
28
|
"I = (1,0)",
|
|
29
|
-
`SetFixed(I, true)`,
|
|
29
|
+
`SetFixed(I, true, false)`,
|
|
30
30
|
`SetCaption(I, "1")`,
|
|
31
31
|
`ShowLabel(I, true)`,
|
|
32
32
|
`SetPointSize(I, 4)`,
|
|
33
33
|
"J = (0,1)",
|
|
34
|
-
`SetFixed(J, true)`,
|
|
34
|
+
`SetFixed(J, true, false)`,
|
|
35
35
|
`ShowLabel(J, true)`,
|
|
36
36
|
`SetCaption(J, "1")`,
|
|
37
37
|
`SetPointSize(J, 4)`,
|
|
@@ -28,17 +28,17 @@ const getGGBOptions = (identifiers) => {
|
|
|
28
28
|
// `SetPointStyle(A, 0)`,
|
|
29
29
|
`SetPointSize(A, 4)`,
|
|
30
30
|
"SetPointStyle(A, 1)",
|
|
31
|
-
`SetFixed(A, true)`,
|
|
31
|
+
`SetFixed(A, true, false)`,
|
|
32
32
|
"O = (0,0)",
|
|
33
|
-
`SetFixed(O, true)`,
|
|
33
|
+
`SetFixed(O, true, false)`,
|
|
34
34
|
`ShowLabel(O, true)`,
|
|
35
35
|
`SetPointSize(O, 4)`,
|
|
36
36
|
"I = (1,0)",
|
|
37
|
-
`SetFixed(I, true)`,
|
|
37
|
+
`SetFixed(I, true, false)`,
|
|
38
38
|
`ShowLabel(I, true)`,
|
|
39
39
|
`SetPointSize(I, 4)`,
|
|
40
40
|
"J = (0,1)",
|
|
41
|
-
`SetFixed(J, true)`,
|
|
41
|
+
`SetFixed(J, true, false)`,
|
|
42
42
|
`ShowLabel(J, true)`,
|
|
43
43
|
`SetPointSize(J, 4)`,
|
|
44
44
|
];
|
|
@@ -72,7 +72,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
72
72
|
const commands = [
|
|
73
73
|
`l = Line[(0, ${b}), (${secondPoint[0]}, ${secondPoint[1]})]`,
|
|
74
74
|
`SetColor(l, "${randomColor()}")`,
|
|
75
|
-
"SetFixed(l, true)",
|
|
75
|
+
"SetFixed(l, true, false)",
|
|
76
76
|
];
|
|
77
77
|
const ggb = new GeogebraConstructor({
|
|
78
78
|
commands,
|
|
@@ -71,7 +71,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
71
71
|
const ggb = new GeogebraConstructor({
|
|
72
72
|
commands: [
|
|
73
73
|
`A = Function(x(${round(perimeter / 2, 2)}-x), 0, ${perimeter / 2})`,
|
|
74
|
-
`SetFixed(A, true)`,
|
|
74
|
+
`SetFixed(A, true, false)`,
|
|
75
75
|
`SetColor(A, "${blueDark}")`,
|
|
76
76
|
`SetCaption(A, "A(x)")`,
|
|
77
77
|
`ShowLabel(A, true)`,
|
|
@@ -58,16 +58,16 @@ const getGGBOptions = (identifiers) => {
|
|
|
58
58
|
const commands = [
|
|
59
59
|
"B = (-2, -2)",
|
|
60
60
|
`ShowLabel(B, true)`,
|
|
61
|
-
`SetFixed(B, true)`,
|
|
61
|
+
`SetFixed(B, true, false)`,
|
|
62
62
|
"A = (-2, 2)",
|
|
63
63
|
`ShowLabel(A, true)`,
|
|
64
|
-
`SetFixed(A, true)`,
|
|
64
|
+
`SetFixed(A, true, false)`,
|
|
65
65
|
"D = (1, 2)",
|
|
66
66
|
`ShowLabel(D, true)`,
|
|
67
|
-
`SetFixed(D, true)`,
|
|
67
|
+
`SetFixed(D, true, false)`,
|
|
68
68
|
"C= (1, -2)",
|
|
69
69
|
`ShowLabel(C, true)`,
|
|
70
|
-
`SetFixed(C, true)`,
|
|
70
|
+
`SetFixed(C, true, false)`,
|
|
71
71
|
"SA = Segment(A, B)",
|
|
72
72
|
"SB = Segment(B, C)",
|
|
73
73
|
"SC = Segment(C, D)",
|
|
@@ -58,16 +58,16 @@ const getGGBOptions = (identifiers) => {
|
|
|
58
58
|
const commands = [
|
|
59
59
|
"C = (-6, -6)",
|
|
60
60
|
`ShowLabel(C, true)`,
|
|
61
|
-
`SetFixed(C, true)`,
|
|
61
|
+
`SetFixed(C, true, false)`,
|
|
62
62
|
"D = (-3, 3)",
|
|
63
63
|
`ShowLabel(D, true)`,
|
|
64
|
-
`SetFixed(D, true)`,
|
|
64
|
+
`SetFixed(D, true, false)`,
|
|
65
65
|
"A = (6, 6)",
|
|
66
66
|
`ShowLabel(A, true)`,
|
|
67
|
-
`SetFixed(A, true)`,
|
|
67
|
+
`SetFixed(A, true, false)`,
|
|
68
68
|
"B = (3, -3)",
|
|
69
69
|
`ShowLabel(B, true)`,
|
|
70
|
-
`SetFixed(B, true)`,
|
|
70
|
+
`SetFixed(B, true, false)`,
|
|
71
71
|
"SA = Segment(A, B)",
|
|
72
72
|
"SB = Segment(B, C)",
|
|
73
73
|
"SC = Segment(C, D)",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC"}
|
|
@@ -612,7 +612,7 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
|
612
612
|
answer: getAnswer(identifiers, opts),
|
|
613
613
|
instruction: getInstruction(identifiers, opts),
|
|
614
614
|
keys: getKeys(identifiers, opts),
|
|
615
|
-
answerFormat: "
|
|
615
|
+
answerFormat: "raw",
|
|
616
616
|
identifiers,
|
|
617
617
|
hint: getHint(identifiers),
|
|
618
618
|
correction: getCorrection(identifiers),
|
|
@@ -62,7 +62,7 @@ const getGGBAnswer = (identifiers) => {
|
|
|
62
62
|
isStartingPointAsked
|
|
63
63
|
? `a = Vector(${solutionPoint.toMathString()},${point.toMathString()})`
|
|
64
64
|
: `a = Vector(${point.toMathString()}, ${solutionPoint.toMathString()})`,
|
|
65
|
-
`SetFixed(a, true)`,
|
|
65
|
+
`SetFixed(a, true, false)`,
|
|
66
66
|
];
|
|
67
67
|
};
|
|
68
68
|
const getStudentGGBOptions = (identifiers) => {
|
|
@@ -95,7 +95,7 @@ const getStudentGGBOptions = (identifiers) => {
|
|
|
95
95
|
`${vector.name}=Vector(${vectorStartPoint.toMathString()},${vectorEndPoint.toMathString()})`,
|
|
96
96
|
`SetCaption(${vector.name},"$${vector.toTex()}$")`,
|
|
97
97
|
`ShowLabel(${vector.name},true)`,
|
|
98
|
-
`SetFixed(${vector.name},true)`,
|
|
98
|
+
`SetFixed(${vector.name},true, false)`,
|
|
99
99
|
],
|
|
100
100
|
customToolBar: toolBarConstructor({
|
|
101
101
|
point: true,
|
|
@@ -103,16 +103,16 @@ const getCorrectionGGBOptions = (identifiers) => {
|
|
|
103
103
|
commands: [
|
|
104
104
|
`${pointNames[0]} = (-1, 0)`,
|
|
105
105
|
`ShowLabel(${pointNames[0]}, true)`,
|
|
106
|
-
`SetFixed(${pointNames[0]}, true)`,
|
|
106
|
+
`SetFixed(${pointNames[0]}, true, false)`,
|
|
107
107
|
`${pointNames[1]} = (1,2)`,
|
|
108
108
|
`ShowLabel(${pointNames[1]}, true)`,
|
|
109
|
-
`SetFixed(${pointNames[1]}, true)`,
|
|
109
|
+
`SetFixed(${pointNames[1]}, true, false)`,
|
|
110
110
|
`${pointNames[2]} = (2, 0)`,
|
|
111
111
|
`ShowLabel(${pointNames[2]}, true)`,
|
|
112
|
-
`SetFixed(${pointNames[2]}, true)`,
|
|
112
|
+
`SetFixed(${pointNames[2]}, true, false)`,
|
|
113
113
|
`${pointNames[3]} = (0, -2)`,
|
|
114
114
|
`ShowLabel(${pointNames[3]}, true)`,
|
|
115
|
-
`SetFixed(${pointNames[3]}, true)`,
|
|
115
|
+
`SetFixed(${pointNames[3]}, true, false)`,
|
|
116
116
|
`Polygon(${pointNames.join(",")})`,
|
|
117
117
|
`Vector(${pointNames[0]}, ${pointNames[1]})`,
|
|
118
118
|
`Vector(${pointNames[3]}, ${pointNames[2]})`,
|
|
@@ -76,8 +76,8 @@ const getGGBOptions = (identifiers) => {
|
|
|
76
76
|
const commands = [
|
|
77
77
|
`A = (0, 0, 0)`,
|
|
78
78
|
`B = (0, 0, ${height})`,
|
|
79
|
-
`SetFixed(A, true)`,
|
|
80
|
-
`SetFixed(B, true)`,
|
|
79
|
+
`SetFixed(A, true, false)`,
|
|
80
|
+
`SetFixed(B, true, false)`,
|
|
81
81
|
`SetVisibleInView(A, -1, false)`,
|
|
82
82
|
`SetVisibleInView(B, -1, false)`,
|
|
83
83
|
`Cone(A, B, ${radius})`,
|
|
@@ -65,14 +65,14 @@ const getGGBOptions = (identifiers) => {
|
|
|
65
65
|
`ShowLabel(F, true)`,
|
|
66
66
|
`ShowLabel(G, true)`,
|
|
67
67
|
`ShowLabel(H, true)`,
|
|
68
|
-
`SetFixed(A, true)`,
|
|
69
|
-
`SetFixed(B, true)`,
|
|
70
|
-
`SetFixed(C, true)`,
|
|
71
|
-
`SetFixed(D, true)`,
|
|
72
|
-
`SetFixed(E, true)`,
|
|
73
|
-
`SetFixed(F, true)`,
|
|
74
|
-
`SetFixed(G, true)`,
|
|
75
|
-
`SetFixed(H, true)`,
|
|
68
|
+
`SetFixed(A, true, false)`,
|
|
69
|
+
`SetFixed(B, true, false)`,
|
|
70
|
+
`SetFixed(C, true, false)`,
|
|
71
|
+
`SetFixed(D, true, false)`,
|
|
72
|
+
`SetFixed(E, true, false)`,
|
|
73
|
+
`SetFixed(F, true, false)`,
|
|
74
|
+
`SetFixed(G, true, false)`,
|
|
75
|
+
`SetFixed(H, true, false)`,
|
|
76
76
|
];
|
|
77
77
|
const ggb = new GeogebraConstructor({
|
|
78
78
|
commands,
|
|
@@ -76,7 +76,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
76
76
|
`J = (${width}, ${subHeight})`,
|
|
77
77
|
`K = J + 0.5*${depth}(cos(45°), sin(45°))`,
|
|
78
78
|
`L = I + 0.5*${depth}(cos(45°), sin(45°))`,
|
|
79
|
-
...["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"].flatMap((v) => [`SetFixed(${v}, true)`, `SetVisibleInView(${v},1, false)`]),
|
|
79
|
+
...["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"].flatMap((v) => [`SetFixed(${v}, true, false)`, `SetVisibleInView(${v},1, false)`]),
|
|
80
80
|
// `SetVisibleInView(A,1,true)`,
|
|
81
81
|
// `SetVisibleInView(B,1,true)`,
|
|
82
82
|
// `SetVisibleInView(F,1,true)`,
|
|
@@ -48,15 +48,15 @@ const getGGBOptions = (identifiers) => {
|
|
|
48
48
|
`ShowLabel(B,true)`,
|
|
49
49
|
`ShowLabel(C,true)`,
|
|
50
50
|
`ShowLabel(D,true)`,
|
|
51
|
-
`SetFixed(A,true)`,
|
|
52
|
-
`SetFixed(B,true)`,
|
|
53
|
-
`SetFixed(C,true)`,
|
|
54
|
-
`SetFixed(D,true)`,
|
|
51
|
+
`SetFixed(A,true, false)`,
|
|
52
|
+
`SetFixed(B,true, false)`,
|
|
53
|
+
`SetFixed(C,true, false)`,
|
|
54
|
+
`SetFixed(D,true, false)`,
|
|
55
55
|
`Poly=Polygon(A,B,C,D)`,
|
|
56
56
|
];
|
|
57
57
|
commands = commands.concat([
|
|
58
58
|
`H=Point({${sideSizes[0] / 2},${sideSizes[1] / 2},${h}})`,
|
|
59
|
-
`SetFixed(H,true)`,
|
|
59
|
+
`SetFixed(H,true, false)`,
|
|
60
60
|
`ShowLabel(H,true)`,
|
|
61
61
|
`Pyra=Pyramid(Poly,H)`,
|
|
62
62
|
]);
|
|
@@ -90,9 +90,9 @@ const getGGBOptions = (identifiers) => {
|
|
|
90
90
|
`ShowLabel(A,True)`,
|
|
91
91
|
`ShowLabel(B,True)`,
|
|
92
92
|
`ShowLabel(C,True)`,
|
|
93
|
-
`SetFixed(A,true)`,
|
|
94
|
-
`SetFixed(B,true)`,
|
|
95
|
-
`SetFixed(C,true)`,
|
|
93
|
+
`SetFixed(A,true, false)`,
|
|
94
|
+
`SetFixed(B,true, false)`,
|
|
95
|
+
`SetFixed(C,true, false)`,
|
|
96
96
|
`Poly=Polygon(A,B,C)`,
|
|
97
97
|
];
|
|
98
98
|
commands = commands.concat([
|
|
@@ -100,8 +100,8 @@ const getGGBOptions = (identifiers) => {
|
|
|
100
100
|
`D=Point({0,0,0})`,
|
|
101
101
|
`ShowLabel(D,true)`,
|
|
102
102
|
`ShowLabel(H,true)`,
|
|
103
|
-
`SetFixed(H,true)`,
|
|
104
|
-
`SetFixed(D,true)`,
|
|
103
|
+
`SetFixed(H,true, false)`,
|
|
104
|
+
`SetFixed(D,true, false)`,
|
|
105
105
|
`Pyra=Pyramid(Poly,H)`,
|
|
106
106
|
]);
|
|
107
107
|
const ggb = new GeogebraConstructor({
|
|
@@ -55,14 +55,14 @@ const getGGBOptions = (identifiers) => {
|
|
|
55
55
|
`ShowLabel(A,True)`,
|
|
56
56
|
`ShowLabel(B,True)`,
|
|
57
57
|
`ShowLabel(C,True)`,
|
|
58
|
-
`SetFixed(A,true)`,
|
|
59
|
-
`SetFixed(B,true)`,
|
|
60
|
-
`SetFixed(C,true)`,
|
|
58
|
+
`SetFixed(A,true, false)`,
|
|
59
|
+
`SetFixed(B,true, false)`,
|
|
60
|
+
`SetFixed(C,true, false)`,
|
|
61
61
|
`Poly=Polygon(A,B,C)`,
|
|
62
62
|
];
|
|
63
63
|
commands = commands.concat([
|
|
64
64
|
`H=Point({${ABSide / 4},${ACSide / 4},${h}})`,
|
|
65
|
-
`SetFixed(H,true)`,
|
|
65
|
+
`SetFixed(H,true, false)`,
|
|
66
66
|
`ShowLabel(H,true)`,
|
|
67
67
|
`Pyra=Pyramid(Poly,H)`,
|
|
68
68
|
]);
|
|
@@ -25,7 +25,7 @@ const getGGBOptions = (identifiers) => {
|
|
|
25
25
|
return `${point.name}=Point({${point.getXnumber()},${point.getYnumber()}})`;
|
|
26
26
|
});
|
|
27
27
|
commands.push(...cloudPoints.points.map((point) => {
|
|
28
|
-
return `SetFixed(${point.name},true)`;
|
|
28
|
+
return `SetFixed(${point.name},true, false)`;
|
|
29
29
|
}));
|
|
30
30
|
const ggb = new GeogebraConstructor({
|
|
31
31
|
commands,
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
export * from "./scratchLoopStepsCount.js";
|
|
2
|
+
export * from "./scratchLoopCond1.js";
|
|
3
|
+
export * from "./scratchSwapUsingTmp.js";
|
|
4
|
+
export * from "./scratchLoopCond2.js";
|
|
5
|
+
export * from "./scratchPrintXY.js";
|
|
6
|
+
export * from "./scratchOperations1.js";
|
|
7
|
+
export * from "./scratchOperations2.js";
|
|
8
|
+
export * from "./scratchLoop1.js";
|
|
9
|
+
export * from "./scratchVarWaterfall.js";
|
|
10
|
+
export * from "./scratchStringLoop.js";
|
|
11
|
+
export * from "./scratchStringLoopCond.js";
|
|
12
|
+
export * from "./scratchStringLoopCond2.js";
|
|
13
|
+
export * from "./scratchStringLoopCond3.js";
|
|
14
|
+
export * from "./scratchCond1.js";
|
|
2
15
|
//# sourceMappingURL=index.d.ts.map
|