math-exercises 2.2.15 → 2.2.17

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 (125) hide show
  1. package/lib/exercises/exercise.d.ts +28 -32
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/ordering/framing.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/ordering/framing.js +0 -1
  5. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
  6. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +6 -6
  7. package/lib/exercises/math/derivation/derivativeNumberReading.d.ts.map +1 -1
  8. package/lib/exercises/math/derivation/derivativeNumberReading.js +5 -6
  9. package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
  10. package/lib/exercises/math/functions/affines/affineExpressionReading.js +5 -6
  11. package/lib/exercises/math/functions/affines/interceptReading.d.ts.map +1 -1
  12. package/lib/exercises/math/functions/affines/interceptReading.js +5 -6
  13. package/lib/exercises/math/functions/affines/leadingCoefficient.js +5 -5
  14. package/lib/exercises/math/functions/basics/graphicEquation.js +5 -5
  15. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  16. package/lib/exercises/math/functions/basics/graphicInequation.js +4 -6
  17. package/lib/exercises/math/functions/basics/imageFunctionGeogebra.d.ts.map +1 -1
  18. package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -4
  19. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
  20. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +4 -6
  21. package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts.map +1 -1
  22. package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +4 -6
  23. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  24. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +4 -6
  25. package/lib/exercises/math/functions/integral/integralDerivatedUSinU.js +1 -1
  26. package/lib/exercises/math/functions/parity/parityFromGraph.js +6 -6
  27. package/lib/exercises/math/functions/trinoms/rootsReading.d.ts.map +1 -1
  28. package/lib/exercises/math/functions/trinoms/rootsReading.js +4 -7
  29. package/lib/exercises/math/functions/trinoms/summitReading.d.ts.map +1 -1
  30. package/lib/exercises/math/functions/trinoms/summitReading.js +5 -4
  31. package/lib/exercises/math/geometry/areas/rightTriangleArea.d.ts.map +1 -1
  32. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +5 -4
  33. package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
  34. package/lib/exercises/math/geometry/areas/triangleArea.js +5 -4
  35. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
  36. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +8 -8
  37. package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
  38. package/lib/exercises/math/geometry/cartesian/directionVector.js +6 -5
  39. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.d.ts.map +1 -1
  40. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +9 -8
  41. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  42. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +9 -7
  43. package/lib/exercises/math/geometry/cartesian/pointCoordinates.d.ts.map +1 -1
  44. package/lib/exercises/math/geometry/cartesian/pointCoordinates.js +12 -6
  45. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
  46. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +7 -6
  47. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +6 -6
  48. package/lib/exercises/math/geometry/pythagore/pythagore.d.ts.map +1 -1
  49. package/lib/exercises/math/geometry/pythagore/pythagore.js +5 -4
  50. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
  51. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +5 -4
  52. package/lib/exercises/math/geometry/thales/thales.d.ts.map +1 -1
  53. package/lib/exercises/math/geometry/thales/thales.js +5 -4
  54. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
  55. package/lib/exercises/math/geometry/thales/thalesCalcul.js +5 -4
  56. package/lib/exercises/math/geometry/vectors/coordinatesReading.d.ts.map +1 -1
  57. package/lib/exercises/math/geometry/vectors/coordinatesReading.js +5 -6
  58. package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.d.ts.map +1 -1
  59. package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.js +10 -8
  60. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +5 -5
  61. package/lib/exercises/math/geometry/volumes/coneVolume.js +6 -6
  62. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +6 -6
  63. package/lib/exercises/math/geometry/volumes/sphereVolume.js +6 -6
  64. package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
  65. package/lib/exercises/math/geometry/volumes/volumeOfCube.js +5 -4
  66. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.d.ts.map +1 -1
  67. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +5 -4
  68. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
  69. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +12 -11
  70. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.d.ts.map +1 -1
  71. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +5 -4
  72. package/lib/exercises/math/limits/limitReading.js +6 -6
  73. package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
  74. package/lib/exercises/math/probaStat/probabilityTree.js +5 -4
  75. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
  76. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +5 -4
  77. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +13 -13
  78. package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.js +10 -10
  79. package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -1
  80. package/lib/exercises/math/sequences/sequencePlot.js +10 -12
  81. package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
  82. package/lib/exercises/math/trigonometry/trigonometry.js +5 -4
  83. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
  84. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +5 -4
  85. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  86. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +5 -4
  87. package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
  88. package/lib/exercises/pc/calibrationCurveOfSolution.js +11 -8
  89. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
  90. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +16 -5
  91. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
  92. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +0 -2
  93. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.d.ts.map +1 -1
  94. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +7 -6
  95. package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
  96. package/lib/exercises/pc/mecanicalWaves/elongationReading.js +8 -6
  97. package/lib/exercises/pc/mole/concentrationReading.d.ts.map +1 -1
  98. package/lib/exercises/pc/mole/concentrationReading.js +8 -6
  99. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts.map +1 -1
  100. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +3 -3
  101. package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -1
  102. package/lib/exercises/pc/motion/typeOfAcceleration.js +5 -4
  103. package/lib/exercises/pc/motion/typeOfMovement.d.ts.map +1 -1
  104. package/lib/exercises/pc/motion/typeOfMovement.js +5 -4
  105. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -1
  106. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +6 -4
  107. package/lib/exercises/pc/sound/findPeriodFromGraph.d.ts.map +1 -1
  108. package/lib/exercises/pc/sound/findPeriodFromGraph.js +7 -5
  109. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts.map +1 -1
  110. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +7 -6
  111. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  112. package/lib/exercises/utils/getDistinctQuestions.js +2 -1
  113. package/lib/geogebra/geogebraConstructor.d.ts +18 -23
  114. package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
  115. package/lib/geogebra/geogebraConstructor.js +23 -16
  116. package/lib/index.d.ts +1 -76
  117. package/lib/index.d.ts.map +1 -1
  118. package/lib/index.js +1 -57
  119. package/lib/prototypesEnhancement.d.ts +14 -0
  120. package/lib/prototypesEnhancement.d.ts.map +1 -0
  121. package/lib/prototypesEnhancement.js +26 -0
  122. package/lib/server.d.ts +1 -12
  123. package/lib/server.d.ts.map +1 -1
  124. package/lib/server.js +1 -24
  125. package/package.json +4 -2
