math-exercises 2.0.24 → 2.0.26

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.
Files changed (68) hide show
  1. package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts +3 -1
  2. package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts.map +1 -1
  3. package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.js +1 -1
  4. package/lib/exercises/combinatory/diceCounting.d.ts +3 -0
  5. package/lib/exercises/combinatory/diceCounting.d.ts.map +1 -1
  6. package/lib/exercises/combinatory/diceCounting.js +4 -2
  7. package/lib/exercises/complex/argumentFromAlgebraicComplex.d.ts +1 -0
  8. package/lib/exercises/complex/argumentFromAlgebraicComplex.d.ts.map +1 -1
  9. package/lib/exercises/complex/argumentFromAlgebraicComplex.js +1 -1
  10. package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
  11. package/lib/exercises/derivation/derivative/thirdDegreeFunctionVariation.js +12 -6
  12. package/lib/exercises/derivation/derivativeNumberReading.d.ts.map +1 -1
  13. package/lib/exercises/derivation/derivativeNumberReading.js +6 -3
  14. package/lib/exercises/exercise.d.ts +9 -1
  15. package/lib/exercises/exercise.d.ts.map +1 -1
  16. package/lib/exercises/functions/affines/affineExpressionReading.d.ts.map +1 -1
  17. package/lib/exercises/functions/affines/affineExpressionReading.js +11 -12
  18. package/lib/exercises/functions/affines/interceptReading.d.ts.map +1 -1
  19. package/lib/exercises/functions/affines/interceptReading.js +16 -10
  20. package/lib/exercises/functions/affines/leadingCoefficient.d.ts.map +1 -1
  21. package/lib/exercises/functions/affines/leadingCoefficient.js +12 -25
  22. package/lib/exercises/functions/basics/graphicEquation.d.ts.map +1 -1
  23. package/lib/exercises/functions/basics/graphicEquation.js +15 -14
  24. package/lib/exercises/functions/basics/graphicInequation.d.ts.map +1 -1
  25. package/lib/exercises/functions/basics/graphicInequation.js +13 -12
  26. package/lib/exercises/functions/basics/imageFunctionGeogebra.d.ts.map +1 -1
  27. package/lib/exercises/functions/basics/imageFunctionGeogebra.js +9 -19
  28. package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
  29. package/lib/exercises/functions/basics/inverseImageFunctionGeogebra.js +25 -69
  30. package/lib/exercises/functions/logarithm/log10PowerSimplifying.d.ts +1 -0
  31. package/lib/exercises/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
  32. package/lib/exercises/functions/logarithm/log10PowerSimplifying.js +1 -1
  33. package/lib/exercises/geometry/areas/rightTriangleArea.d.ts.map +1 -1
  34. package/lib/exercises/geometry/areas/rightTriangleArea.js +7 -1
  35. package/lib/exercises/geometry/areas/triangleArea.d.ts.map +1 -1
  36. package/lib/exercises/geometry/areas/triangleArea.js +11 -3
  37. package/lib/exercises/geometry/pythagore/pythagore.d.ts.map +1 -1
  38. package/lib/exercises/geometry/pythagore/pythagore.js +7 -1
  39. package/lib/exercises/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
  40. package/lib/exercises/geometry/pythagore/pythagoreCalcul.js +7 -1
  41. package/lib/exercises/geometry/thales/thales.d.ts.map +1 -1
  42. package/lib/exercises/geometry/thales/thales.js +7 -3
  43. package/lib/exercises/geometry/thales/thalesCalcul.d.ts.map +1 -1
  44. package/lib/exercises/geometry/thales/thalesCalcul.js +7 -3
  45. package/lib/exercises/geometry/vectors/coordinatesReading.d.ts.map +1 -1
  46. package/lib/exercises/geometry/vectors/coordinatesReading.js +15 -9
  47. package/lib/exercises/probaStat/probabilityTree.d.ts.map +1 -1
  48. package/lib/exercises/probaStat/probabilityTree.js +6 -2
  49. package/lib/exercises/trigonometry/trigonometry.d.ts.map +1 -1
  50. package/lib/exercises/trigonometry/trigonometry.js +7 -3
  51. package/lib/exercises/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
  52. package/lib/exercises/trigonometry/trigonometryAngleCalcul.js +7 -3
  53. package/lib/exercises/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  54. package/lib/exercises/trigonometry/trigonometrySideCalcul.js +7 -1
  55. package/lib/exercises/utils/keys/discreteSetKeys.d.ts +3 -0
  56. package/lib/exercises/utils/keys/discreteSetKeys.d.ts.map +1 -0
  57. package/lib/exercises/utils/keys/discreteSetKeys.js +11 -0
  58. package/lib/geogebra/geogebraConstructor.d.ts +27 -3
  59. package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
  60. package/lib/geogebra/geogebraConstructor.js +36 -6
  61. package/lib/index.d.ts +8 -1
  62. package/lib/index.d.ts.map +1 -1
  63. package/lib/math/geometry/triangles.d.ts +1 -1
  64. package/lib/math/geometry/triangles.d.ts.map +1 -1
  65. package/lib/math/geometry/triangles.js +1 -3
  66. package/lib/math/polynomials/polynomial.js +1 -1
  67. package/lib/math/polynomials/trinom.js +1 -1
  68. package/package.json +3 -1
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.inverseImageFunctionGeogebra = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
7
+ const affine_1 = require("../../../math/polynomials/affine");
6
8
  const polynomial_1 = require("../../../math/polynomials/polynomial");
