math-exercises 3.0.152 → 3.0.154
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/exercise.d.ts +2 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/square/equationSimpleSquare.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSimpleSquare.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSimpleSquare.js +183 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.js +173 -0
- package/lib/exercises/math/calculLitteral/equation/square/index.d.ts +3 -0
- package/lib/exercises/math/calculLitteral/equation/square/index.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/square/index.js +2 -0
- package/lib/exercises/math/functions/sqrt/squareRootCalculation.d.ts.map +1 -1
- package/lib/exercises/math/functions/sqrt/squareRootCalculation.js +4 -2
- package/lib/exercises/math/geometry/euclidian/homothetyFactorFromPoints.d.ts +15 -0
- package/lib/exercises/math/geometry/euclidian/homothetyFactorFromPoints.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/homothetyFactorFromPoints.js +301 -0
- package/lib/exercises/math/geometry/euclidian/index.d.ts +7 -0
- package/lib/exercises/math/geometry/euclidian/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/index.js +7 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.d.ts +21 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.js +406 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.d.ts +18 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.js +315 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromTranslation.d.ts +20 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromTranslation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/pinPointFromTranslation.js +314 -0
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.d.ts +18 -0
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.js +387 -0
- package/lib/exercises/math/geometry/euclidian/recognizeAngleFromRotation.d.ts +18 -0
- package/lib/exercises/math/geometry/euclidian/recognizeAngleFromRotation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/recognizeAngleFromRotation.js +309 -0
- package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.d.ts +17 -0
- package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.js +301 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.js +22 -8
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromCentralSymmetry.d.ts +11 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromCentralSymmetry.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromCentralSymmetry.js +169 -0
- package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/index.js +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.d.ts +16 -0
- package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.js +309 -0
- package/lib/exercises/math/probaStat/basicProbas/index.js +1 -0
- package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.d.ts +11 -0
- package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.js +136 -0
- package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.js +3 -79
- package/lib/exercises/math/probaStat/stats1var/averageWithClasses.d.ts +9 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithClasses.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithClasses.js +140 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithTableWithContext.d.ts +8 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithTableWithContext.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/averageWithTableWithContext.js +113 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
- package/lib/exercises/math/probaStat/stats1var/medianWithList.js +4 -4
- package/lib/exercises/math/scratch/index.d.ts +3 -0
- package/lib/exercises/math/scratch/index.d.ts.map +1 -1
- package/lib/exercises/math/scratch/index.js +3 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex.d.ts +13 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex.js +189 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex2.d.ts +23 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex2.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchListElemAtIndex2.js +207 -0
- package/lib/exercises/math/scratch/scratchListFilter.d.ts +13 -0
- package/lib/exercises/math/scratch/scratchListFilter.d.ts.map +1 -0
- package/lib/exercises/math/scratch/scratchListFilter.js +397 -0
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.js +347 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts +1 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/basis/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.js +3 -3
- package/lib/exercises/math/spaceGeometry/solids/index.d.ts +3 -0
- package/lib/exercises/math/spaceGeometry/solids/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/solids/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFrom3D.d.ts +15 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFrom3D.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFrom3D.js +440 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.js +1089 -0
- package/lib/exercises/math/spaceGeometry/sphere/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/sphere/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sphere/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/sphere/pickIsPointInSphereOrBall.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/sphere/pickIsPointInSphereOrBall.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sphere/pickIsPointInSphereOrBall.js +127 -0
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.js +390 -0
- package/lib/geogebra/geogebraConstructor.d.ts +2 -0
- package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
- package/lib/geogebra/geogebraConstructor.js +6 -0
- package/lib/geogebra/probas/probaWheelGGBCommands.d.ts +7 -0
- package/lib/geogebra/probas/probaWheelGGBCommands.d.ts.map +1 -0
- package/lib/geogebra/probas/probaWheelGGBCommands.js +79 -0
- package/lib/index.d.ts +171 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/point.d.ts +6 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +28 -0
- package/lib/server.js +4 -1
- package/lib/tree/nodes/equations/equalNode.d.ts +1 -1
- package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equalNode.js +0 -1
- package/lib/tree/utilities/nodeSimplifier.d.ts +1 -1
- package/lib/utils/arrays/arrayZip.d.ts +2 -0
- package/lib/utils/arrays/arrayZip.d.ts.map +1 -0
- package/lib/utils/arrays/arrayZip.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Point } from "../../math/geometry/point.js";
|
|
2
|
+
import { Vector } from "../../math/geometry/vector.js";
|
|
3
|
+
import { round } from "../../math/utils/round.js";
|
|
4
|
+
import { PiNode } from "../../tree/nodes/numbers/piNode.js";
|
|
5
|
+
import { add } from "../../tree/nodes/operators/addNode.js";
|
|
6
|
+
import { substract } from "../../tree/nodes/operators/substractNode.js";
|
|
7
|
+
import { colors, colorWithOpacity } from "../colors.js";
|
|
8
|
+
const createVector = (from, to, name, precision = 5) => {
|
|
9
|
+
return new Vector(name, round(substract(to.x, from.x).evaluate(), precision).toTree(), round(substract(to.y, from.y).evaluate(), precision).toTree());
|
|
10
|
+
};
|
|
11
|
+
const createPoint = (x, y, name, precision = 5) => {
|
|
12
|
+
return new Point(name, round(x, precision), round(y, precision));
|
|
13
|
+
};
|
|
14
|
+
const rotatePoint = (target, angle, center, name, precision = 2) => {
|
|
15
|
+
const vSrc = createVector(center, target, "vSrc", precision);
|
|
16
|
+
const vRotated = vSrc.rotate(angle, "vRotated");
|
|
17
|
+
return createPoint(add(center.x, vRotated.x).evaluate(), add(center.y, vRotated.y).evaluate(), name, precision);
|
|
18
|
+
};
|
|
19
|
+
const createPointWithWeights = (arrPointAndWeight) => {
|
|
20
|
+
return arrPointAndWeight.reduce((acc, [p, w]) => {
|
|
21
|
+
return new Point("acc", acc.x.evaluate() + w * p.x.evaluate(), acc.y.evaluate() + w * p.y.evaluate());
|
|
22
|
+
}, new Point("O", 0, 0));
|
|
23
|
+
};
|
|
24
|
+
export const probaWheelGGBCommands = (arrItem) => {
|
|
25
|
+
const radius = 12;
|
|
26
|
+
const point0 = new Point("O", 0, 0);
|
|
27
|
+
function createWheelItemGGBCommands(wheelItem, i, angleInDegreesSector) {
|
|
28
|
+
const angleInRadiansSector = (angleInDegreesSector * PiNode.evaluate()) / 180.0;
|
|
29
|
+
const point1Raw = new Point("P1", radius, 0);
|
|
30
|
+
const point2Raw = new Point("P2", radius * Math.cos(angleInRadiansSector), radius * Math.sin(angleInRadiansSector));
|
|
31
|
+
const angleInRadiansRotate = (2 * PiNode.evaluate() * (1.0 * i + 0.5)) / arrItem.length + //center wrt sector
|
|
32
|
+
(PiNode.evaluate() * 3.0) / 2.0; //put first sector on top
|
|
33
|
+
const [point1, point2] = [point1Raw, point2Raw].map((pointRaw) => {
|
|
34
|
+
return rotatePoint(pointRaw, -angleInRadiansRotate, point0, "rotated", 3);
|
|
35
|
+
});
|
|
36
|
+
const pointForLabel = createPointWithWeights([
|
|
37
|
+
[point0, 0.24],
|
|
38
|
+
[point1, 0.38],
|
|
39
|
+
[point2, 0.38],
|
|
40
|
+
]);
|
|
41
|
+
return [
|
|
42
|
+
//circular sector
|
|
43
|
+
`C_${i} = CircularSector(${point0.toMathString()}, ${point1.toMathString()}, ${point2.toMathString()})`,
|
|
44
|
+
`SetFixed(C_${i}, true, false)`,
|
|
45
|
+
`SetColor(C_${i}, "${colorWithOpacity(colors[wheelItem.indexColor], 80)}")`,
|
|
46
|
+
`SetLineThickness(C_${i}, 1)`,
|
|
47
|
+
//border
|
|
48
|
+
`Cb_${i} = CircularSector(${point0.toMathString()}, ${point1.toMathString()}, ${point2.toMathString()})`,
|
|
49
|
+
`SetFixed(Cb_${i}, true, false)`,
|
|
50
|
+
`SetColor(Cb_${i}, "#FF000000")`,
|
|
51
|
+
`SetLineThickness(Cb_${i}, 1)`,
|
|
52
|
+
//label
|
|
53
|
+
`L_${i} = Text("$\\large \\text{${wheelItem.value}}$", ${pointForLabel.toMathString()}, false, true, 0, 0)`,
|
|
54
|
+
`SetFixed(L_${i}, true, false)`,
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
return [
|
|
58
|
+
...arrItem.flatMap((wheelItem, i) => {
|
|
59
|
+
const angleInDegreesSector = 360.0 * (1.0 / arrItem.length);
|
|
60
|
+
const itemCommands = createWheelItemGGBCommands(wheelItem, i, angleInDegreesSector);
|
|
61
|
+
return [...itemCommands];
|
|
62
|
+
}),
|
|
63
|
+
//circle border
|
|
64
|
+
`C = Circle(${point0.toMathString()}, ${radius * 1.05})`,
|
|
65
|
+
`SetFixed(C, true, false)`,
|
|
66
|
+
//triangle
|
|
67
|
+
...(() => {
|
|
68
|
+
const pointTL = new Point("TL", -0.03 * radius, radius + 0.03 * radius);
|
|
69
|
+
const pointTR = new Point("TR", +0.03 * radius, radius + 0.03 * radius);
|
|
70
|
+
const pointB = new Point("TB", 0, radius - 0.03 * radius);
|
|
71
|
+
return [
|
|
72
|
+
`T = Polygon(${pointTL.toMathString()},${pointTR.toMathString()},${pointB.toMathString()})`,
|
|
73
|
+
`SetFilling(T, 1)`,
|
|
74
|
+
`SetColor(T, "#FF000000")`,
|
|
75
|
+
`SetFixed(T, true, false)`,
|
|
76
|
+
];
|
|
77
|
+
})(),
|
|
78
|
+
];
|
|
79
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -455,10 +455,6 @@ declare const mathExercises: (Exercise<{
|
|
|
455
455
|
affine3: import("./math/polynomials/generalAffine.js").GeneralAffineIdentifiers;
|
|
456
456
|
affine4?: import("./math/polynomials/generalAffine.js").GeneralAffineIdentifiers;
|
|
457
457
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
458
|
-
randNbr: number;
|
|
459
|
-
}, {
|
|
460
|
-
solutionType: string[];
|
|
461
|
-
}> | Exercise<{
|
|
462
458
|
a: number;
|
|
463
459
|
b: number;
|
|
464
460
|
c: number;
|
|
@@ -572,6 +568,15 @@ declare const mathExercises: (Exercise<{
|
|
|
572
568
|
b: number;
|
|
573
569
|
c: number;
|
|
574
570
|
d: number;
|
|
571
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
572
|
+
randNbr: number;
|
|
573
|
+
}, {
|
|
574
|
+
solutionType: string[];
|
|
575
|
+
}> | Exercise<{
|
|
576
|
+
a: number;
|
|
577
|
+
b: number;
|
|
578
|
+
c: number;
|
|
579
|
+
d: number;
|
|
575
580
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
576
581
|
a: number;
|
|
577
582
|
b: number;
|
|
@@ -2052,6 +2057,19 @@ declare const mathExercises: (Exercise<{
|
|
|
2052
2057
|
}, {
|
|
2053
2058
|
isPositiveFactorOnly: boolean;
|
|
2054
2059
|
factorTypes: string[];
|
|
2060
|
+
}> | Exercise<{
|
|
2061
|
+
pointsDict: Record<string, import("./math/geometry/point.js").PointIdentifiers>;
|
|
2062
|
+
namePointSrc: string;
|
|
2063
|
+
namePointCenter: string;
|
|
2064
|
+
instructionIndex: number;
|
|
2065
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2066
|
+
pointsDict: Record<string, import("./math/geometry/point.js").PointIdentifiers>;
|
|
2067
|
+
nameSrcPoint: string;
|
|
2068
|
+
nameDstPoint: string;
|
|
2069
|
+
factor: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2070
|
+
}, {
|
|
2071
|
+
isPositiveFactorOnly: boolean;
|
|
2072
|
+
factorTypes: string[];
|
|
2055
2073
|
}> | Exercise<{
|
|
2056
2074
|
type: number;
|
|
2057
2075
|
commands: string[];
|
|
@@ -2069,6 +2087,78 @@ declare const mathExercises: (Exercise<{
|
|
|
2069
2087
|
point: string;
|
|
2070
2088
|
line: string;
|
|
2071
2089
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2090
|
+
pointsDict: Record<string, import("./math/geometry/point.js").PointIdentifiers>;
|
|
2091
|
+
segments: string[];
|
|
2092
|
+
transformationIds: {
|
|
2093
|
+
type: string;
|
|
2094
|
+
point1: import("./math/geometry/point.js").PointIdentifiers;
|
|
2095
|
+
point2?: import("./math/geometry/point.js").PointIdentifiers;
|
|
2096
|
+
};
|
|
2097
|
+
namePointSrc: string;
|
|
2098
|
+
namePointDst: string;
|
|
2099
|
+
}, {
|
|
2100
|
+
isForceDstDifferentFromSrc: boolean;
|
|
2101
|
+
typeTransformation: string[];
|
|
2102
|
+
}> | Exercise<{
|
|
2103
|
+
pointsDict: Record<string, import("./math/geometry/point.js").PointIdentifiers>;
|
|
2104
|
+
segments: string[];
|
|
2105
|
+
transformationIds: {
|
|
2106
|
+
type: string;
|
|
2107
|
+
point1: import("./math/geometry/point.js").PointIdentifiers;
|
|
2108
|
+
angleInDegrees: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2109
|
+
};
|
|
2110
|
+
namePointSrc: string;
|
|
2111
|
+
namePointDst: string;
|
|
2112
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2113
|
+
pointsDict: Record<string, import("./math/geometry/point.js").PointIdentifiers>;
|
|
2114
|
+
segments: string[];
|
|
2115
|
+
transformationIds: {
|
|
2116
|
+
type: string;
|
|
2117
|
+
point1: import("./math/geometry/point.js").PointIdentifiers;
|
|
2118
|
+
angleInDegrees: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2119
|
+
};
|
|
2120
|
+
namePointSrc: string;
|
|
2121
|
+
namePointDst: string;
|
|
2122
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2123
|
+
pointsDict: Record<string, import("./math/geometry/point.js").PointIdentifiers>;
|
|
2124
|
+
segments: string[];
|
|
2125
|
+
transformationIds: {
|
|
2126
|
+
type: string;
|
|
2127
|
+
point1: import("./math/geometry/point.js").PointIdentifiers;
|
|
2128
|
+
angleInDegrees: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2129
|
+
};
|
|
2130
|
+
nameObjSrc: string;
|
|
2131
|
+
nameObjDst: string;
|
|
2132
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2133
|
+
pointsDict: Record<string, import("./math/geometry/point.js").PointIdentifiers>;
|
|
2134
|
+
segments: string[];
|
|
2135
|
+
transformationIds: {
|
|
2136
|
+
type: string;
|
|
2137
|
+
point1: import("./math/geometry/point.js").PointIdentifiers;
|
|
2138
|
+
point2?: import("./math/geometry/point.js").PointIdentifiers;
|
|
2139
|
+
};
|
|
2140
|
+
namePointSrc: string;
|
|
2141
|
+
namePointDst: string;
|
|
2142
|
+
}, {
|
|
2143
|
+
isCanMentionVectors: boolean;
|
|
2144
|
+
}> | Exercise<{
|
|
2145
|
+
pointsDict: Record<string, import("./math/geometry/point.js").PointIdentifiers>;
|
|
2146
|
+
nameCenterPoint: string;
|
|
2147
|
+
nameSrcPoint: string;
|
|
2148
|
+
nameDstPoint: string;
|
|
2149
|
+
}, {
|
|
2150
|
+
isPositiveFactorOnly: boolean;
|
|
2151
|
+
factorTypes: string[];
|
|
2152
|
+
}> | Exercise<{
|
|
2153
|
+
pointsDict: Record<string, import("./math/geometry/point.js").PointIdentifiers>;
|
|
2154
|
+
nameSrcPoint: string;
|
|
2155
|
+
nameDstPoint: string;
|
|
2156
|
+
factor: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2157
|
+
nameCenterPoint: string;
|
|
2158
|
+
}, {
|
|
2159
|
+
isPositiveFactorOnly: boolean;
|
|
2160
|
+
factorTypes: string[];
|
|
2161
|
+
}> | Exercise<{
|
|
2072
2162
|
startPoint: number[];
|
|
2073
2163
|
vector: number[];
|
|
2074
2164
|
askedPointCoords: number[];
|
|
@@ -2543,6 +2633,13 @@ declare const mathExercises: (Exercise<{
|
|
|
2543
2633
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2544
2634
|
randomValues: number[];
|
|
2545
2635
|
randomEffectives: number[];
|
|
2636
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2637
|
+
bounds: number[];
|
|
2638
|
+
situation: number;
|
|
2639
|
+
effectifs: number[];
|
|
2640
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2641
|
+
randomValues: number[];
|
|
2642
|
+
randomEffectives: number[];
|
|
2546
2643
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2547
2644
|
xValues: number[];
|
|
2548
2645
|
yValues: number[];
|
|
@@ -2949,6 +3046,14 @@ declare const mathExercises: (Exercise<{
|
|
|
2949
3046
|
h: number;
|
|
2950
3047
|
askedPoint: string;
|
|
2951
3048
|
givenPoints: string[];
|
|
3049
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3050
|
+
rectangularPrismOrigin: import("./math/geometry/spacePoint.js").SpacePointIdentifiers;
|
|
3051
|
+
L: number;
|
|
3052
|
+
l: number;
|
|
3053
|
+
h: number;
|
|
3054
|
+
arrGivenSpacePointIds: import("./math/geometry/spacePoint.js").SpacePointIdentifiers[];
|
|
3055
|
+
arrPoolSpacePointIds: import("./math/geometry/spacePoint.js").SpacePointIdentifiers[];
|
|
3056
|
+
indexAsked: number;
|
|
2952
3057
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2953
3058
|
strOfX: string;
|
|
2954
3059
|
radius: number;
|
|
@@ -2994,6 +3099,24 @@ declare const mathExercises: (Exercise<{
|
|
|
2994
3099
|
offset: number;
|
|
2995
3100
|
planeType: string;
|
|
2996
3101
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3102
|
+
nbs: number[];
|
|
3103
|
+
radius: number;
|
|
3104
|
+
isSphere: boolean;
|
|
3105
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3106
|
+
indexFamily: number;
|
|
3107
|
+
indexPattern: number;
|
|
3108
|
+
L: number;
|
|
3109
|
+
l: number;
|
|
3110
|
+
h: number;
|
|
3111
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3112
|
+
indexFamily: number;
|
|
3113
|
+
L: number;
|
|
3114
|
+
l: number;
|
|
3115
|
+
h: number;
|
|
3116
|
+
indexColor: number;
|
|
3117
|
+
}, {
|
|
3118
|
+
projection: string;
|
|
3119
|
+
}> | Exercise<{
|
|
2997
3120
|
sqrtOperand: number;
|
|
2998
3121
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2999
3122
|
k: number;
|
|
@@ -3770,7 +3893,50 @@ declare const mathExercises: (Exercise<{
|
|
|
3770
3893
|
isAllowAND: boolean;
|
|
3771
3894
|
isAllowOR: boolean;
|
|
3772
3895
|
isAllowNOT: boolean;
|
|
3773
|
-
}>
|
|
3896
|
+
}> | Exercise<{
|
|
3897
|
+
isUsingLetters: boolean;
|
|
3898
|
+
arrInsertion: {
|
|
3899
|
+
index: number;
|
|
3900
|
+
value: number;
|
|
3901
|
+
}[] | {
|
|
3902
|
+
index: number;
|
|
3903
|
+
value: string;
|
|
3904
|
+
}[];
|
|
3905
|
+
indexAsked: number;
|
|
3906
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3907
|
+
lStart: number[] | string[];
|
|
3908
|
+
isUsingLetters: boolean;
|
|
3909
|
+
arrInstruction: (({
|
|
3910
|
+
type: "insertion";
|
|
3911
|
+
} & {
|
|
3912
|
+
index: number;
|
|
3913
|
+
value: number;
|
|
3914
|
+
}) | ({
|
|
3915
|
+
type: "injection";
|
|
3916
|
+
} & {
|
|
3917
|
+
index: number;
|
|
3918
|
+
value: number;
|
|
3919
|
+
}))[] | (({
|
|
3920
|
+
type: "insertion";
|
|
3921
|
+
} & {
|
|
3922
|
+
index: number;
|
|
3923
|
+
value: string;
|
|
3924
|
+
}) | ({
|
|
3925
|
+
type: "injection";
|
|
3926
|
+
} & {
|
|
3927
|
+
index: number;
|
|
3928
|
+
value: string;
|
|
3929
|
+
}))[];
|
|
3930
|
+
indexAsked: number;
|
|
3931
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3932
|
+
l1Start: number[];
|
|
3933
|
+
randCounter: number;
|
|
3934
|
+
randX: number;
|
|
3935
|
+
randCondition: number;
|
|
3936
|
+
isGreaterCond: boolean;
|
|
3937
|
+
k?: number;
|
|
3938
|
+
randListAdd: number;
|
|
3939
|
+
}, Record<string, string | boolean | string[]>>)[];
|
|
3774
3940
|
declare const pcExercises: (Exercise<{
|
|
3775
3941
|
numbers: number[];
|
|
3776
3942
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAA+B,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -25,6 +25,12 @@ export declare abstract class PointConstructor {
|
|
|
25
25
|
minDistanceToOrigin?: number;
|
|
26
26
|
}): Point[];
|
|
27
27
|
static fromGGBCommand(str: string): Point;
|
|
28
|
+
static fromPointRadiusAndAngle(name: string, pointCenter: Point, radius: AlgebraicNode | number, angle: AlgebraicNode | number, options?: {
|
|
29
|
+
isAngleInDegrees: boolean;
|
|
30
|
+
isAngleClockwise: boolean;
|
|
31
|
+
isEvaluate: boolean;
|
|
32
|
+
roundTo?: number;
|
|
33
|
+
}): Point;
|
|
28
34
|
}
|
|
29
35
|
export declare class Point {
|
|
30
36
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/point.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/point.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAM7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQvC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AACF,8BAAsB,gBAAgB;IACpC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE;IAGrC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM;IAKhC,MAAM,CAAC,MAAM,CAAC,IAAI,SAAM;IAGxB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAM,EAAE,GAAG,SAAK,GAAG,KAAK;IAMvD,MAAM,CAAC,eAAe,CAAC,WAAW,E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,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,SAAM,GAAG,KAAK;IAQrC,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM;IAK5B,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,aAAa;IAMvC,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO;IAGzB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK;IAK5B,YAAY;IAGZ,YAAY,CAAC,EACX,OAAc,EACd,SAAgB,EAChB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,GACN,GAAE,kBAAuB;IAsB1B,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK;IAiBpC,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,SAAkB;IAIrD,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,SAAkB;IAI1C,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,SAAkB;IAKhD,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe;IAG/B,SAAS,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,EAAE,CAAC,EAAE,aAAa,GAAG,MAAM;CAO/D"}
|
|
@@ -10,6 +10,10 @@ import { randomLetter } from "../../utils/strings/randomLetter.js";
|
|
|
10
10
|
import { frac } from "../../tree/nodes/operators/fractionNode.js";
|
|
11
11
|
import { sqrt } from "../../tree/nodes/functions/sqrtNode.js";
|
|
12
12
|
import { square } from "../../tree/nodes/operators/powerNode.js";
|
|
13
|
+
import { PiNode } from "../../tree/nodes/numbers/piNode.js";
|
|
14
|
+
import { cos } from "../../tree/nodes/functions/cosNode.js";
|
|
15
|
+
import { sin } from "../../tree/nodes/functions/sinNode.js";
|
|
16
|
+
import { round } from "../utils/round.js";
|
|
13
17
|
export class PointConstructor {
|
|
14
18
|
static randomName(excludes) {
|
|
15
19
|
return randomLetter(true, ["O", ...(excludes ?? [])]);
|
|
@@ -67,6 +71,30 @@ export class PointConstructor {
|
|
|
67
71
|
.split(",");
|
|
68
72
|
return new Point(name, new NumberNode(Number(x)), new NumberNode(Number(y)));
|
|
69
73
|
}
|
|
74
|
+
static fromPointRadiusAndAngle(name, pointCenter, radius, angle, options = {
|
|
75
|
+
isAngleInDegrees: true,
|
|
76
|
+
isAngleClockwise: false,
|
|
77
|
+
isEvaluate: true,
|
|
78
|
+
roundTo: 8,
|
|
79
|
+
}) {
|
|
80
|
+
const angleInRadians = options.isAngleInDegrees
|
|
81
|
+
? multiply(PiNode, frac(angle, 180))
|
|
82
|
+
: angle;
|
|
83
|
+
const angleRefined = options.isAngleClockwise
|
|
84
|
+
? angleInRadians
|
|
85
|
+
: multiply(-1, angleInRadians);
|
|
86
|
+
const nodeX = add(pointCenter.x, multiply(radius, cos(angleRefined)));
|
|
87
|
+
const nodeY = add(pointCenter.y, multiply(radius, sin(angleRefined)));
|
|
88
|
+
return new Point(name, options.isEvaluate
|
|
89
|
+
? options.roundTo !== undefined
|
|
90
|
+
? round(nodeX.evaluate(), options.roundTo)
|
|
91
|
+
: nodeX.evaluate()
|
|
92
|
+
: nodeX, options.isEvaluate
|
|
93
|
+
? options.roundTo !== undefined
|
|
94
|
+
? round(nodeY.evaluate(), options.roundTo)
|
|
95
|
+
: nodeY.evaluate()
|
|
96
|
+
: nodeY);
|
|
97
|
+
}
|
|
70
98
|
}
|
|
71
99
|
export class Point {
|
|
72
100
|
name;
|
package/lib/server.js
CHANGED
|
@@ -84,7 +84,10 @@ const runServer = () => {
|
|
|
84
84
|
const identifiers = req.query.identifiers
|
|
85
85
|
? JSON.parse(decodeURIComponent(req.query.identifiers))
|
|
86
86
|
: undefined;
|
|
87
|
-
const
|
|
87
|
+
const hasAnswer = !!req.query.answer && req.query.answer !== "undefined";
|
|
88
|
+
const answer = hasAnswer
|
|
89
|
+
? JSON.parse(decodeURIComponent(req.query.answer))
|
|
90
|
+
: "";
|
|
88
91
|
const exo = allExercises.find((exo) => exo.id == exoId);
|
|
89
92
|
if (!exo) {
|
|
90
93
|
res.send("Exo not found");
|
|
@@ -38,6 +38,6 @@ export declare class EqualNode implements AlgebraicNode {
|
|
|
38
38
|
toDetailedEvaluation(vars: Record<string, AlgebraicNode>): EqualNode;
|
|
39
39
|
isVerified(): boolean;
|
|
40
40
|
}
|
|
41
|
-
export declare const equationResolutionTex: (a: AlgebraicNode, b: AlgebraicNode, c: AlgebraicNode, d: AlgebraicNode, strVar?: string) => string
|
|
41
|
+
export declare const equationResolutionTex: (a: AlgebraicNode, b: AlgebraicNode, c: AlgebraicNode, d: AlgebraicNode, strVar?: string) => string;
|
|
42
42
|
export {};
|
|
43
43
|
//# sourceMappingURL=equalNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equalNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/equalNode.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAkB,MAAM,uBAAuB,CAAC;AAQxE,eAAO,MAAM,KAAK,GAChB,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,EAClC,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,cAOnC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC;IAClB,SAAS,EAAE,eAAe,CAAC;IAC3B,UAAU,EAAE,eAAe,CAAC;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,8BAAsB,oBAAoB;IACxC,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,oBAAoB,GAAG,SAAS;CAOrE;AAED,eAAO,MAAM,WAAW,GAAI,MAAM,aAAa,KAAG,IAAI,IAAI,SACzB,CAAC;AAElC,KAAK,cAA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AU,IAAI,aAAa;IAG3B,MAAM,IAAI,OAAO;IAGjB,QAAQ,IAAI,MAAM;IAGlB,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,SAAS;IAMpE,UAAU;CAIX;AAED,eAAO,MAAM,qBAAqB,GAChC,GAAG,aAAa,EAChB,GAAG,aAAa,EAChB,GAAG,aAAa,EAChB,GAAG,aAAa,EAChB,SAAQ,MAAY,WA8DrB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { AlgebraicNode, SimplifyOptions } from "../nodes/algebraicNode.js";
|
|
|
2
2
|
import { ToTexOptions } from "../nodes/node.js";
|
|
3
3
|
export declare abstract class NodeSimplifier {
|
|
4
4
|
static getDepth: <T extends AlgebraicNode>(algebraicNode: T, simplifyOpts: SimplifyOptions, toTexOptions?: ToTexOptions) => number;
|
|
5
|
-
static getPEMDASPriority: (algebraicNode: AlgebraicNode) => 1 | 0 | 2 | 100 | -1 | 3 |
|
|
5
|
+
static getPEMDASPriority: (algebraicNode: AlgebraicNode) => 1 | 0 | 2 | 100 | -1 | 3 | 5 | 4;
|
|
6
6
|
static nodesSortedByPEMDASPriorityAsc: (nodes: AlgebraicNode[]) => AlgebraicNode[];
|
|
7
7
|
static nodesStepByStep: <T extends AlgebraicNode>(algebraicNode: T, simplifyOpts: SimplifyOptions, simplifierOpts?: {
|
|
8
8
|
isMultiTopLevel: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayZip.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/arrayZip.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAcxD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function zip(arr1, arr2) {
|
|
2
|
+
// Validate inputs
|
|
3
|
+
if (!Array.isArray(arr1) || !Array.isArray(arr2)) {
|
|
4
|
+
throw new TypeError("Both arguments must be arrays.");
|
|
5
|
+
}
|
|
6
|
+
const minLength = Math.min(arr1.length, arr2.length);
|
|
7
|
+
const result = [];
|
|
8
|
+
for (let i = 0; i < minLength; i++) {
|
|
9
|
+
result.push([arr1[i], arr2[i]]);
|
|
10
|
+
}
|
|
11
|
+
return result;
|
|
12
|
+
}
|