@@ -24,7 +24,7 @@ const getCartesianEquationOfLineQuestion = () => {
24
24
  `ShowLabel(d,true)`,
25
25
  `SetFixed(d,true)`,
26
26
  ];
27
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, { isGridSimple: true });
27
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({ commands });
28
28
  const correctAnswer = line.getCartesianEquation();
29
29
  const instruction = `Déterminer une équation cartesienne de la droite $d$ représentée ci-dessous :`;
30
30
  const aX = a.getXnumber();
@@ -33,13 +33,13 @@ const getCartesianEquationOfLineQuestion = () => {
33
33
  const bY = b.getYnumber();
34
34
  const question = {
35
35
  answer: correctAnswer.toTex(),
36
- commands: ggb.commands,
37
- options: ggb.getOptions(),
38
- coords: ggb.getAdaptedCoords({
39
- xMin: Math.min(aX, bX) - 5,
40
- xMax: Math.max(bX, aX) + 5,
41
- yMin: Math.min(aY, bY) - 5,
42
- yMax: Math.max(bY, aY) + 5,
36
+ ggbOptions: ggb.getOptions({
37
+ coords: ggb.getAdaptedCoords({
38
+ xMin: Math.min(aX, bX) - 5,
39
+ xMax: Math.max(bX, aX) + 5,
40
+ yMin: Math.min(aY, bY) - 5,
41
+ yMax: Math.max(bY, aY) + 5,
42
+ }),
43
43
  }),
44
44
  instruction: instruction,
45
45
  keys: ["x", "y", "equal"],
@@ -1 +1 @@
1
- {"version":3,"file":"directionVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAyIF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
1
+ {"version":3,"file":"directionVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAyIF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
@@ -54,15 +54,15 @@ const getDirectionVectorQuestion = () => {
54
54
  const yMin = Math.min(y1, y2);
55
55
  const xMax = Math.max(x1, x2);
56
56
  const yMax = Math.max(y1, y2);
57
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
58
- isGridSimple: true,
57
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
58
+ commands,
59
59
  });
60
60
  const question = {
61
61
  answer: vector.toInlineCoordsTex(),
62
62
  instruction,
63
- commands: ggb.commands,
64
- coords: [xMin - 10, xMax + 10, yMin - 10, yMax + 10],
65
- options: ggb.getOptions(),
63
+ ggbOptions: ggb.getOptions({
64
+ coords: [xMin - 10, xMax + 10, yMin - 10, yMax + 10],
65
+ }),
66
66
  keys: ["semicolon", "x", "y"],
67
67
  answerFormat: "tex",
68
68
  identifiers: { xValue, yValue },
@@ -121,4 +121,5 @@ exports.directionVector = {
121
121
  getPropositions,
122
122
  isAnswerValid,
123
123
  subject: "Mathématiques",
124
+ hasGeogebra: true,
124
125
  };
@@ -1 +1 @@
1
- {"version":3,"file":"drawAlineInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/drawAlineInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAwDF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
1
+ {"version":3,"file":"drawAlineInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/drawAlineInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA2DF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
@@ -9,26 +9,27 @@ const point_1 = require("../../../../math/geometry/point");
9
9
  const affine_1 = require("../../../../math/polynomials/affine");
10
10
  const arrayEqual_1 = require("../../../../utils/arrayEqual");
11
11
  const deleteObjectNamesFromAnswer_1 = require("../../../../geogebra/deleteObjectNamesFromAnswer");
12
+ const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
12
13
  const getDrawAlineInGgbQuestion = () => {
13
14
  const f = affine_1.AffineConstructor.random({ min: -3, max: 3 });
14
15
  const yA = f.b;
15
16
  const yB = f.a + f.b;
16
17
  const yMax = Math.max(yA, yB, 0);
17
18
  const yMin = Math.min(yA, yB, 0);
19
+ const studentGGB = new geogebraConstructor_1.GeogebraConstructor({
20
+ isGridSimple: true,
21
+ customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
22
+ join: true,
23
+ }),
24
+ });
18
25
  const question = {
19
26
  ggbAnswer: [`(0,${yA})`, `(1,${yB})`, `Line[A, B]`],
20
27
  instruction: `Tracer la droite $d$ d'équation $y=${f.toTex()}$.`,
21
28
  keys: [],
22
29
  answerFormat: "tex",
23
- studentGgbOptions: {
24
- customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
25
- join: true,
26
- }),
27
- xAxisSteps: 1,
28
- yAxisSteps: 1,
30
+ studentGgbOptions: studentGGB.getOptions({
29
31
  coords: [-6, 6, yMin - 5, yMax + 5],
30
- isGridSimple: true,
31
- },
32
+ }),
32
33
  identifiers: { correctA: f.a, correctB: f.b },
33
34
  };
34
35
  return question;
@@ -1 +1 @@
1
- {"version":3,"file":"placeAPoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA0B5C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAY/C,CAAC"}
1
+ {"version":3,"file":"placeAPoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA2B5C,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAY/C,CAAC"}
@@ -6,20 +6,22 @@ const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolB
6
6
  const point_1 = require("../../../../math/geometry/point");
7
7
  const arrayHasSameElement_1 = require("../../../../utils/arrayHasSameElement");
8
8
  const deleteObjectNamesFromAnswer_1 = require("../../../../geogebra/deleteObjectNamesFromAnswer");
9
+ const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
9
10
  const getPlaceAPointQuestion = () => {
10
11
  const point = point_1.PointConstructor.random("A");
12
+ const studentGGB = new geogebraConstructor_1.GeogebraConstructor({
13
+ isGridSimple: true,
14
+ customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
15
+ point: true,
16
+ }),
17
+ });
11
18
  const question = {
12
19
  ggbAnswer: [`(${point.getXnumber()},${point.getYnumber()})`],
13
20
  instruction: `Placer le point $A$ de coordonnées $${point.toTexWithCoords()}$.`,
14
21
  keys: [],
15
- studentGgbOptions: {
16
- customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
17
- point: true,
18
- }),
22
+ studentGgbOptions: studentGGB.getOptions({
19
23
  coords: [-11, 11, -11, 11],
20
- isGridSimple: true,
21
- enableShiftDragZoom: true,
22
- },
24
+ }),
23
25
  identifiers: { x: point.x.evaluate({}), y: point.y.evaluate({}) },
24
26
  };
25
27
  return question;
@@ -1 +1 @@
1
- {"version":3,"file":"pointCoordinates.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/pointCoordinates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
1
+ {"version":3,"file":"pointCoordinates.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/pointCoordinates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgFF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
@@ -24,17 +24,22 @@ const getPointCoordinatesQuestion = () => {
24
24
  `SetFixed(A, true)`,
25
25
  `ZoomIn(${xMin}, ${yMin}, ${xMax}, ${yMax})`,
26
26
  ];
27
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
28
- isGridSimple: true,
29
- isAxesRatioFixed: true,
27
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
28
+ commands,
30
29
  });
31
30
  const A = new point_1.Point("A", x.toTree(), y.toTree());
32
31
  const question = {
33
32
  answer: A.toCoords(),
34
- commands: ggb.commands,
35
33
  instruction,
36
- options: ggb.getOptions(),
37
- coords: [xMin, xMax, yMin, yMax],
34
+ ggbOptions: ggb.getOptions({
35
+ coords: ggb.getAdaptedCoords({
36
+ xMin,
37
+ xMax,
38
+ yMin,
39
+ yMax,
40
+ forceShowAxes: true,
41
+ }),
42
+ }),
38
43
  keys: ["x", "y", "semicolon"],
39
44
  answerFormat: "tex",
40
45
  identifiers: { x, y },
@@ -73,4 +78,5 @@ exports.pointCoordinates = {
73
78
  getPropositions,
74
79
  isAnswerValid,
75
80
  subject: "Mathématiques",
81
+ hasGeogebra: true,
76
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"convexityQuadrinomialsGeo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAoBlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA0LF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
1
+ {"version":3,"file":"convexityQuadrinomialsGeo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAoBlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AA0LF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
@@ -66,16 +66,16 @@ const getConvexityQuadrinomialsGeoQuestion = () => {
66
66
  `SetCaption(f, "$\\mathcal C_f$")`,
67
67
  `ShowLabel(f, true)`,
68
68
  ];
69
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
70
- isGridSimple: true,
71
- isAxesRatioFixed: false,
69
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
70
+ commands,
71
+ lockedAxesRatio: false,
72
72
  });
73
73
  const question = {
74
74
  answer: interval,
75
75
  instruction,
76
- commands: ggb.commands,
77
- coords: [xMin, xMax, yMin, yMax],
78
- options: ggb.getOptions(),
76
+ ggbOptions: ggb.getOptions({
77
+ coords: [xMin, xMax, yMin, yMax],
78
+ }),
79
79
  keys: ["rbracket", "lbracket", "semicolon", "infty", "reals"],
80
80
  answerFormat: "tex",
81
81
  identifiers: { askConvex, quadcoeffs, inflexionPoint: inflexionPointX },
@@ -124,4 +124,5 @@ exports.convexityQuadrinomialsGeo = {
124
124
  getPropositions,
125
125
  isAnswerValid,
126
126
  subject: "Mathématiques",
127
+ hasGeogebra: true,
127
128
  };
@@ -16,17 +16,17 @@ const getConvexityTrinomialsGeoQuestion = () => {
16
16
  `SetCaption(f, "$\\mathcal C_f$")`,
17
17
  `ShowLabel(f, true)`,
18
18
  ];
19
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
20
- isGridSimple: true,
21
- isAxesRatioFixed: false,
19
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
20
+ commands,
21
+ lockedAxesRatio: false,
22
22
  });
23
23
  const isConvex = trinom.a > 0 ? "Convexe" : "Concave";
24
24
  const question = {
25
25
  answer: isConvex,
26
26
  instruction,
27
- commands: ggb.commands,
28
- coords: trinom.getCoords(),
29
- options: ggb.getOptions(),
27
+ ggbOptions: ggb.getOptions({
28
+ coords: trinom.getCoords(),
29
+ }),
30
30
  keys: [],
31
31
  answerFormat: "raw",
32
32
  identifiers: { trinom: [trinom.a, trinom.b, trinom.c] },
@@ -1 +1 @@
1
- {"version":3,"file":"pythagore.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/pythagore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,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,QAAQ,CAAC,WAAW,CAc3C,CAAC"}
1
+ {"version":3,"file":"pythagore.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/pythagore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAgEF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,CAc3C,CAAC"}
@@ -23,7 +23,8 @@ const getPythagore = () => {
23
23
  const sideA = triangle.getSideAName();
24
24
  const sideB = triangle.getSideBName();
25
25
  const sideC = triangle.getSideCName();
26
- const ggb = new geogebraConstructor_1.GeogebraConstructor(triangle.generateCommands({}), {
26
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
27
+ commands: triangle.generateCommands({}),
27
28
  hideAxes: true,
28
29
  hideGrid: true,
29
30
  });
@@ -32,9 +33,9 @@ const getPythagore = () => {
32
33
  instruction: "Écrire l'égalité de Pythagore pour le triangle rectangle suivant : ",
33
34
  answer,
34
35
  keys: [...vertices, "equal"],
35
- commands: ggb.commands,
36
- coords: triangle.generateCoords(),
37
- options: ggb.getOptions(),
36
+ ggbOptions: ggb.getOptions({
37
+ coords: triangle.generateCoords(),
38
+ }),
38
39
  answerFormat: "tex",
39
40
  identifiers: { sideA, sideB, sideC },
40
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pythagoreCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/pythagoreCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,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,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
1
+ {"version":3,"file":"pythagoreCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/pythagore/pythagoreCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAmGF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
@@ -54,7 +54,8 @@ const getPythagoreCalcul = () => {
54
54
  highlightedSide: sides[randoms[2]],
55
55
  }),
56
56
  ];
57
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
57
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
58
+ commands,
58
59
  hideAxes: true,
59
60
  hideGrid: true,
60
61
  });
@@ -63,9 +64,9 @@ const getPythagoreCalcul = () => {
63
64
  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]]}$.`,
64
65
  answer,
65
66
  keys: [...vertices, "equal"],
66
- commands: ggb.commands,
67
- coords: triangle.generateCoords(),
68
- options: ggb.getOptions(),
67
+ ggbOptions: ggb.getOptions({
68
+ coords: triangle.generateCoords(),
69
+ }),
69
70
  answerFormat: "tex",
70
71
  identifiers: { square, sideLengths },
71
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":"thales.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thales.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AA0IF,eAAO,MAAM,MAAM,EAAE,QAAQ,CAAC,WAAW,CAcxC,CAAC"}
1
+ {"version":3,"file":"thales.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thales.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AA2IF,eAAO,MAAM,MAAM,EAAE,QAAQ,CAAC,WAAW,CAcxC,CAAC"}
@@ -59,7 +59,8 @@ const getThales = () => {
59
59
  `ShowLabel(${vertices[4]}, true)`,
60
60
  ];
61
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, {
62
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
63
+ commands,
63
64
  hideAxes: true,
64
65
  hideGrid: true,
65
66
  });
@@ -67,9 +68,9 @@ const getThales = () => {
67
68
  instruction: `En utilisant le théoreme de Thalès, écrire l'égalité des quotients sachant que $(${vertices[3]}${vertices[4]})//(${vertices[1]}${vertices[2]})$.`,