9
+ const trinom_1 = require("../../../math/polynomials/trinom");
7
10
  const randint_1 = require("../../../math/utils/random/randint");
8
11
  const round_1 = require("../../../math/utils/round");
9
12
  const coinFlip_1 = require("../../../utils/coinFlip");
@@ -15,105 +18,58 @@ const getInverseImageFunctionGeogebra = () => {
15
18
  let yValue;
16
19
  let affine;
17
20
  let trinom;
18
- let statement = "";
19
21
  let answer = "";
20
- let xmin = -1;
21
- let xmax = 1;
22
- let ymin = -1;
23
- let ymax = 1;
22
+ let xMin = -1;
23
+ let xMax = 1;
24
+ let yMin = -1;
25
+ let yMax = 1;
24
26
  let commands;
25
27
  if (isAffine) {
26
28
  do {
27
- affine = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-5, 6, [0])]);
29
+ affine = new affine_1.Affine((0, randint_1.randint)(-5, 6, [0]), (0, randint_1.randint)(-9, 10));
28
30
  yValue = affine.calculate(xValue);
29
31
  } while (Math.abs(yValue) > 10);
30
- statement = `Déterminer le ou les antécédents de $${yValue}$ par la fonction $f$ représentée ci dessous.`;
31
32
  answer = xValue.toString().replace(".", ",");
32
- if (yValue > 0) {
33
- ymax = yValue + 1;
34
- ymin = -1;
35
- }
36
- else {
37
- ymin = yValue - 1;
38
- ymax = 1;
39
- }
40
- if (xValue > 0) {
41
- xmax = xValue + 1;
42
- xmin = -1;
43
- }
44
- else {
45
- xmin = xValue - 1;
46
- xmax = 1;
47
- }
33
+ yMin = yValue;
34
+ yMax = yValue;
35
+ xMin = xValue;
36
+ xMax = xValue;
48
37
  commands = [affine.toString()];
49
38
  }
50
39
  else {
51
40
  let roots;
52
41
  yValue = (0, randint_1.randint)(-5, 6);
53
42
  do {
54
- trinom = new polynomial_1.Polynomial([
55
- (0, randint_1.randint)(-9, 10) - yValue,
56
- (0, randint_1.randint)(-9, 10),
57
- (0, randint_1.randint)(-4, 5, [0]),
58
- ]);
43
+ trinom = new trinom_1.Trinom((0, randint_1.randint)(-4, 5, [0]), (0, randint_1.randint)(-9, 10), (0, randint_1.randint)(-9, 10) - yValue);
59
44
  roots = trinom.getRoots();
60
45
  } while (roots.some((root) => Math.abs(root) > 10));
61
- statement = `Déterminer le ou les antécédents de $${yValue}$ par la fonction $f$ représentée ci dessous.`;
62
46
  answer = !roots.length
63
47
  ? "\\text{Aucun}"
64
48
  : roots
65
49
  .map((r) => (0, round_1.round)(r, 1).toString().replace(".", ","))
66
50
  .join("\\text{ et }");
67
- const alpha = trinom.derivate().getRoots()[0];
68
- const beta = trinom.calculate(alpha);
69
- if (roots.length === 2) {
70
- if (yValue > beta + yValue) {
71
- ymax = yValue + 2;
72
- ymin = beta + yValue - 2;
73
- }
74
- else {
75
- ymin = yValue - 2;
76
- ymax = beta + yValue + 2;
77
- }
78
- xmax = Math.max(roots[0], roots[1]) + 1;
79
- xmin = Math.min(roots[0], roots[1]) - 1;
80
- }
81
- if (roots.length === 1) {
82
- if (yValue > 0) {
83
- ymax = yValue + 5;
84
- ymin = yValue - 1;
85
- }
86
- else {
87
- ymin = yValue - 5;
88
- ymax = yValue + 1;
89
- }
90
- xmax = alpha + 5;
91
- xmin = alpha - 5;
92
- }
93
- if (roots.length === 0) {
94
- if (yValue > beta + yValue) {
95
- ymax = yValue + 1;
96
- ymin = beta + yValue - 3;
97
- }
98
- else {
99
- ymin = yValue - 1;
100
- ymax = beta + yValue + 3;
101
- }
102
- xmax = alpha + 5;
103
- xmin = alpha - 5;
104
- }
51
+ const beta = trinom.getBeta() + yValue;
52
+ yMin = trinom.a > 0 ? beta : roots.length ? yValue : beta - 5;
53
+ yMax = trinom.a < 0 ? beta : roots.length ? yValue : beta + 5;
54
+ xMax = roots.length ? Math.max(...roots) : -10;
55
+ xMin = roots.length ? Math.min(...roots) : 10;
105
56
  commands = [
106
57
  yValue !== 0
107
58
  ? trinom.add(new polynomial_1.Polynomial([yValue])).toString()
108
59
  : trinom.toString(),
109
60
  ];
110
61
  }
