math-exercises 2.2.76 → 2.2.78
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/geometry/euclidianConstructions/buildPointFromAxialSymetry.d.ts +10 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.js +107 -0
- package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/index.js +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.js +1 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +1 -1
- package/lib/exercises/math/geometry/vectors/fourthParallelogramPoint.js +1 -1
- package/lib/exercises/math/geometry/vectors/index.d.ts +4 -0
- package/lib/exercises/math/geometry/vectors/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/index.js +4 -0
- package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +1 -1
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +1 -1
- package/lib/exercises/math/geometry/vectors/traceOppositeVector.d.ts +10 -0
- package/lib/exercises/math/geometry/vectors/traceOppositeVector.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/traceOppositeVector.js +109 -0
- package/lib/exercises/math/geometry/vectors/traceVectorDifference.d.ts +11 -0
- package/lib/exercises/math/geometry/vectors/traceVectorDifference.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/traceVectorDifference.js +122 -0
- package/lib/exercises/math/geometry/vectors/traceVectorMultiple.d.ts +11 -0
- package/lib/exercises/math/geometry/vectors/traceVectorMultiple.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/traceVectorMultiple.js +114 -0
- package/lib/exercises/math/geometry/vectors/traceVectorSum.d.ts +11 -0
- package/lib/exercises/math/geometry/vectors/traceVectorSum.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/traceVectorSum.js +122 -0
- package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts +1 -0
- package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts.map +1 -1
- package/lib/exercises/utils/geogebra/toolBarConstructor.js +2 -2
- package/lib/geogebra/parsers/parseGGBPoints.js +1 -1
- package/lib/index.d.ts +22 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/CloudPoints.d.ts.map +1 -1
- package/lib/math/geometry/CloudPoints.js +1 -1
- package/lib/math/geometry/circle.d.ts +10 -0
- package/lib/math/geometry/circle.d.ts.map +1 -0
- package/lib/math/geometry/circle.js +33 -0
- package/lib/math/geometry/line.d.ts +1 -1
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +13 -8
- package/lib/math/geometry/point.d.ts +11 -2
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +30 -20
- package/lib/math/geometry/ray.d.ts.map +1 -1
- package/lib/math/geometry/ray.js +3 -1
- package/lib/math/geometry/segment.d.ts.map +1 -1
- package/lib/math/geometry/segment.js +3 -1
- package/lib/math/geometry/vector.d.ts +1 -0
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +3 -0
- package/lib/utils/alea/random.d.ts +1 -0
- package/lib/utils/alea/random.d.ts.map +1 -1
- package/lib/utils/alea/random.js +13 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { LineIdentifiers } from "../../../../math/geometry/line";
|
|
3
|
+
import { PointIdentifiers } from "../../../../math/geometry/point";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
point: PointIdentifiers;
|
|
6
|
+
line: LineIdentifiers;
|
|
7
|
+
};
|
|
8
|
+
export declare const buildPointFromAxialSymetry: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=buildPointFromAxialSymetry.d.ts.map
|
package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildPointFromAxialSymetry.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAGL,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,gBAAgB,CAAC;IACxB,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AAiGF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildPointFromAxialSymetry = void 0;
|
|
4
|
+
const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolBarConstructor");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
|
|
7
|
+
const ggbPointToCoords_1 = require("../../../../geogebra/parsers/ggbPointToCoords");
|
|
8
|
+
const parseGGBPoints_1 = require("../../../../geogebra/parsers/parseGGBPoints");
|
|
9
|
+
const circle_1 = require("../../../../math/geometry/circle");
|
|
10
|
+
const line_1 = require("../../../../math/geometry/line");
|
|
11
|
+
const point_1 = require("../../../../math/geometry/point");
|
|
12
|
+
const getInstruction = (identifiers) => {
|
|
13
|
+
return `Placer le point $A'$, symétrique du point $A$ par rapport à la droite $d$.`;
|
|
14
|
+
};
|
|
15
|
+
// const getHint : GetHint<Identifiers> = (identifiers)=>{
|
|
16
|
+
// }
|
|
17
|
+
// const getCorrection : GetCorrection<Identifiers> = (identifiers)=>{
|
|
18
|
+
// }
|
|
19
|
+
const getSolutionPoint = (identifiers) => {
|
|
20
|
+
const point = point_1.PointConstructor.fromIdentifiers(identifiers.point);
|
|
21
|
+
const line = line_1.LineConstructor.fromIdentifiers(identifiers.line);
|
|
22
|
+
return point.axialSymetric(line, "A'");
|
|
23
|
+
};
|
|
24
|
+
const getGGBAnswer = (identifiers) => {
|
|
25
|
+
const point = point_1.PointConstructor.fromIdentifiers(identifiers.point);
|
|
26
|
+
const sol = getSolutionPoint(identifiers);
|
|
27
|
+
const perp = new line_1.Line(point, sol);
|
|
28
|
+
const center = point.midpoint(sol);
|
|
29
|
+
const circle = new circle_1.Circle(center, point, "C");
|
|
30
|
+
return [
|
|
31
|
+
...sol.toGGBCommand(),
|
|
32
|
+
...perp.toGGBCommands(false),
|
|
33
|
+
...circle.toGGBCommands(false),
|
|
34
|
+
];
|
|
35
|
+
};
|
|
36
|
+
const getStudentGGBOptions = (identifiers) => {
|
|
37
|
+
const point = point_1.PointConstructor.fromIdentifiers(identifiers.point);
|
|
38
|
+
const line = line_1.LineConstructor.fromIdentifiers(identifiers.line);
|
|
39
|
+
const commands = [
|
|
40
|
+
...point.toGGBCommand(),
|
|
41
|
+
...line.toGGBCommands(false, {
|
|
42
|
+
showLabel: true,
|
|
43
|
+
}),
|
|
44
|
+
];
|
|
45
|
+
const sol = getSolutionPoint(identifiers);
|
|
46
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
47
|
+
commands,
|
|
48
|
+
hideAxes: true,
|
|
49
|
+
hideGrid: true,
|
|
50
|
+
customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
|
|
51
|
+
orthogonal: true,
|
|
52
|
+
circleTwoPoints: true,
|
|
53
|
+
point: true,
|
|
54
|
+
intersect: true,
|
|
55
|
+
}),
|
|
56
|
+
});
|
|
57
|
+
return ggb.getOptions({
|
|
58
|
+
coords: ggb.getCoordsForPoints([point, sol]),
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
|
|
62
|
+
const studentAns = ans.filter((c) => !["A"].includes(c[0]));
|
|
63
|
+
const points = (0, parseGGBPoints_1.parseGGBPoints)(studentAns)
|
|
64
|
+
.map((p) => (0, ggbPointToCoords_1.ggbPointToCoords)(p))
|
|
65
|
+
.map((coords) => new point_1.Point("K", coords.x, coords.y));
|
|
66
|
+
if (!points.length)
|
|
67
|
+
return false;
|
|
68
|
+
const solution = getSolutionPoint(identifiers);
|
|
69
|
+
if (points.some((p) => p.distanceTo(solution) < 0.001))
|
|
70
|
+
return true;
|
|
71
|
+
return false;
|
|
72
|
+
};
|
|
73
|
+
const getBuildPointFromAxialSymetryQuestion = () => {
|
|
74
|
+
const linePoints = point_1.PointConstructor.randomDifferent(2, {
|
|
75
|
+
names: ["B", "C"],
|
|
76
|
+
});
|
|
77
|
+
const line = new line_1.Line(linePoints[0], linePoints[1], "d");
|
|
78
|
+
const point = point_1.PointConstructor.random("A");
|
|
79
|
+
const identifiers = {
|
|
80
|
+
point: point.toIdentifiers(),
|
|
81
|
+
line: line.toIdentifiers(),
|
|
82
|
+
};
|
|
83
|
+
const question = {
|
|
84
|
+
ggbAnswer: getGGBAnswer(identifiers),
|
|
85
|
+
instruction: getInstruction(identifiers),
|
|
86
|
+
studentGgbOptions: getStudentGGBOptions(identifiers),
|
|
87
|
+
identifiers,
|
|
88
|
+
// hint: getHint(identifiers),
|
|
89
|
+
// correction: getCorrection(identifiers)
|
|
90
|
+
};
|
|
91
|
+
return question;
|
|
92
|
+
};
|
|
93
|
+
exports.buildPointFromAxialSymetry = {
|
|
94
|
+
id: "buildPointFromAxialSymetry",
|
|
95
|
+
label: "Construire le symétrique d'un point par rapport à une droite",
|
|
96
|
+
isSingleStep: true,
|
|
97
|
+
generator: (nb, opts) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getBuildPointFromAxialSymetryQuestion(opts), nb),
|
|
98
|
+
ggbTimer: 60,
|
|
99
|
+
isGGBAnswerValid,
|
|
100
|
+
subject: "Mathématiques",
|
|
101
|
+
// getHint,
|
|
102
|
+
getInstruction,
|
|
103
|
+
// getCorrection,
|
|
104
|
+
getGGBAnswer,
|
|
105
|
+
getStudentGGBOptions,
|
|
106
|
+
answerType: "GGB",
|
|
107
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidianConstructions/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/euclidianConstructions/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC"}
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./buildMediatriceWithCompass"), exports);
|
|
18
18
|
__exportStar(require("./buildTriangleWithSizes"), exports);
|
|
19
19
|
__exportStar(require("./pointImageFromTranslation"), exports);
|
|
20
|
+
__exportStar(require("./buildPointFromAxialSymetry"), exports);
|
|
@@ -69,7 +69,7 @@ const getPointImageFromTranslationQuestion = (opts) => {
|
|
|
69
69
|
const points = [];
|
|
70
70
|
for (let i = 0; i < 4; i++) {
|
|
71
71
|
const name = String.fromCharCode(65 + i);
|
|
72
|
-
const newPoint = (0, doWhile_1.doWhile)(() => point_1.PointConstructor.random(name, -4, 5), (p) => points.some((p2) => p.
|
|
72
|
+
const newPoint = (0, doWhile_1.doWhile)(() => point_1.PointConstructor.random(name, -4, 5), (p) => points.some((p2) => p.distanceTo(p2) < 2));
|
|
73
73
|
points.push(newPoint);
|
|
74
74
|
}
|
|
75
75
|
const startPoint = (0, random_1.random)(points).name;
|
|
@@ -10,7 +10,7 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
|
10
10
|
const coinFlip_1 = require("../../../../utils/alea/coinFlip");
|
|
11
11
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
12
12
|
const getAlignementViaColinearityQuestion = () => {
|
|
13
|
-
const points = point_1.PointConstructor.randomDifferent(["A", "B"]);
|
|
13
|
+
const points = point_1.PointConstructor.randomDifferent(2, { names: ["A", "B"] });
|
|
14
14
|
const AB = vector_1.VectorConstructor.fromPoints(points[0], points[1]);
|
|
15
15
|
let C;
|
|
16
16
|
const isAligned = (0, coinFlip_1.coinFlip)();
|
|
@@ -10,7 +10,7 @@ const randint_1 = require("../../../../math/utils/random/randint");
|
|
|
10
10
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
11
11
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
12
12
|
const getFourthParallelogramPointQuestion = () => {
|
|
13
|
-
const points = point_1.PointConstructor.randomDifferent(["A", "B"]);
|
|
13
|
+
const points = point_1.PointConstructor.randomDifferent(2, { names: ["A", "B"] });
|
|
14
14
|
const AB = vector_1.VectorConstructor.fromPoints(points[0], points[1]);
|
|
15
15
|
let D;
|
|
16
16
|
do {
|
|
@@ -13,4 +13,8 @@ export * from "./vectorNormCalculation";
|
|
|
13
13
|
export * from "./lineFromDirectorVector";
|
|
14
14
|
export * from "./drawAVectorInGGB";
|
|
15
15
|
export * from "./scalarProduct";
|
|
16
|
+
export * from "./traceVectorSum";
|
|
17
|
+
export * from "./traceVectorDifference";
|
|
18
|
+
export * from "./traceOppositeVector";
|
|
19
|
+
export * from "./traceVectorMultiple";
|
|
16
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
|
|
@@ -29,3 +29,7 @@ __exportStar(require("./vectorNormCalculation"), exports);
|
|
|
29
29
|
__exportStar(require("./lineFromDirectorVector"), exports);
|
|
30
30
|
__exportStar(require("./drawAVectorInGGB"), exports);
|
|
31
31
|
__exportStar(require("./scalarProduct"), exports);
|
|
32
|
+
__exportStar(require("./traceVectorSum"), exports);
|
|
33
|
+
__exportStar(require("./traceVectorDifference"), exports);
|
|
34
|
+
__exportStar(require("./traceOppositeVector"), exports);
|
|
35
|
+
__exportStar(require("./traceVectorMultiple"), exports);
|
|
@@ -13,7 +13,7 @@ const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
|
13
13
|
const getParalellismViaColinearityQuestion = () => {
|
|
14
14
|
let points = [];
|
|
15
15
|
do {
|
|
16
|
-
points = point_1.PointConstructor.randomDifferent(["A", "B"]);
|
|
16
|
+
points = point_1.PointConstructor.randomDifferent(2, { names: ["A", "B"] });
|
|
17
17
|
} while (points[0].x.equals(points[1].x));
|
|
18
18
|
const line = new line_1.Line(points[0], points[1]);
|
|
19
19
|
let C;
|
|
@@ -8,7 +8,7 @@ const vector_1 = require("../../../../math/geometry/vector");
|
|
|
8
8
|
const coinFlip_1 = require("../../../../utils/alea/coinFlip");
|
|
9
9
|
const shuffle_1 = require("../../../../utils/alea/shuffle");
|
|
10
10
|
const getParallelogramViaEqualVectorsQuestion = () => {
|
|
11
|
-
const points = point_1.PointConstructor.randomDifferent(["A", "B"]);
|
|
11
|
+
const points = point_1.PointConstructor.randomDifferent(2, { names: ["A", "B"] });
|
|
12
12
|
const AB = vector_1.VectorConstructor.fromPoints(points[0], points[1]);
|
|
13
13
|
let D;
|
|
14
14
|
do {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
points: PointIdentifiers[];
|
|
5
|
+
startPointIndex: number;
|
|
6
|
+
vectorPointsIndexes: number[];
|
|
7
|
+
};
|
|
8
|
+
export declare const traceOppositeVector: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=traceOppositeVector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traceOppositeVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/traceOppositeVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAGL,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAOnC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B,CAAC;AAqHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAgBrD,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.traceOppositeVector = void 0;
|
|
4
|
+
const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolBarConstructor");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
|
|
7
|
+
const ggbPointToCoords_1 = require("../../../../geogebra/parsers/ggbPointToCoords");
|
|
8
|
+
const parseGGBPoints_1 = require("../../../../geogebra/parsers/parseGGBPoints");
|
|
9
|
+
const point_1 = require("../../../../math/geometry/point");
|
|
10
|
+
const vector_1 = require("../../../../math/geometry/vector");
|
|
11
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
12
|
+
const random_1 = require("../../../../utils/alea/random");
|
|
13
|
+
const getSolutionPoint = (identifiers) => {
|
|
14
|
+
const points = identifiers.points.map(point_1.PointConstructor.fromIdentifiers);
|
|
15
|
+
const origin = points[identifiers.startPointIndex];
|
|
16
|
+
const vec = vector_1.VectorConstructor.fromPoints(points[identifiers.vectorPointsIndexes[0]], points[identifiers.vectorPointsIndexes[1]]);
|
|
17
|
+
return vec.opposite().getEndPoint(origin, "K");
|
|
18
|
+
};
|
|
19
|
+
const getInstruction = (identifiers) => {
|
|
20
|
+
const { startPointIndex, vectorPointsIndexes } = identifiers;
|
|
21
|
+
const origin = identifiers.points[startPointIndex].name;
|
|
22
|
+
const vec = `${identifiers.points[vectorPointsIndexes[0]].name}${identifiers.points[vectorPointsIndexes[1]].name}`;
|
|
23
|
+
return `Placer le point $K$ tel que :
|
|
24
|
+
|
|
25
|
+
$$
|
|
26
|
+
\\overrightarrow{${origin}K} = -\\overrightarrow{${vec}}
|
|
27
|
+
$$`;
|
|
28
|
+
};
|
|
29
|
+
// const getHint: GetHint<Identifiers> = (identifiers) => {};
|
|
30
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
|
|
31
|
+
const getGGBAnswer = (identifiers) => {
|
|
32
|
+
return getSolutionPoint(identifiers).toGGBCommand();
|
|
33
|
+
};
|
|
34
|
+
const getStudentGGBOptions = (identifiers) => {
|
|
35
|
+
const commands = identifiers.points.flatMap((p) => point_1.PointConstructor.fromIdentifiers(p).toGGBCommand());
|
|
36
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
37
|
+
commands,
|
|
38
|
+
customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
|
|
39
|
+
point: true,
|
|
40
|
+
}),
|
|
41
|
+
hideAxes: true,
|
|
42
|
+
});
|
|
43
|
+
const points = identifiers.points.map((p) => point_1.PointConstructor.fromIdentifiers(p));
|
|
44
|
+
const solutionPoint = getSolutionPoint(identifiers);
|
|
45
|
+
return ggb.getOptions({
|
|
46
|
+
coords: ggb.getCoordsForPoints([...points, solutionPoint]),
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
|
|
50
|
+
const studentAns = ans.filter((c) => !["A", "B", "C"].includes(c[0]));
|
|
51
|
+
if (studentAns.length !== 1)
|
|
52
|
+
return false;
|
|
53
|
+
const solutionPoint = getSolutionPoint(identifiers);
|
|
54
|
+
const pointCoords = (0, parseGGBPoints_1.parseGGBPoints)(studentAns).map((p) => (0, ggbPointToCoords_1.ggbPointToCoords)(p));
|
|
55
|
+
if (pointCoords.length !== 1)
|
|
56
|
+
return false;
|
|
57
|
+
return (new point_1.Point("K", pointCoords[0].x, pointCoords[0].y).distanceTo(solutionPoint) < 1);
|
|
58
|
+
};
|
|
59
|
+
const getTraceOppositeVectorQuestion = () => {
|
|
60
|
+
const names = ["A", "B", "C"];
|
|
61
|
+
let points = [];
|
|
62
|
+
let startPointIndex;
|
|
63
|
+
let vectorPointsIndexes;
|
|
64
|
+
while (true) {
|
|
65
|
+
points = [];
|
|
66
|
+
points.push(...point_1.PointConstructor.randomDifferent(3, {
|
|
67
|
+
minDistance: 2,
|
|
68
|
+
names,
|
|
69
|
+
minDistanceToOrigin: 3,
|
|
70
|
+
}));
|
|
71
|
+
startPointIndex = (0, randint_1.randint)(0, names.length);
|
|
72
|
+
vectorPointsIndexes = (0, random_1.randomMany)([0, 1, 2], 2);
|
|
73
|
+
const vec = vector_1.VectorConstructor.fromPoints(points[vectorPointsIndexes[0]], points[vectorPointsIndexes[1]]);
|
|
74
|
+
const endPoint = vec.opposite().getEndPoint(points[startPointIndex], "K");
|
|
75
|
+
if (endPoint.distanceTo(new point_1.Point("O", 0, 0)) > 10 ||
|
|
76
|
+
points.some((p) => p.equals(endPoint)))
|
|
77
|
+
continue;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
const identifiers = {
|
|
81
|
+
vectorPointsIndexes,
|
|
82
|
+
points: points.map((p) => p.toIdentifiers()),
|
|
83
|
+
startPointIndex,
|
|
84
|
+
};
|
|
85
|
+
const question = {
|
|
86
|
+
ggbAnswer: getGGBAnswer(identifiers),
|
|
87
|
+
instruction: getInstruction(identifiers),
|
|
88
|
+
studentGgbOptions: getStudentGGBOptions(identifiers),
|
|
89
|
+
identifiers,
|
|
90
|
+
// hint: getHint(identifiers),
|
|
91
|
+
// correction: getCorrection(identifiers),
|
|
92
|
+
};
|
|
93
|
+
return question;
|
|
94
|
+
};
|
|
95
|
+
exports.traceOppositeVector = {
|
|
96
|
+
id: "traceOppositeVector",
|
|
97
|
+
label: "Placer un point $K$ tel que $\\overrightarrow{AK} = -\\overrightarrow{BC}$",
|
|
98
|
+
isSingleStep: true,
|
|
99
|
+
generator: (nb, opts) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getTraceOppositeVectorQuestion(opts), nb),
|
|
100
|
+
ggbTimer: 60,
|
|
101
|
+
isGGBAnswerValid,
|
|
102
|
+
subject: "Mathématiques",
|
|
103
|
+
// getHint,
|
|
104
|
+
getInstruction,
|
|
105
|
+
// getCorrection,
|
|
106
|
+
getGGBAnswer,
|
|
107
|
+
getStudentGGBOptions,
|
|
108
|
+
answerType: "GGB",
|
|
109
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
points: PointIdentifiers[];
|
|
5
|
+
startPointIndex: number;
|
|
6
|
+
firstVectorPointsIndexes: number[];
|
|
7
|
+
secondVectorPointsIndexes: number[];
|
|
8
|
+
};
|
|
9
|
+
export declare const traceVectorDifference: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=traceVectorDifference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traceVectorDifference.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/traceVectorDifference.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAGL,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAMnC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,yBAAyB,EAAE,MAAM,EAAE,CAAC;CACrC,CAAC;AAgJF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.traceVectorDifference = void 0;
|
|
4
|
+
const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolBarConstructor");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
|
|
7
|
+
const ggbPointToCoords_1 = require("../../../../geogebra/parsers/ggbPointToCoords");
|
|
8
|
+
const parseGGBPoints_1 = require("../../../../geogebra/parsers/parseGGBPoints");
|
|
9
|
+
const point_1 = require("../../../../math/geometry/point");
|
|
10
|
+
const vector_1 = require("../../../../math/geometry/vector");
|
|
11
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
12
|
+
const random_1 = require("../../../../utils/alea/random");
|
|
13
|
+
const doWhile_1 = require("../../../../utils/doWhile");
|
|
14
|
+
const getSolutionPoint = (identifiers) => {
|
|
15
|
+
const points = identifiers.points.map(point_1.PointConstructor.fromIdentifiers);
|
|
16
|
+
const origin = points[identifiers.startPointIndex];
|
|
17
|
+
const vecs = [
|
|
18
|
+
vector_1.VectorConstructor.fromPoints(points[identifiers.firstVectorPointsIndexes[0]], points[identifiers.firstVectorPointsIndexes[1]]),
|
|
19
|
+
vector_1.VectorConstructor.fromPoints(points[identifiers.secondVectorPointsIndexes[0]], points[identifiers.secondVectorPointsIndexes[1]]),
|
|
20
|
+
];
|
|
21
|
+
return vecs[0].substract(vecs[1]).getEndPoint(origin, "K");
|
|
22
|
+
};
|
|
23
|
+
const getInstruction = (identifiers) => {
|
|
24
|
+
const { startPointIndex, firstVectorPointsIndexes, secondVectorPointsIndexes, } = identifiers;
|
|
25
|
+
const origin = identifiers.points[startPointIndex].name;
|
|
26
|
+
const firstVec = `${identifiers.points[firstVectorPointsIndexes[0]].name}${identifiers.points[firstVectorPointsIndexes[1]].name}`;
|
|
27
|
+
const secondVec = `${identifiers.points[secondVectorPointsIndexes[0]].name}${identifiers.points[secondVectorPointsIndexes[1]].name}`;
|
|
28
|
+
return `Placer le point $K$ tel que :
|
|
29
|
+
|
|
30
|
+
$$
|
|
31
|
+
\\overrightarrow{${origin}K} = \\overrightarrow{${firstVec}} - \\overrightarrow{${secondVec}}
|
|
32
|
+
$$`;
|
|
33
|
+
};
|
|
34
|
+
// const getHint: GetHint<Identifiers> = (identifiers) => {};
|
|
35
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
|
|
36
|
+
const getGGBAnswer = (identifiers) => {
|
|
37
|
+
return getSolutionPoint(identifiers).toGGBCommand();
|
|
38
|
+
};
|
|
39
|
+
const getStudentGGBOptions = (identifiers) => {
|
|
40
|
+
const commands = identifiers.points.flatMap((p) => point_1.PointConstructor.fromIdentifiers(p).toGGBCommand());
|
|
41
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
42
|
+
commands,
|
|
43
|
+
customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
|
|
44
|
+
point: true,
|
|
45
|
+
}),
|
|
46
|
+
hideAxes: true,
|
|
47
|
+
});
|
|
48
|
+
const points = identifiers.points.map((p) => point_1.PointConstructor.fromIdentifiers(p));
|
|
49
|
+
const solutionPoint = getSolutionPoint(identifiers);
|
|
50
|
+
return ggb.getOptions({
|
|
51
|
+
coords: ggb.getCoordsForPoints([...points, solutionPoint]),
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
|
|
55
|
+
const studentAns = ans.filter((c) => !["A", "B", "C", "D"].includes(c[0]));
|
|
56
|
+
if (studentAns.length !== 1)
|
|
57
|
+
return false;
|
|
58
|
+
const solutionPoint = getSolutionPoint(identifiers);
|
|
59
|
+
const pointCoords = (0, parseGGBPoints_1.parseGGBPoints)(studentAns).map((p) => (0, ggbPointToCoords_1.ggbPointToCoords)(p));
|
|
60
|
+
if (pointCoords.length !== 1)
|
|
61
|
+
return false;
|
|
62
|
+
return (new point_1.Point("K", pointCoords[0].x, pointCoords[0].y).distanceTo(solutionPoint) < 1);
|
|
63
|
+
};
|
|
64
|
+
const getTraceVectorDifferenceQuestion = () => {
|
|
65
|
+
const names = ["A", "B", "C", "D"];
|
|
66
|
+
let points = [];
|
|
67
|
+
let startPointIndex;
|
|
68
|
+
let firstVectorPointsIndexes;
|
|
69
|
+
let secondVectorPointsIndexes;
|
|
70
|
+
while (true) {
|
|
71
|
+
points = [];
|
|
72
|
+
points.push(...point_1.PointConstructor.randomDifferent(4, {
|
|
73
|
+
minDistance: 2,
|
|
74
|
+
names,
|
|
75
|
+
minDistanceToOrigin: 3,
|
|
76
|
+
}));
|
|
77
|
+
startPointIndex = (0, randint_1.randint)(0, names.length);
|
|
78
|
+
firstVectorPointsIndexes = (0, random_1.randomMany)([0, 1, 2, 3], 2);
|
|
79
|
+
secondVectorPointsIndexes = (0, doWhile_1.doWhile)(() => (0, random_1.randomMany)([0, 1, 2, 3], 2), (arr) => arr[0] === firstVectorPointsIndexes[0] &&
|
|
80
|
+
arr[1] === firstVectorPointsIndexes[1]);
|
|
81
|
+
//AC = AB+BC
|
|
82
|
+
const firstVec = vector_1.VectorConstructor.fromPoints(points[firstVectorPointsIndexes[0]], points[firstVectorPointsIndexes[1]]);
|
|
83
|
+
const second = vector_1.VectorConstructor.fromPoints(points[secondVectorPointsIndexes[0]], points[secondVectorPointsIndexes[1]]);
|
|
84
|
+
const endPoint = firstVec
|
|
85
|
+
.substract(second)
|
|
86
|
+
.getEndPoint(points[startPointIndex], "K");
|
|
87
|
+
if (endPoint.distanceTo(new point_1.Point("O", 0, 0)) > 10 ||
|
|
88
|
+
points.some((p) => p.equals(endPoint)))
|
|
89
|
+
continue;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
const identifiers = {
|
|
93
|
+
firstVectorPointsIndexes,
|
|
94
|
+
points: points.map((p) => p.toIdentifiers()),
|
|
95
|
+
secondVectorPointsIndexes,
|
|
96
|
+
startPointIndex,
|
|
97
|
+
};
|
|
98
|
+
const question = {
|
|
99
|
+
ggbAnswer: getGGBAnswer(identifiers),
|
|
100
|
+
instruction: getInstruction(identifiers),
|
|
101
|
+
studentGgbOptions: getStudentGGBOptions(identifiers),
|
|
102
|
+
identifiers,
|
|
103
|
+
// hint: getHint(identifiers),
|
|
104
|
+
// correction: getCorrection(identifiers),
|
|
105
|
+
};
|
|
106
|
+
return question;
|
|
107
|
+
};
|
|
108
|
+
exports.traceVectorDifference = {
|
|
109
|
+
id: "traceVectorDifference",
|
|
110
|
+
label: "Placer un point défini par une différence de vecteurs",
|
|
111
|
+
isSingleStep: true,
|
|
112
|
+
generator: (nb, opts) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getTraceVectorDifferenceQuestion(opts), nb),
|
|
113
|
+
ggbTimer: 60,
|
|
114
|
+
isGGBAnswerValid,
|
|
115
|
+
subject: "Mathématiques",
|
|
116
|
+
// getHint,
|
|
117
|
+
getInstruction,
|
|
118
|
+
// getCorrection,
|
|
119
|
+
getGGBAnswer,
|
|
120
|
+
getStudentGGBOptions,
|
|
121
|
+
answerType: "GGB",
|
|
122
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
points: PointIdentifiers[];
|
|
5
|
+
startPointIndex: number;
|
|
6
|
+
vectorPointsIndexes: number[];
|
|
7
|
+
coeff: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const traceVectorMultiple: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=traceVectorMultiple.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traceVectorMultiple.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/traceVectorMultiple.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAGL,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAOnC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA0HF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAgBrD,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.traceVectorMultiple = void 0;
|
|
4
|
+
const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolBarConstructor");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const geogebraConstructor_1 = require("../../../../geogebra/geogebraConstructor");
|
|
7
|
+
const ggbPointToCoords_1 = require("../../../../geogebra/parsers/ggbPointToCoords");
|
|
8
|
+
const parseGGBPoints_1 = require("../../../../geogebra/parsers/parseGGBPoints");
|
|
9
|
+
const point_1 = require("../../../../math/geometry/point");
|
|
10
|
+
const vector_1 = require("../../../../math/geometry/vector");
|
|
11
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
12
|
+
const random_1 = require("../../../../utils/alea/random");
|
|
13
|
+
const getSolutionPoint = (identifiers) => {
|
|
14
|
+
const points = identifiers.points.map(point_1.PointConstructor.fromIdentifiers);
|
|
15
|
+
const origin = points[identifiers.startPointIndex];
|
|
16
|
+
const vec = vector_1.VectorConstructor.fromPoints(points[identifiers.vectorPointsIndexes[0]], points[identifiers.vectorPointsIndexes[1]]);
|
|
17
|
+
return vec.times(identifiers.coeff.toTree()).getEndPoint(origin, "K");
|
|
18
|
+
};
|
|
19
|
+
const getInstruction = (identifiers) => {
|
|
20
|
+
const { startPointIndex, vectorPointsIndexes } = identifiers;
|
|
21
|
+
const origin = identifiers.points[startPointIndex].name;
|
|
22
|
+
const vec = `${identifiers.points[vectorPointsIndexes[0]].name}${identifiers.points[vectorPointsIndexes[1]].name}`;
|
|
23
|
+
return `Placer le point $K$ tel que :
|
|
24
|
+
|
|
25
|
+
$$
|
|
26
|
+
\\overrightarrow{${origin}K} = ${identifiers.coeff}\\overrightarrow{${vec}}
|
|
27
|
+
$$`;
|
|
28
|
+
};
|
|
29
|
+
// const getHint: GetHint<Identifiers> = (identifiers) => {};
|
|
30
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
|
|
31
|
+
const getGGBAnswer = (identifiers) => {
|
|
32
|
+
return getSolutionPoint(identifiers).toGGBCommand();
|
|
33
|
+
};
|
|
34
|
+
const getStudentGGBOptions = (identifiers) => {
|
|
35
|
+
const commands = identifiers.points.flatMap((p) => point_1.PointConstructor.fromIdentifiers(p).toGGBCommand());
|
|
36
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
37
|
+
commands,
|
|
38
|
+
customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
|
|
39
|
+
point: true,
|
|
40
|
+
}),
|
|
41
|
+
hideAxes: true,
|
|
42
|
+
});
|
|
43
|
+
const points = identifiers.points.map((p) => point_1.PointConstructor.fromIdentifiers(p));
|
|
44
|
+
const solutionPoint = getSolutionPoint(identifiers);
|
|
45
|
+
return ggb.getOptions({
|
|
46
|
+
coords: ggb.getCoordsForPoints([...points, solutionPoint]),
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
const isGGBAnswerValid = (ans, { ggbAnswer, ...identifiers }) => {
|
|
50
|
+
const studentAns = ans.filter((c) => !["A", "B", "C"].includes(c[0]));
|
|
51
|
+
if (studentAns.length !== 1)
|
|
52
|
+
return false;
|
|
53
|
+
const solutionPoint = getSolutionPoint(identifiers);
|
|
54
|
+
const pointCoords = (0, parseGGBPoints_1.parseGGBPoints)(studentAns).map((p) => (0, ggbPointToCoords_1.ggbPointToCoords)(p));
|
|
55
|
+
if (pointCoords.length !== 1)
|
|
56
|
+
return false;
|
|
57
|
+
return (new point_1.Point("K", pointCoords[0].x, pointCoords[0].y).distanceTo(solutionPoint) < 1);
|
|
58
|
+
};
|
|
59
|
+
const getTraceVectorMultipleQuestion = () => {
|
|
60
|
+
const names = ["A", "B", "C"];
|
|
61
|
+
let points = [];
|
|
62
|
+
let startPointIndex;
|
|
63
|
+
let vectorPointsIndexes;
|
|
64
|
+
let coeff = 0;
|
|
65
|
+
while (true) {
|
|
66
|
+
points = [];
|
|
67
|
+
coeff = (0, random_1.random)([-3, -2, 2, 3]);
|
|
68
|
+
points.push(...point_1.PointConstructor.randomDifferent(3, {
|
|
69
|
+
minDistance: 2,
|
|
70
|
+
names,
|
|
71
|
+
minDistanceToOrigin: 3,
|
|
72
|
+
}));
|
|
73
|
+
startPointIndex = (0, randint_1.randint)(0, names.length);
|
|
74
|
+
vectorPointsIndexes = (0, random_1.randomMany)([0, 1, 2], 2);
|
|
75
|
+
const vec = vector_1.VectorConstructor.fromPoints(points[vectorPointsIndexes[0]], points[vectorPointsIndexes[1]]);
|
|
76
|
+
const endPoint = vec
|
|
77
|
+
.times(coeff.toTree())
|
|
78
|
+
.getEndPoint(points[startPointIndex], "K");
|
|
79
|
+
if (endPoint.distanceTo(new point_1.Point("O", 0, 0)) > 10 ||
|
|
80
|
+
points.some((p) => p.equals(endPoint)))
|
|
81
|
+
continue;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
const identifiers = {
|
|
85
|
+
vectorPointsIndexes,
|
|
86
|
+
points: points.map((p) => p.toIdentifiers()),
|
|
87
|
+
startPointIndex,
|
|
88
|
+
coeff,
|
|
89
|
+
};
|
|
90
|
+
const question = {
|
|
91
|
+
ggbAnswer: getGGBAnswer(identifiers),
|
|
92
|
+
instruction: getInstruction(identifiers),
|
|
93
|
+
studentGgbOptions: getStudentGGBOptions(identifiers),
|
|
94
|
+
identifiers,
|
|
95
|
+
// hint: getHint(identifiers),
|
|
96
|
+
// correction: getCorrection(identifiers),
|
|
97
|
+
};
|
|
98
|
+
return question;
|
|
99
|
+
};
|
|
100
|
+
exports.traceVectorMultiple = {
|
|
101
|
+
id: "traceVectorMultiple",
|
|
102
|
+
label: "Placer un point $M$ tel que $\\overrightarrow{AM} = k\\overrightarrow{BC}$",
|
|
103
|
+
isSingleStep: true,
|
|
104
|
+
generator: (nb, opts) => (0, getDistinctQuestions_1.getDistinctQuestions)(() => getTraceVectorMultipleQuestion(opts), nb),
|
|
105
|
+
ggbTimer: 60,
|
|
106
|
+
isGGBAnswerValid,
|
|
107
|
+
subject: "Mathématiques",
|
|
108
|
+
// getHint,
|
|
109
|
+
getInstruction,
|
|
110
|
+
// getCorrection,
|
|
111
|
+
getGGBAnswer,
|
|
112
|
+
getStudentGGBOptions,
|
|
113
|
+
answerType: "GGB",
|
|
114
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
points: PointIdentifiers[];
|
|
5
|
+
startPointIndex: number;
|
|
6
|
+
firstVectorPointsIndexes: number[];
|
|
7
|
+
secondVectorPointsIndexes: number[];
|
|
8
|
+
};
|
|
9
|
+
export declare const traceVectorSum: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=traceVectorSum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traceVectorSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/traceVectorSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAGL,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAMnC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,yBAAyB,EAAE,MAAM,EAAE,CAAC;CACrC,CAAC;AAgJF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|