68
69
  answer,
69
70
  keys: [...vertices, "equal"],
70
- commands: ggb.commands,
71
- coords: [xMin - 1, xMax + 1, yMin - 1, yMax + 1],
72
- options: ggb.getOptions(),
71
+ ggbOptions: ggb.getOptions({
72
+ coords: [xMin - 1, xMax + 1, yMin - 1, yMax + 1],
73
+ }),
73
74
  answerFormat: "tex",
74
75
  identifiers: { vertices },
75
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,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;AAkLF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
1
+ {"version":3,"file":"thalesCalcul.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/thales/thalesCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,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,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
@@ -94,7 +94,8 @@ const getThales = () => {
94
94
  `ShowLabel(${vertices[3]}, true)`,
95
95
  `ShowLabel(${vertices[4]}, true)`,
96
96
  ];
97
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
97
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
98
+ commands,
98
99
  hideAxes: true,
99
100
  hideGrid: true,
100
101
  });
@@ -104,9 +105,9 @@ const getThales = () => {
104
105
  startStatement,
105
106
  answer,
106
107
  keys: [],
107
- commands: ggb.commands,
108
- options: ggb.getOptions(),
109
- coords: [xMin - 1, xMax + 1, yMin - 1, yMax + 1],
108
+ ggbOptions: ggb.getOptions({
109
+ coords: [xMin - 1, xMax + 1, yMin - 1, yMax + 1],
110
+ }),
110
111
  answerFormat: "tex",
111
112
  identifiers: { isAskingC, rand, rand2, sideLengths },
112
113
  };