62
+ const statement = `Lire graphiquement le ou les antécédents de $${yValue}$ par la fonction $f$ représentée ci dessous.`;
63
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
64
+ isGridSimple: true,
65
+ });
111
66
  const question = {
112
67
  instruction: statement,
113
68
  answer,
114
69
  keys: ["et", "aucun"],
115
- commands,
116
- coords: [xmin, xmax, ymin, ymax],
70
+ commands: ggb.commands,
71
+ options: ggb.getOptions(),
72
+ coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
117
73
  answerFormat: "tex",
118
74
  identifiers: {
119
75
  xValue,
@@ -1,6 +1,7 @@
1
1
  import { MathExercise } from "../../../exercises/exercise";
2
2
  type Identifiers = {
3
3
  tenthPower: number;
4
+ nbTex: string;
4
5
  };
5
6
  export declare const log10PowerSimplifying: MathExercise<Identifiers>;
6
7
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAqCF,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,WAAW,CAc3D,CAAC"}
1
+ {"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAqCF,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,WAAW,CAc3D,CAAC"}
@@ -21,7 +21,7 @@ const getLog10PowerSimplifyingQuestion = () => {
21
21
  instruction: `Calculer : $${new log10Node_1.Log10Node(nb).toTex()}$`,
22
22
  keys: [],
23
23
  answerFormat: "tex",
24
- identifiers: { tenthPower },
24
+ identifiers: { tenthPower, nbTex: nb.toTex() },
25
25
  };
26
26
  return question;
27
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rightTriangleArea.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/areas/rightTriangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA0EF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAYvD,CAAC"}
1
+ {"version":3,"file":"rightTriangleArea.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/areas/rightTriangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA+EF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAYvD,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.rightTriangleArea = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
6
7
  const triangles_1 = require("../../../math/geometry/triangles");
7
8
  const rational_1 = require("../../../math/numbers/rationals/rational");
8
9
  const randint_1 = require("../../../math/utils/random/randint");
@@ -29,12 +30,17 @@ const getRightTriangleArea = () => {
29
30
  ];
30
31
  const answer = ((sidesLengths[0] * sidesLengths[1]) / 2 + "").replace(".", ",");
31
32
  const answerTex = answer + "\\text{cm}^2";
33
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
34
+ hideAxes: true,
35
+ hideGrid: true,
36
+ });
32
37
  const question = {
33
38
  instruction: `Calculer l'aire du triangle $${triangle.getTriangleName()}$ rectangle en ${triangle.getRightAngle()} sachant que $${triangle.getSideBName()} = ${sidesLengths[0]}$ cm et $${triangle.getSideCName()} = ${sidesLengths[1]}$ cm.`,
34
39
  answer: answerTex,
35
40
  keys: ["cm", "cm2"],
36
- commands,
41
+ commands: ggb.commands,
37
42
  coords: triangle.generateCoords(),
43
+ options: ggb.getOptions(),
38
44
  answerFormat: "tex",
39
45
  identifiers: { sidesLengths },
40
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"triangleArea.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/areas/triangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAwGtB,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,WAAW,CAYlD,CAAC"}
1
+ {"version":3,"file":"triangleArea.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/areas/triangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA4GtB,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,WAAW,CAYlD,CAAC"}
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.triangleArea = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
6
7
  const triangles_1 = require("../../../math/geometry/triangles");
7
8
  const rational_1 = require("../../../math/numbers/rationals/rational");
8
9
  const randint_1 = require("../../../math/utils/random/randint");
10
+ const randomLetter_1 = require("../../../utils/randomLetter");
9
11
  const shuffle_1 = require("../../../utils/shuffle");
10
12
  const getTriangleArea = () => {
11
13
  const vertices = [];
@@ -34,14 +36,15 @@ const getTriangleArea = () => {
34
36
  ];
35
37
  const randoms = (0, shuffle_1.shuffle)([0, 1, 2]);
36
38
  const height = Math.round(sidesLengths[randoms[1]] * Math.sin(angles[randoms[2]]));
39
+ const interceptName = (0, randomLetter_1.randomLetter)(true, vertices);
37
40
  const commands = [
38
41
  ...triangle.generateCommands({
39
42
  showLabels: [sides[randoms[0]]],
40
43
  setCaptions: [sidesLengths[randoms[0]] + ""],
41
44
  }),
42
45
  `poi = Intersect(PerpendicularLine(${vertices[randoms[0]]},${sides[randoms[0]]}),${sides[randoms[0]]})`,
46
+ `SetCaption(poi, "${interceptName}")`,
43
47
  `ShowLabel(poi, true)`,
44
- `SetCaption(poi, "${String.fromCharCode(code + 3)}")`,
45
48
  `seg = Segment(${vertices[randoms[0]]}, poi)`,
46
49
  `ShowLabel(seg, true)`,
47
50
  `SetCaption(seg, "${height}")`,
@@ -49,13 +52,18 @@ const getTriangleArea = () => {
49
52
  `alpha = Angle(${vertices[randoms[0]]},poi ,${vertices[randoms[1]]}, Line(${vertices[randoms[0]]},poi))`,
50
53
  `ShowLabel(alpha, false)`,
51
54
  ];
55
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
56
+ hideAxes: true,
57
+ hideGrid: true,
58
+ });
52
59
  const answer = ((sidesLengths[randoms[0]] * height) / 2 + "").replace(".", ",");
53
60
  const answerTex = answer + "\\text{cm}^2";
54
61
  const question = {
55
- instruction: `Calculer l'aire du triangle $${triangle.getTriangleName()}$ sachant que $${sides[randoms[0]]} = ${sidesLengths[randoms[0]]}$ cm et $${vertices[randoms[0]]}${String.fromCharCode(code + 3)} = ${height}$ cm.`,
62
+ instruction: `Calculer l'aire du triangle $${triangle.getTriangleName()}$ sachant que $${sides[randoms[0]]} = ${sidesLengths[randoms[0]]}$ cm et $${vertices[randoms[0]]}${interceptName} = ${height}$ cm.`,
56
63
  answer: answerTex,
57
64
  keys: ["cm", "cm2"],
58
- commands,
65
+ commands: ggb.commands,
66
+ options: ggb.getOptions(),
59
67
  coords: triangle.generateCoords(),
60
68
  answerFormat: "tex",
61
69
  identifiers: { sidesLengths },
@@ -1 +1 @@
1
- {"version":3,"file":"pythagore.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/pythagore/pythagore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA0DF,eAAO,MAAM,SAAS,EAAE,YAAY,CAAC,WAAW,CAY/C,CAAC"}
1
+ {"version":3,"file":"pythagore.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/pythagore/pythagore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EASb,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA+DF,eAAO,MAAM,SAAS,EAAE,YAAY,CAAC,WAAW,CAY/C,CAAC"}
@@ -9,6 +9,7 @@ const lengthNode_1 = require("../../../tree/nodes/geometry/lengthNode");
9
9
  const addNode_1 = require("../../../tree/nodes/operators/addNode");
10
10
  const equalNode_1 = require("../../../tree/nodes/equations/equalNode");
11
11
  const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
12
+ const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
12
13
  const getPythagore = () => {
13
14
  const vertices = [];
14
15
  const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
@@ -22,13 +23,18 @@ const getPythagore = () => {
22
23
  const sideA = triangle.getSideAName();
23
24
  const sideB = triangle.getSideBName();
24
25
  const sideC = triangle.getSideCName();
26
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(triangle.generateCommands({}), {
27
+ hideAxes: true,
28
+ hideGrid: true,
29
+ });
25
30
  const answer = `${sideA}^2=${sideB}^2+${sideC}^2`;
26
31
  const question = {
27
32
  instruction: "Écrire l'égalité de Pythagore pour le triangle rectangle suivant : ",
28
33
  answer,
29
34
  keys: [...vertices, "equal"],
30
- commands: triangle.generateCommands({}),
35
+ commands: ggb.commands,
31
36
  coords: triangle.generateCoords(),
37
+ options: ggb.getOptions(),
32
38
  answerFormat: "tex",
33
39
  identifiers: { sideA, sideB, sideC },
34
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pythagoreCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/pythagore/pythagoreCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AA6FF,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAYrD,CAAC"}
1
+ {"version":3,"file":"pythagoreCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/pythagore/pythagoreCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAkGF,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAYrD,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.pythagoreCalcul = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
6
7
  const triangles_1 = require("../../../math/geometry/triangles");
7
8
  const real_1 = require("../../../math/numbers/reals/real");
8
9
  const randint_1 = require("../../../math/utils/random/randint");
@@ -53,13 +54,18 @@ const getPythagoreCalcul = () => {
53
54
  highlightedSide: sides[randoms[2]],
54
55
  }),
55
56
  ];
57
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
58
+ hideAxes: true,
59
+ hideGrid: true,
60
+ });
56
61
  answer = answer + "";
57
62
  const question = {
58
63
  instruction: `Dans le triangle $${triangle.getTriangleName()}$ rectangle en $${triangle.getRightAngle()}$, on sait que $${sides[randoms[0]]} = ${sideLengths[randoms[0]]}$ et que $${sides[randoms[1]]} = ${sideLengths[randoms[1]]}$. Calculer la longueur exacte $${sides[randoms[2]]}$.`,
59
64
  answer,
60
65
  keys: [...vertices, "equal"],
61
- commands,
66
+ commands: ggb.commands,
62
67
  coords: triangle.generateCoords(),
68
+ options: ggb.getOptions(),
63
69
  answerFormat: "tex",
64
70
  identifiers: { square, sideLengths },
65
71
  };
@@ -1 +1 @@
1
- {"version":3,"file":"thales.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/thales/thales.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAsIF,eAAO,MAAM,MAAM,EAAE,YAAY,CAAC,WAAW,CAY5C,CAAC"}
1
+ {"version":3,"file":"thales.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/thales/thales.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AA0IF,eAAO,MAAM,MAAM,EAAE,YAAY,CAAC,WAAW,CAY5C,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.thales = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
6
7
  const randint_1 = require("../../../math/utils/random/randint");
7
8
  const multiEqualNode_1 = require("../../../tree/nodes/equations/multiEqualNode");
8
9
  const lengthNode_1 = require("../../../tree/nodes/geometry/lengthNode");
@@ -51,8 +52,6 @@ const getThales = () => {
51
52
  `k = Segment(${vertices[3]}, ${vertices[4]})`,
52
53
  `If(${factor} < 0, Segment(${vertices[0]}, ${vertices[3]}))`,
53
54
  `If(${factor} < 0, Segment(${vertices[0]}, ${vertices[4]}))`,
54
- `ShowAxes(false)`,
55
- `ShowGrid(false)`,
56
55
  `ShowLabel(${vertices[0]}, true)`,
57
56
  `ShowLabel(${vertices[1]}, true)`,
58
57
  `ShowLabel(${vertices[2]}, true)`,
@@ -60,12 +59,17 @@ const getThales = () => {
60
59
  `ShowLabel(${vertices[4]}, true)`,
61
60
  ];
62
61
  const answer = `\\frac{${vertices[0]}${vertices[3]}}{${vertices[0]}${vertices[1]}}=\\frac{${vertices[0]}${vertices[4]}}{${vertices[0]}${vertices[2]}}=\\frac{${vertices[3]}${vertices[4]}}{${vertices[1]}${vertices[2]}}`;
62
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
63
+ hideAxes: true,
64
+ hideGrid: true,
65
+ });
63
66
  const question = {
64
67
  instruction: `En utilisant le théoreme de Thalès, écrire l'égalité des quotients sachant que $(${vertices[3]}${vertices[4]})//(${vertices[1]}${vertices[2]})$.`,
65
68
  answer,
66
69
  keys: [...vertices, "equal"],
67
- commands,
70
+ commands: ggb.commands,
68
71
  coords: [xMin - 1, xMax + 1, yMin - 1, yMax + 1],
72
+ options: ggb.getOptions(),
69
73
  answerFormat: "tex",
70
74
  identifiers: { vertices },
71
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAgLF,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,WAAW,CAYlD,CAAC"}
1
+ {"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAmLF,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,WAAW,CAYlD,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.thalesCalcul = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
6
7
  const rational_1 = require("../../../math/numbers/rationals/rational");
7
8
  const randint_1 = require("../../../math/utils/random/randint");
8
9
  const coinFlip_1 = require("../../../utils/coinFlip");
@@ -87,21 +88,24 @@ const getThales = () => {
87
88
  `k = Segment(${vertices[3]}, ${vertices[4]})`,
88
89
  `If(${factor} < 0, Segment(${vertices[0]}, ${vertices[3]}))`,
89
90
  `If(${factor} < 0, Segment(${vertices[0]}, ${vertices[4]}))`,
90
- `ShowAxes(false)`,
91
- `ShowGrid(false)`,
92
91
  `ShowLabel(${vertices[0]}, true)`,
93
92
  `ShowLabel(${vertices[1]}, true)`,
94
93
  `ShowLabel(${vertices[2]}, true)`,
95
94
  `ShowLabel(${vertices[3]}, true)`,
96
95
  `ShowLabel(${vertices[4]}, true)`,
97
96
  ];
97
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
98
+ hideAxes: true,
99
+ hideGrid: true,
100
+ });
98
101
  const answer = statement.toTex();
99
102
  const question = {
100
103
  instruction,
101
104
  startStatement,
102
105
  answer,
103
106
  keys: [],
104
- commands,
107
+ commands: ggb.commands,
108
+ options: ggb.getOptions(),
105
109
  coords: [xMin - 1, xMax + 1, yMin - 1, yMax + 1],
106
110
  answerFormat: "tex",
107
111
  identifiers: { isAskingC, rand, rand2, sideLengths },
@@ -1 +1 @@
1
- {"version":3,"file":"coordinatesReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/vectors/coordinatesReading.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAgEF,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,WAAW,CAaxD,CAAC"}
1
+ {"version":3,"file":"coordinatesReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/vectors/coordinatesReading.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAqEF,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,WAAW,CAaxD,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.coordinatesReading = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
6
7
  const integer_1 = require("../../../math/numbers/integer/integer");
7
8
  const randint_1 = require("../../../math/utils/random/randint");
8
9
  const getCoordinatesReadingQuestion = () => {
@@ -14,24 +15,29 @@ const getCoordinatesReadingQuestion = () => {
14
15
  const xDelta = xB - xA;
15
16
  const yDelta = yB - yA;
16
17
  const answer = `\\left(${xDelta};${yDelta}\\right)`;
17
- const commands = [`Vector((${xA},${yA}), (${xB}, ${yB}))`];
18
+ const commands = [
19
+ `u = Vector((${xA},${yA}), (${xB}, ${yB}))`,
20
+ 'SetCaption(u, "$\\overrightarrow u$")',
21
+ "ShowLabel(u, true)",
22
+ ];
18
23
  const xMin = Math.min(xA, xB);
19
24
  const yMin = Math.min(yA, yB);
20
25
  const xMax = Math.max(xA, xB);
21
26
  const yMax = Math.max(yA, yB);
22
- const coords = [
23
- xMin === xMax ? xMin - 1 : xMin - 0.2 * Math.abs(xDelta),
24
- xMin === xMax ? xMax + 1 : xMax + 0.2 * Math.abs(xDelta),
25
- yMin === yMax ? yMin - 1 : yMin - 0.2 * Math.abs(yDelta),
26
- yMin === yMax ? yMax + 1 : yMax + 0.2 * Math.abs(yDelta),
27
- ];
27
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
28
+ axesRatio: [1, 1],
29
+ gridDistance: [1, 1],
30
+ isGridSimple: true,
31
+ isGridBold: true,
32
+ });
28
33
  const question = {
29
34
  answer: answer,
30
35
  instruction: `Lire les coordonnées du vecteur $\\overrightarrow u$ représenté ci-dessous :`,
31
36
  keys: ["semicolon", "vectorU"],
32
37
  answerFormat: "tex",
33
- commands,
34
- coords,
38
+ commands: ggb.commands,
39
+ coords: ggb.getAdaptedCoords({ xMax, xMin, yMax, yMin }),
40
+ options: ggb.getOptions(),
35
41
  identifiers: { xA, xB, yA, yB },
36
42
  };
37
43
  return question;
@@ -1 +1 @@
1
- {"version":3,"file":"probabilityTree.d.ts","sourceRoot":"","sources":["../../../src/exercises/probaStat/probabilityTree.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,EAQb,MAAM,aAAa,CAAC;AAGrB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA2IF,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAoBrD,CAAC"}
1
+ {"version":3,"file":"probabilityTree.d.ts","sourceRoot":"","sources":["../../../src/exercises/probaStat/probabilityTree.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,YAAY,EAQb,MAAM,aAAa,CAAC;AAGrB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA8IF,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,WAAW,CAoBrD,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.probabilityTree = void 0;
4
+ const geogebraConstructor_1 = require("../../geogebra/geogebraConstructor");
4
5
  const integer_1 = require("../../math/numbers/integer/integer");
5
6
  const rational_1 = require("../../math/numbers/rationals/rational");
6
7
  const gcd_1 = require("../../math/utils/arithmetic/gcd");
@@ -74,8 +75,6 @@ const getProbabilityTree = () => {
74
75
  "Segment(Point({0,0}),B)",
75
76
  "Segment(B,BC)",
76
77
  "Segment(B,BD)",
77
- "ShowAxes(false)",
78
- "ShowGrid(false)",
79
78
  `Text("\\scriptsize ${A / (0, gcd_1.gcd)(A, A + B)}/${(A + B) / (0, gcd_1.gcd)(A, A + B)}", (0.3, 2.1), true, true)`,
80
79
  `Text("\\scriptsize ${AC / (0, gcd_1.gcd)(AC, AC + AD)}/${(AC + AD) / (0, gcd_1.gcd)(AC, AC + AD)}", (2.8, 3.5), true, true)`,
81
80
  `Text("\\scriptsize ${AD / (0, gcd_1.gcd)(AD, AC + AD)}/${(AC + AD) / (0, gcd_1.gcd)(AD, AC + AD)}", (2.8, 1.4), true, true)`,
@@ -89,12 +88,17 @@ const getProbabilityTree = () => {
89
88
  'Text("C", (5.5 , -1.1))',
90
89
  'Text("D", (5.5 , -3.1))',
91
90
  ];
91
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
92
+ hideAxes: true,
93
+ hideGrid: true,
94
+ });
92
95
  const question = {
93
96
  instruction,
94
97
  startStatement,
95
98
  answer: answerTex,
96
99
  keys: [],
97
100
  commands,
101
+ options: ggb.getOptions(),
98
102
  coords: [-2, 8, -5, 5],
99
103
  answerFormat: "tex",
100
104
  identifiers: { A, AC, AD, B, BC, BD, type },
@@ -1 +1 @@
1
- {"version":3,"file":"trigonometry.d.ts","sourceRoot":"","sources":["../../../src/exercises/trigonometry/trigonometry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgHF,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,WAAW,CAalD,CAAC"}
1
+ {"version":3,"file":"trigonometry.d.ts","sourceRoot":"","sources":["../../../src/exercises/trigonometry/trigonometry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqHF,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,WAAW,CAalD,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.trigonometry = void 0;
4
4
  const exercise_1 = require("../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../geogebra/geogebraConstructor");
6
7
  const triangles_1 = require("../../math/geometry/triangles");
7
8
  const randint_1 = require("../../math/utils/random/randint");
8
9
  const lengthNode_1 = require("../../tree/nodes/geometry/lengthNode");
@@ -44,14 +45,17 @@ const getTrigonometry = () => {
44
45
  default:
45
46
  quotient = [""];
46
47
  }
48
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(triangle.generateCommands({ highlightedAngle: angle[randAngle] }), {
49
+ hideAxes: true,
50
+ hideGrid: true,
51
+ });
47
52
  const answer = quotient[randTrigo];
48
53
  const question = {
49
54
  instruction: `À quel quotient est égal ${trigo[randTrigo]} de l'angle $\\widehat{${angle[randAngle]}}$?`,
50
55
  answer,
51
56
  keys: [...vertices, "equal"],
52
- commands: [
53
- ...triangle.generateCommands({ highlightedAngle: angle[randAngle] }),
54
- ],
57
+ commands: ggb.commands,
58
+ options: ggb.getOptions(),
55
59
  coords: triangle.generateCoords(),
56
60
  answerFormat: "tex",
57
61
  identifiers: { sideA, sideB, sideC, randAngle, randTrigo },
@@ -1 +1 @@
1
- {"version":3,"file":"trigonometryAngleCalcul.d.ts","sourceRoot":"","sources":["../../../src/exercises/trigonometry/trigonometryAngleCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAyEF,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,WAAW,CAa7D,CAAC"}
1
+ {"version":3,"file":"trigonometryAngleCalcul.d.ts","sourceRoot":"","sources":["../../../src/exercises/trigonometry/trigonometryAngleCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AA8EF,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,WAAW,CAa7D,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.trigonometryAngleCalcul = void 0;
4
4
  const exercise_1 = require("../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../geogebra/geogebraConstructor");
6
7
  const triangles_1 = require("../../math/geometry/triangles");
7
8
  const randint_1 = require("../../math/utils/random/randint");
8
9
  const round_1 = require("../../math/utils/round");
@@ -34,13 +35,16 @@ const getTrigonometryAngleCalcul = () => {
34
35
  ? Math.round((Math.acos(sideLengths[0] / sideLengths[2]) * 180) / Math.PI)
35
36
  : Math.round((Math.acos(sideLengths[1] / sideLengths[2]) * 180) / Math.PI);
36
37
  const answerTex = answer + "^{\\circ}";
38
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(triangle.generateCommands({ highlightedAngle: angle[randAngle] }), {
39
+ hideAxes: true,
40
+ hideGrid: true,
41
+ });
37
42
  const question = {
38
43
  instruction: `Le triangle $${triangle.getTriangleName()}$ rectangle en $${triangle.getRightAngle()}$ est tel que $${sides[randSides[0]]} = ${(sideLengths[randSides[0]] + "").replace(".", ",")}$ cm et $${sides[randSides[1]]} = ${(sideLengths[randSides[1]] + "").replace(".", ",")}$ cm. Calculer $\\widehat{${angle[randAngle]}}$ à $1^\\circ$ près.`,
39
44
  answer: answerTex,
40
45
  keys: ["degree"],
41
- commands: [
42
- ...triangle.generateCommands({ highlightedAngle: angle[randAngle] }),
43
- ],
46
+ commands: ggb.commands,
47
+ options: ggb.getOptions(),
44
48
  coords: triangle.generateCoords(),
45
49
  answerFormat: "tex",
46
50
  identifiers: { randAngle, sideLengths, randSides },
@@ -1 +1 @@
1
- {"version":3,"file":"trigonometrySideCalcul.d.ts","sourceRoot":"","sources":["../../../src/exercises/trigonometry/trigonometrySideCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAwFF,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,WAAW,CAa5D,CAAC"}
1
+ {"version":3,"file":"trigonometrySideCalcul.d.ts","sourceRoot":"","sources":["../../../src/exercises/trigonometry/trigonometrySideCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAQb,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AA4FF,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAAC,WAAW,CAa5D,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.trigonometrySideCalcul = void 0;
4
4
  const exercise_1 = require("../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
6
+ const geogebraConstructor_1 = require("../../geogebra/geogebraConstructor");
6
7
  const triangles_1 = require("../../math/geometry/triangles");
7
8
  const randint_1 = require("../../math/utils/random/randint");
8
9
  const round_1 = require("../../math/utils/round");
@@ -45,12 +46,17 @@ const getTrigonometrySideCalcul = () => {
45
46
  highlightedSide: sides[randSideQuestion],
46
47
  }),
47
48
  ];
49
+ const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
50
+ hideAxes: true,
51
+ hideGrid: true,
52
+ });
48
53
  const answer = `${((0, round_1.round)(sideLengths[randSideQuestion], 1) + "").replace(".", ",")}`;
49
54
  const question = {
50
55
  instruction: `Le triangle $${triangle.getTriangleName()}$ rectangle en $${triangle.getRightAngle()}$ est tel que $${sides[randSide]} = ${(sideLengths[randSide] + "").replace(".", ",")}$ cm et $\\widehat{${angle[randAngle]}} = ${(angleValue[randAngle] + "").replace(".", ",")}^\\circ$. Calculer $${sides[randSideQuestion]}$ à $0,1$ cm près.`,
51
56
  answer,
52
57
  keys: [],
53
- commands,
58
+ commands: ggb.commands,
59
+ options: ggb.getOptions(),
54
60
  coords: triangle.generateCoords(),
55
61
  answerFormat: "tex",
56
62
  identifiers: { randAngle, randSide, randSideQuestion, sideLengths },
@@ -0,0 +1,3 @@
1
+ import { KeyId } from "../../../types/keyIds";
2
+ export declare const discreteSetKeys: KeyId[];
3
+ //# sourceMappingURL=discreteSetKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discreteSetKeys.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/keys/discreteSetKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,eAAO,MAAM,eAAe,EAAE,KAAK,EAOlC,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.discreteSetKeys = void 0;
4
+ exports.discreteSetKeys = [
5
+ "S",
6
+ "equal",
7
+ "lbrace",
8
+ "semicolon",
9
+ "rbrace",
10
+ "varnothing",
11
+ ];