@@ -1 +1 @@
1
- {"version":3,"file":"coordinatesReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/coordinatesReading.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,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,QAAQ,CAAC,WAAW,CAepD,CAAC"}
1
+ {"version":3,"file":"coordinatesReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/coordinatesReading.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,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;AAoEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
@@ -26,9 +26,8 @@ const getCoordinatesReadingQuestion = () => {
26
26
  const yMin = Math.min(yA, yB);
27
27
  const xMax = Math.max(xA, xB);
28
28
  const yMax = Math.max(yA, yB);
29
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
30
- gridDistance: [1, 1],
31
- isGridSimple: true,
29
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
30
+ commands,
32
31
  isGridBold: true,
33
32
  });
34
33
  const question = {
@@ -36,9 +35,9 @@ const getCoordinatesReadingQuestion = () => {
36
35
  instruction: `Lire les coordonnées du vecteur $\\overrightarrow u$ représenté ci-dessous :`,
37
36
  keys: ["semicolon", "vectorU"],
38
37
  answerFormat: "tex",
39
- commands: ggb.commands,
40
- coords: ggb.getAdaptedCoords({ xMax, xMin, yMax, yMin }),
41
- options: ggb.getOptions(),
38
+ ggbOptions: ggb.getOptions({
39
+ coords: ggb.getAdaptedCoords({ xMax, xMin, yMax, yMin }),
40
+ }),
42
41
  identifiers: { xA, xB, yA, yB },
43
42
  };
44
43
  return question;
@@ -1 +1 @@
1
- {"version":3,"file":"drawAVectorInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/drawAVectorInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
1
+ {"version":3,"file":"drawAVectorInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/drawAVectorInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
@@ -5,22 +5,24 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
5
5
  const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolBarConstructor");
6
6
  const vector_1 = require("../../../../math/geometry/vector");
7
7
  const randint_1 = require("../../../../math/utils/random/randint");
8
+ const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
8
9
  const getDrawAVectorInGgbQuestion = () => {
9
10
  const x = (0, randint_1.randint)(-3, 3);
10
11
  const y = x === 0 ? (0, randint_1.randint)(-3, 3, [0]) : (0, randint_1.randint)(-3, 3);
11
12
  const vector = new vector_1.Vector("u", x.toTree(), y.toTree());
13
+ const studentGGB = new geogebraConstructor_1.GeogebraConstructor({
14
+ isGridSimple: true,
15
+ customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
16
+ vector: true,
17
+ }),
18
+ });
12
19
  const question = {
13
- ggbAnswer: [`Vector[(-2, -2), (${-2 + x}, ${-2 + y})]`],
20
+ ggbAnswer: [`Vector[(0, 0), (${x}, ${y})]`],
14
21
  instruction: `Tracer le vecteur $${vector.toTex()}${vector.toInlineCoordsTex()}$`,
15
22
  keys: [],
16
- studentGgbOptions: {
17
- customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
18
- vector: true,
19
- }),
20
- isGridSimple: true,
23
+ studentGgbOptions: studentGGB.getOptions({
21
24
  coords: [-5, 5, -6, 6],
22
- enableShiftDragZoom: true,
23
- },
25
+ }),
24
26
  answerFormat: "tex",
25
27
  identifiers: { x, y },
26
28
  };
@@ -151,8 +151,8 @@ const getEqualCaracteristicFromGraphQuestion = () => {
151
151
  "ShowLabel(u, true)",
152
152
  "ShowLabel(v,true)",
153
153
  ];
154
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
155
- isGridSimple: true,
154
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
155
+ commands,
156
156
  hideAxes: true,
157
157
  });
158
158
  const answer = isTrue ? "Oui" : "Non";
@@ -160,9 +160,9 @@ const getEqualCaracteristicFromGraphQuestion = () => {
160
160
  answer,
161
161
  instruction: `Les vecteurs $\\overrightarrow{u}$ et $\\overrightarrow{v}$ suivants semblent-ils ${instruction} ?`,
162
162
  keys: [],
163
- commands: ggb.commands,
164
- options: ggb.getOptions(),
165
- coords: [-8, 8, -4, 4],
163
+ ggbOptions: ggb.getOptions({
164
+ coords: [-8, 8, -4, 4],
165
+ }),
166
166
  answerFormat: "raw",
167
167
  identifiers: { caracAsked, uPoints, vPoints },
168
168
  };
@@ -29,9 +29,9 @@ const getConeVolumeQuestion = () => {
29
29
  `SetVisibleInView(B, -1, false)`,
30
30
  `Cone(A, B, ${radius})`,
31
31
  ];
32
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
33
- isGridSimple: true,
34
- isAxesRatioFixed: false,
32
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
33
+ commands,
34
+ lockedAxesRatio: false,
35
35
  hideAxes: true,
36
36
  hideGrid: true,
37
37
  is3D: true,
@@ -39,9 +39,9 @@ const getConeVolumeQuestion = () => {
39
39
  const question = {
40
40
  answer: volume,
41
41
  instruction: `Le cône ci-dessous a une base de rayon $${radius}$ et une hauteur de $${height}$. Calculer son volume (arrondir au centième).`,
42
- commands: ggb.commands,
43
- coords: [xMin, xMax, yMin, yMax, 0, zMax],
44
- options: ggb.getOptions(),
42
+ ggbOptions: ggb.getOptions({
43
+ coords: [xMin, xMax, yMin, yMax, 0, zMax],
44
+ }),
45
45
  keys: [],
46
46
  answerFormat: "tex",
47
47
  identifiers: { radius, height },
@@ -64,9 +64,9 @@ const getParallelepipedVolumeQuestion = () => {
64
64
  `SetFixed(H, true)`,
65
65
  `ZoomIn(${xMin}, ${yMin}, ${xMax}, ${yMax}, ${zMin}, ${zMax})`,
66
66
  ];
67
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
68
- isGridSimple: true,
69
- isAxesRatioFixed: false,
67
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
68
+ commands,
69
+ lockedAxesRatio: false,
70
70
  is3D: true,
71
71
  hideAxes: true,
72
72
  hideGrid: true,
@@ -74,9 +74,9 @@ const getParallelepipedVolumeQuestion = () => {
74
74
  const question = {
75
75
  answer: volume,
76
76
  instruction: `Le parallélépipède $ABCDEFGH$ ci-dessous a une longueur de $${length.frenchify()}$, une largeur de $${width.frenchify()}$, et une hauteur de $${height.frenchify()}$. Calculer son volume (arrondir au centième).`,
77
- commands: ggb.commands,
78
- coords: [xMin, xMax, yMin, yMax, zMin, zMax],
79
- options: ggb.getOptions(),
77
+ ggbOptions: ggb.getOptions({
78
+ coords: [xMin, xMax, yMin, yMax, zMin, zMax],
79
+ }),
80
80
  keys: [],
81
81
  answerFormat: "tex",
82
82
  identifiers: { length, width, height, angle },
@@ -23,9 +23,9 @@ const getSphereVolumeQuestion = () => {
23
23
  `SetFixed(A, true)`,
24
24
  `SetVisibleInView(A, -1, false)`,
25
25
  ];
26
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
27
- isGridSimple: true,
28
- isAxesRatioFixed: false,
26
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
27
+ commands,
28
+ lockedAxesRatio: false,
29
29
  is3D: true,
30
30
  hideAxes: true,
31
31
  hideGrid: true,
@@ -33,9 +33,9 @@ const getSphereVolumeQuestion = () => {
33
33
  const question = {
34
34
  answer: volume,
35
35
  instruction: `La sphère ci-dessous a un rayon de $${radius.frenchify()}$. Calculer son volume (arrondir au centième).`,
36
- commands: ggb.commands,
37
- coords: [xMin, xMax, yMin, yMax, zMin, zMax],
38
- options: ggb.getOptions(),
36
+ ggbOptions: ggb.getOptions({
37
+ coords: [xMin, xMax, yMin, yMax, zMin, zMax],
38
+ }),
39
39
  keys: [],
40
40
  answerFormat: "tex",
41
41
  identifiers: { radius },
@@ -1 +1 @@
1
- {"version":3,"file":"volumeOfCube.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfCube.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAoEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAgB9C,CAAC"}
1
+ {"version":3,"file":"volumeOfCube.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfCube.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAqEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAgB9C,CAAC"}
@@ -17,7 +17,8 @@ const getVolumeOfCubeQuestion = () => {
17
17
  `ShowLabel(C,true)`,
18
18
  `P=Cube(A,B,C)`,
19
19
  ];
20
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
20
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
21
+ commands,
21
22
  is3D: true,
22
23
  hideAxes: true,
23
24
  hideGrid: true,
@@ -28,13 +29,13 @@ const getVolumeOfCubeQuestion = () => {
28
29
  instruction: `$ABCDEFGH$ est un cube d'arête $${cubeSide}$. Calculer son volume.`,
29
30
  keys: [],
30
31
  answerFormat: "tex",
31
- commands: ggb.commands,
32
- options: ggb.getOptions(),
32
+ ggbOptions: ggb.getOptions({
33
+ coords: [0, cubeSide + 1, 0, cubeSide + 1, 0, cubeSide + 1],
34
+ }),
33
35
  hint: "Le volume d'un cube est donné par $V = a^3$, où $a$ est l'arête du cube.",
34
36
  correction: `Le volume d'un cube est donné par $V = a^3$, où $a$ est l'arête du cube. Ici, le volume de $ABCDEFGH$ est donc :
35
37
 
36
38
  $V = ${cubeSide}^3 = ${answer}.$`,
37
- coords: [0, cubeSide + 1, 0, cubeSide + 1, 0, cubeSide + 1],
38
39
  identifiers: { cubeSide },
39
40
  };
40
41
  return question;
@@ -1 +1 @@
1
- {"version":3,"file":"volumeOfPyramidWithSquareOrRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAQF,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AA0JF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAcrE,CAAC"}
1
+ {"version":3,"file":"volumeOfPyramidWithSquareOrRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAQF,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AA2JF,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CAAC,WAAW,CAcrE,CAAC"}
@@ -15,7 +15,8 @@ const getVolumeOfPyramidWithSquareOrRectBaseQuestion = () => {
15
15
  const exercise = generateExercise();
16
16
  const baseOfPyramid = exercise.baseOfPyramid;
17
17
  const commands = exercise.ggbCommands;
18
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
18
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
19
+ commands,
19
20
  hideAxes: true,
20
21
  hideGrid: true,
21
22
  is3D: true,
@@ -31,9 +32,9 @@ const getVolumeOfPyramidWithSquareOrRectBaseQuestion = () => {
31
32
  instruction: instruction,
32
33
  keys: [],
33
34
  answerFormat: "tex",
34
- commands: ggb.commands,
35
- coords: [-2, maxCoord + 1, -2, maxCoord + 1, -2, exercise.h + 1],
36
- options: ggb.getOptions(),
35
+ ggbOptions: ggb.getOptions({
36
+ coords: [-2, maxCoord + 1, -2, maxCoord + 1, -2, exercise.h + 1],
37
+ }),
37
38
  identifiers: { h, baseOfPyramid },
38
39
  };
39
40
  return question;
@@ -1 +1 @@
1
- {"version":3,"file":"volumeOfPyramidWithTriangleBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AASF,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAiKF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
1
+ {"version":3,"file":"volumeOfPyramidWithTriangleBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AASF,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAmKF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}