math-exercises 3.0.201 → 3.0.202
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/dataRepresentations/scatterPlot/index.d.ts +2 -0
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.js +2 -2
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableFromScatterPlotData.js +2 -2
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotFillDataTableWithDataClassesFromScatterPlotData.js +9 -2
- package/lib/exercises/math/derivation/derivative/exp/secondDerivativeOfExpoFunction.js +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/index.js +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js +1 -1
- package/lib/exercises/math/derivation/problems/index.d.ts +1 -0
- package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/index.js +1 -1
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +31 -21
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.js +8 -128
- package/lib/exercises/math/derivation/tangent/index.d.ts +1 -0
- package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/index.js +1 -1
- package/lib/exercises/math/derivation/variations/index.d.ts +1 -0
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/index.js +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +47 -20
- package/lib/exercises/math/equaDiff/equaDiffAyPlusB.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffAyPlusB.js +29 -6
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +33 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquation.d.ts +7 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquation.d.ts.map +1 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquation.js +86 -0
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/exponentialDifferentialEquationWithIC.js +35 -7
- package/lib/exercises/math/equaDiff/index.d.ts +1 -1
- package/lib/exercises/math/equaDiff/index.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/index.js +1 -1
- package/lib/exercises/math/functions/integral/integralExpU.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralExpU.js +48 -0
- package/lib/exercises/math/functions/integral/integralFractions.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralFractions.js +52 -0
- package/lib/exercises/math/functions/integral/integralTrinomials.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralTrinomials.js +40 -0
- package/lib/exercises/math/functions/logarithm/log10Simplifying.js +2 -2
- package/lib/exercises/math/functions/logarithm/powerEquation.js +1 -1
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +30 -25
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.js +52 -5
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts.map +1 -1
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.js +26 -35
- package/lib/exercises/math/integration/fromExpr/index.d.ts +1 -0
- package/lib/exercises/math/integration/fromExpr/index.d.ts.map +1 -1
- package/lib/exercises/math/integration/fromExpr/index.js +1 -1
- package/lib/exercises/math/primitive/constantPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/constantPrimitive.js +25 -1
- package/lib/exercises/math/primitive/exponentialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/exponentialPrimitive.js +17 -0
- package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +17 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.js +20 -1
- package/lib/exercises/math/primitive/usualPrimitives.d.ts.map +1 -1
- package/lib/exercises/math/primitive/usualPrimitives.js +1 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSets.js +4 -4
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSetsFromSituation.js +3 -3
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.js +4 -4
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.js +1 -1
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.js +12 -25
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts +1 -1
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.js +1 -2
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.js +11 -26
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts +1 -0
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/planes/index.js +1 -1
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.js +11 -25
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.js +25 -5
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.js +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.js +2 -2
- package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.js +87 -24
- package/lib/exercises/pc/mathExosInPC.d.ts +1 -1
- package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
- package/lib/exercises/pc/mathExosInPC.js +1 -1
- package/lib/index.d.ts +55 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.d.ts +2 -0
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +40 -0
- package/lib/math/utils/polynomial/polynomialUtils.d.ts +2 -2
- package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -1
- package/lib/math/utils/polynomial/polynomialUtils.js +5 -2
- package/lib/tests/exoTest.js +1 -1
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +7 -3
- package/lib/tests/singleExo.test.d.ts.map +1 -1
- package/lib/tests/singleExo.test.js +2 -2
- package/lib/tree/utilities/nodeComparator.d.ts +1 -1
- package/lib/tree/utilities/nodeComparator.d.ts.map +1 -1
- package/lib/tree/utilities/nodeComparator.js +6 -4
- package/lib/tree/utilities/nodeSimplifier.d.ts +1 -0
- package/lib/tree/utilities/nodeSimplifier.d.ts.map +1 -1
- package/lib/tree/utilities/nodeSimplifier.js +40 -0
- package/package.json +1 -1
|
@@ -2,5 +2,6 @@ export * from "./checkIsPointBelongingToPlane.js";
|
|
|
2
2
|
export * from "./planeEquationFromNormalVectorAndContainedPoint.js";
|
|
3
3
|
export * from "./findNormalVectorFromPlaneEquation.js";
|
|
4
4
|
export * from "./planeEquationFromOrthogonalLineAndContainedPoint.js";
|
|
5
|
+
export * from "./findNormalVectorFromPlanePointsCoords.js";
|
|
5
6
|
export * from "./planePlaneRelativePositions.js";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/planes/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qDAAqD,CAAC;AACpE,cAAc,wCAAwC,CAAC;AACvD,cAAc,uDAAuD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/planes/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qDAAqD,CAAC;AACpE,cAAc,wCAAwC,CAAC;AACvD,cAAc,uDAAuD,CAAC;AACtE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kCAAkC,CAAC"}
|
|
@@ -2,5 +2,5 @@ export * from "./checkIsPointBelongingToPlane.js";
|
|
|
2
2
|
export * from "./planeEquationFromNormalVectorAndContainedPoint.js";
|
|
3
3
|
export * from "./findNormalVectorFromPlaneEquation.js";
|
|
4
4
|
export * from "./planeEquationFromOrthogonalLineAndContainedPoint.js";
|
|
5
|
-
|
|
5
|
+
export * from "./findNormalVectorFromPlanePointsCoords.js";
|
|
6
6
|
export * from "./planePlaneRelativePositions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planePlaneRelativePositions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAGL,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAS5C,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAkH7C,KAAK,QAAQ,GAAG;IACd,sBAAsB,EAAE,qBAAqB,CAAC;IAC9C,oBAAoB,EAAE,sBAAsB,CAAC;IAC7C,oBAAoB,EAAE,eAAe,CAAC;IACtC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,QAAQ,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"planePlaneRelativePositions.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAGL,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAS5C,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAkH7C,KAAK,QAAQ,GAAG;IACd,sBAAsB,EAAE,qBAAqB,CAAC;IAC9C,oBAAoB,EAAE,sBAAsB,CAAC;IAC7C,oBAAoB,EAAE,eAAe,CAAC;IACtC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,QAAQ,CAAC;CACjB,CAAC;AA4hBF,KAAK,OAAO,GAAG;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AA8BF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAoBtE,CAAC"}
|
|
@@ -327,35 +327,21 @@ const getPropositions = (_n, { answer }) => {
|
|
|
327
327
|
};
|
|
328
328
|
const createRandomIdentifiers = (opts) => {
|
|
329
329
|
const { typeDataForPlane1, typeDataForPlane2 } = opts;
|
|
330
|
-
const funcRand1 = () => randint(-3, 4,
|
|
331
|
-
const funcRand2 = () => randint(-6, 7,
|
|
332
|
-
const funcRand3 = () => randint(-9, 10,
|
|
333
|
-
function createRandomOrthogonalVector(vecSrc) {
|
|
334
|
-
const [nodeX, nodeY, nodeZ] = [vecSrc.x, vecSrc.y, vecSrc.z];
|
|
335
|
-
const nodeZero = (0).toTree();
|
|
336
|
-
const vec1 = new SpaceVector("v1", opposite(nodeY), nodeX, nodeZero);
|
|
337
|
-
const vec2 = new SpaceVector("v2", nodeZero, opposite(nodeZ), nodeY);
|
|
338
|
-
const vec3 = new SpaceVector("v3", opposite(nodeZ), nodeZero, nodeX);
|
|
339
|
-
const [factor1, factor2, factor3] = shuffle(random([
|
|
340
|
-
[coinFlip(), false, false],
|
|
341
|
-
[coinFlip(), coinFlip(), false],
|
|
342
|
-
])).map((isCanBeZero) => randint(-3, 4, isCanBeZero ? [] : [0]).toTree());
|
|
343
|
-
return vec1
|
|
344
|
-
.times(factor1)
|
|
345
|
-
.add(vec2.times(factor2))
|
|
346
|
-
.add(vec3.times(factor3));
|
|
347
|
-
}
|
|
330
|
+
const funcRand1 = (isCanBeZero) => randint(-3, 4, isCanBeZero ? [] : [0]).toTree();
|
|
331
|
+
const funcRand2 = (isCanBeZero) => randint(-6, 7, isCanBeZero ? [] : [0]).toTree();
|
|
332
|
+
const funcRand3 = (isCanBeZero) => randint(-9, 10, isCanBeZero ? [] : [0]).toTree();
|
|
348
333
|
//create vecR, vecS, vecT (base)
|
|
349
334
|
const vecR = (() => {
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
]);
|
|
355
|
-
|
|
335
|
+
const arrIsCanBeZero = shuffle(random([
|
|
336
|
+
[coinFlip(), false, false],
|
|
337
|
+
[coinFlip(), coinFlip(), false],
|
|
338
|
+
]));
|
|
339
|
+
const arrFuncRand = shuffle([funcRand1, funcRand2, funcRand3]);
|
|
340
|
+
const [nodeX, nodeY, nodeZ] = zip(arrIsCanBeZero, arrFuncRand).map(([isCanBeZero, funcRand]) => funcRand(isCanBeZero));
|
|
341
|
+
return new SpaceVector("r", nodeX, nodeY, nodeZ);
|
|
356
342
|
})();
|
|
357
343
|
const vecS = (() => {
|
|
358
|
-
const vecRaw =
|
|
344
|
+
const vecRaw = vecR.getRandomOrthogonalVectorNonZero();
|
|
359
345
|
return new SpaceVector("s", vecRaw.x, vecRaw.y, vecRaw.z);
|
|
360
346
|
})();
|
|
361
347
|
const [vecU, vecV] = (() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angleFromScalarProductFromSpacePointCoords.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"angleFromScalarProductFromSpacePointCoords.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAmD3C,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,qBAAqB,EAAE,CAAC;CACxC,CAAC;AAuSF,eAAO,MAAM,0CAA0C,EAAE,QAAQ,CAAC,WAAW,CAoB1E,CAAC"}
|
package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.js
CHANGED
|
@@ -15,6 +15,8 @@ import { square } from "../../../../tree/nodes/operators/powerNode.js";
|
|
|
15
15
|
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
16
16
|
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
17
17
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
18
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
19
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
18
20
|
import { zip } from "../../../../utils/arrays/arrayZip.js";
|
|
19
21
|
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
20
22
|
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
@@ -176,13 +178,31 @@ const isAnswerValid = (ans, { answer }) => {
|
|
|
176
178
|
}
|
|
177
179
|
};
|
|
178
180
|
const createRandomIdentifiers = () => {
|
|
179
|
-
const funcRand1 = () => randint(-3, 4,
|
|
180
|
-
const funcRand2 = () => randint(-6, 7,
|
|
181
|
-
const funcRand3 = () => randint(-9, 10,
|
|
182
|
-
const [
|
|
181
|
+
const funcRand1 = (isCanBeZero) => randint(-3, 4, isCanBeZero ? [] : [0]).toTree();
|
|
182
|
+
const funcRand2 = (isCanBeZero) => randint(-6, 7, isCanBeZero ? [] : [0]).toTree();
|
|
183
|
+
const funcRand3 = (isCanBeZero) => randint(-9, 10, isCanBeZero ? [] : [0]).toTree();
|
|
184
|
+
const [vec1, vec2] = zip(["u", "v"], [
|
|
183
185
|
[funcRand1, funcRand2, funcRand3],
|
|
184
186
|
[funcRand3, funcRand2, funcRand1],
|
|
185
|
-
]).map(([name,
|
|
187
|
+
]).map(([name, arrFuncRand]) => {
|
|
188
|
+
const arrIsCanBeZero = shuffle(random([
|
|
189
|
+
[coinFlip(), false, false],
|
|
190
|
+
[coinFlip(), coinFlip(), false],
|
|
191
|
+
]));
|
|
192
|
+
const [nodeX, nodeY, nodeZ] = zip(arrIsCanBeZero, arrFuncRand).map(([isCanBeZero, funcRand]) => funcRand(isCanBeZero));
|
|
193
|
+
return new SpaceVector(name, nodeX, nodeY, nodeZ);
|
|
194
|
+
});
|
|
195
|
+
const vecU = vec1;
|
|
196
|
+
const vecV = (() => {
|
|
197
|
+
const isVec2EqualsVec1 = vec2.equals(vec1);
|
|
198
|
+
if (isVec2EqualsVec1) {
|
|
199
|
+
const vec1Orth = vec1.getRandomOrthogonalVectorNonZero();
|
|
200
|
+
return vec2.add(vec1Orth);
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
return vec2;
|
|
204
|
+
}
|
|
205
|
+
})();
|
|
186
206
|
const A = new SpacePoint("A", randint(-5, 6).toTree(), randint(-5, 6).toTree(), randint(-5, 6).toTree());
|
|
187
207
|
const [B, C] = [
|
|
188
208
|
["B", vecU],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./scalarProductFromCubeOuterPoints.js";
|
|
2
2
|
export * from "./scalarProductFromSpacePointCoords.js";
|
|
3
|
+
export * from "./angleFromScalarProductFromSpacePointCoords.js";
|
|
3
4
|
export * from "./checkIsOrthogonalSpaceVecsFromCoords.js";
|
|
4
5
|
export * from "./checkIsSpaceVecOrthogonalToPlaneFromCoords.js";
|
|
5
6
|
export * from "./checkIsOrthogonalLinesFromParametricReps.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/scalarProduct/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/scalarProduct/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./scalarProductFromCubeOuterPoints.js";
|
|
2
2
|
export * from "./scalarProductFromSpacePointCoords.js";
|
|
3
|
-
|
|
3
|
+
export * from "./angleFromScalarProductFromSpacePointCoords.js";
|
|
4
4
|
export * from "./checkIsOrthogonalSpaceVecsFromCoords.js";
|
|
5
5
|
export * from "./checkIsSpaceVecOrthogonalToPlaneFromCoords.js";
|
|
6
6
|
export * from "./checkIsOrthogonalLinesFromParametricReps.js";
|
package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.js
CHANGED
|
@@ -69,8 +69,8 @@ $$
|
|
|
69
69
|
\\overrightarrow{w} = a \\overrightarrow{u} + b \\overrightarrow{v}
|
|
70
70
|
$$
|
|
71
71
|
|
|
72
|
-
Cela donne un système de $2$ équations: une pour chaque composante du vecteur
|
|
73
|
-
|
|
72
|
+
Cela donne un système de $2$ équations: une pour chaque composante du vecteur $\\overrightarrow{w}$.
|
|
73
|
+
Résous ce système, autrement dit détermine $a$ et $b$.
|
|
74
74
|
|
|
75
75
|
Les coordonnées de $\\overrightarrow{w}$ dans la base $(\\overrightarrow{u};\\overrightarrow{v})$.`;
|
|
76
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationCosOnRandomInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/equationCosOnRandomInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"equationCosOnRandomInterval.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/trigonometry/functions/equationCosOnRandomInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAsBrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AA+OF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAe7D,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { EquationSolutionNode } from "../../../../tree/nodes/equations/equationS
|
|
|
6
6
|
import { CosNode } from "../../../../tree/nodes/functions/cosNode.js";
|
|
7
7
|
import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
|
|
8
8
|
import { AddNode } from "../../../../tree/nodes/operators/addNode.js";
|
|
9
|
-
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
+
import { multiply, MultiplyNode, } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
10
10
|
import { ClosureType } from "../../../../tree/nodes/sets/closure.js";
|
|
11
11
|
import { DiscreteSetNode } from "../../../../tree/nodes/sets/discreteSetNode.js";
|
|
12
12
|
import { IntervalNode } from "../../../../tree/nodes/sets/intervalNode.js";
|
|
@@ -16,7 +16,10 @@ const getPropositions = (n, { answer, degree, leftBoundPiMultiple }) => {
|
|
|
16
16
|
addValidProp(propositions, answer);
|
|
17
17
|
//distracteur avec une solution manquante
|
|
18
18
|
if (degree !== 0 && degree !== 180) {
|
|
19
|
-
const answerNode =
|
|
19
|
+
const answerNode = getAnswerStuff({
|
|
20
|
+
degree,
|
|
21
|
+
leftBoundPiMultiple,
|
|
22
|
+
}).nodeEquationSolution;
|
|
20
23
|
const newSet = answerNode.solutionsSet.toDeleteRandomElement();
|
|
21
24
|
tryToAddWrongProp(propositions, new EquationSolutionNode(newSet).toTex());
|
|
22
25
|
}
|
|
@@ -27,7 +30,7 @@ const getPropositions = (n, { answer, degree, leftBoundPiMultiple }) => {
|
|
|
27
30
|
});
|
|
28
31
|
return shuffleProps(propositions, n);
|
|
29
32
|
};
|
|
30
|
-
const
|
|
33
|
+
const getAnswerStuff = (identifiers) => {
|
|
31
34
|
const coeff = identifiers.leftBoundPiMultiple;
|
|
32
35
|
/**
|
|
33
36
|
* Si l'intervalle est centré autour d'un multiple de 2pi (coeff impair) (genre ]3pi, 5pi]) on ajoute (coeff+1)/2 tours
|
|
@@ -38,20 +41,82 @@ const getAnswerNode = (identifiers) => {
|
|
|
38
41
|
.find((v) => v.degree === identifiers.degree)
|
|
39
42
|
.cos.evaluate({});
|
|
40
43
|
const values = (Math.abs(coeff % 2) === 1 ? mainTrigoValues : trigoValuesOnZeroTwoPIOF).filter((v) => v.cos.evaluate({}) === cos);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
const [nodeEquationSolutionOn02Pi, nodeEquationSolution] = (() => {
|
|
45
|
+
if (values.length === 1) {
|
|
46
|
+
const value = values[0];
|
|
47
|
+
const newValue = new AddNode(value.angle, new MultiplyNode((turnsToAdd * 2).toTree(), PiNode)).simplify();
|
|
48
|
+
return [
|
|
49
|
+
new EquationSolutionNode(new DiscreteSetNode([value.angle])),
|
|
50
|
+
new EquationSolutionNode(new DiscreteSetNode([newValue])),
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
const newValues = values.map((v) => {
|
|
55
|
+
return new AddNode(v.angle, new MultiplyNode((turnsToAdd * 2).toTree(), PiNode)).simplify();
|
|
56
|
+
});
|
|
57
|
+
return [
|
|
58
|
+
new EquationSolutionNode(new DiscreteSetNode(values.map((value) => value.angle))),
|
|
59
|
+
new EquationSolutionNode(new DiscreteSetNode(newValues.sort((a, b) => a.evaluate({}) - b.evaluate({})))),
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
})();
|
|
63
|
+
return {
|
|
64
|
+
nodeEquationSolutionOn02Pi,
|
|
65
|
+
nodeEquationSolution,
|
|
66
|
+
turnsToAdd,
|
|
67
|
+
};
|
|
52
68
|
};
|
|
53
69
|
const getAnswer = (identifiers) => {
|
|
54
|
-
return
|
|
70
|
+
return getAnswerStuff(identifiers).nodeEquationSolution.toTex();
|
|
71
|
+
};
|
|
72
|
+
const getHint = (identifiers) => {
|
|
73
|
+
const { leftBoundPiMultiple } = identifiers;
|
|
74
|
+
const interval02Pi = new IntervalNode(multiply(0, PiNode).simplify(), multiply(2, PiNode).simplify(), ClosureType.OF);
|
|
75
|
+
const intervalMinusPiPi = new IntervalNode(multiply(-1, PiNode).simplify(), multiply(+1, PiNode).simplify(), ClosureType.OF);
|
|
76
|
+
const intervalEasier = leftBoundPiMultiple % 2 === 0 ? interval02Pi : intervalMinusPiPi;
|
|
77
|
+
return `Commence par résoudre l'équation sur $${intervalEasier.toTex()}$.
|
|
78
|
+
|
|
79
|
+
Ensuite, puisque la fonction $\\cos$ est $${multiply(2, PiNode).toTex()}$-périodique, ajoute ou ôte $${multiply(2, PiNode).toTex()}$ à tes solutions autant de fois que nécessaire jusqu'à être dans l'intervalle de l'énoncé.`;
|
|
80
|
+
};
|
|
81
|
+
const getCorrection = (identifiers) => {
|
|
82
|
+
const { degree, leftBoundPiMultiple } = identifiers;
|
|
83
|
+
const value = mainPositiveTrigovalues.find((v) => v.degree === degree);
|
|
84
|
+
const offsetFactor2Pi = Math.ceil(leftBoundPiMultiple / 2);
|
|
85
|
+
const interval02Pi = new IntervalNode(multiply(0, PiNode).simplify(), multiply(2, PiNode).simplify(), ClosureType.OF);
|
|
86
|
+
const intervalMinusPiPi = new IntervalNode(multiply(-1, PiNode).simplify(), multiply(+1, PiNode).simplify(), ClosureType.OF);
|
|
87
|
+
const intervalEasier = leftBoundPiMultiple % 2 === 0 ? interval02Pi : intervalMinusPiPi;
|
|
88
|
+
const leftBound = new MultiplyNode(leftBoundPiMultiple.toTree(), PiNode).simplify();
|
|
89
|
+
const rightBound = new MultiplyNode((leftBoundPiMultiple + 2).toTree(), PiNode).simplify();
|
|
90
|
+
const interval = new IntervalNode(leftBound, rightBound, ClosureType.OF);
|
|
91
|
+
const { nodeEquationSolutionOn02Pi, nodeEquationSolution } = getAnswerStuff(identifiers);
|
|
92
|
+
return `Sur l'intervalle $${intervalEasier.toTex()}$, la solution de
|
|
93
|
+
|
|
94
|
+
$$
|
|
95
|
+
${new CosNode("x".toTree()).toTex()}=${value.cos.toTex()}
|
|
96
|
+
$$
|
|
97
|
+
|
|
98
|
+
est :
|
|
99
|
+
|
|
100
|
+
$$
|
|
101
|
+
${nodeEquationSolutionOn02Pi.toTex()}
|
|
102
|
+
$$
|
|
103
|
+
|
|
104
|
+
${(() => {
|
|
105
|
+
if (intervalEasier.toTex() !== interval.toTex()) {
|
|
106
|
+
return `Pour avoir la solution sur l'intervalle $${interval.toTex()}$, on ajoute $${offsetFactor2Pi.frenchify()}$ fois $${multiply(2, PiNode).toTex()}$.
|
|
107
|
+
|
|
108
|
+
La solution est donc :
|
|
109
|
+
|
|
110
|
+
$$
|
|
111
|
+
${nodeEquationSolution.toTex()}
|
|
112
|
+
$$
|
|
113
|
+
|
|
114
|
+
`;
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
return ``;
|
|
118
|
+
}
|
|
119
|
+
})()}`;
|
|
55
120
|
};
|
|
56
121
|
const getInstruction = ({ degree, leftBoundPiMultiple, }) => {
|
|
57
122
|
const value = mainPositiveTrigovalues.find((v) => v.degree === degree);
|
|
@@ -64,17 +129,14 @@ $$
|
|
|
64
129
|
${new CosNode("x".toTree()).toTex()}=${value.cos.toTex()}
|
|
65
130
|
$$`;
|
|
66
131
|
};
|
|
67
|
-
// const getHint: GetHint<Identifiers> = (identifiers) => {
|
|
68
|
-
// return "";
|
|
69
|
-
// };
|
|
70
|
-
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
|
|
71
|
-
// return "";
|
|
72
|
-
// };
|
|
73
132
|
const getKeys = () => {
|
|
74
133
|
return ["x", "S", "equal", "lbrace", "semicolon", "rbrace", "pi"];
|
|
75
134
|
};
|
|
76
135
|
const isAnswerValid = (ans, { degree, leftBoundPiMultiple }) => {
|
|
77
|
-
const answerNode =
|
|
136
|
+
const answerNode = getAnswerStuff({
|
|
137
|
+
degree,
|
|
138
|
+
leftBoundPiMultiple,
|
|
139
|
+
}).nodeEquationSolution;
|
|
78
140
|
return answerNode.toAllValidTexs().includes(ans);
|
|
79
141
|
};
|
|
80
142
|
const getEquationCosOnRandomIntervalQuestion = () => {
|
|
@@ -91,8 +153,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
91
153
|
keys: getKeys(identifiers),
|
|
92
154
|
answerFormat: "tex",
|
|
93
155
|
identifiers,
|
|
94
|
-
|
|
95
|
-
|
|
156
|
+
hint: getHint(identifiers),
|
|
157
|
+
correction: getCorrection(identifiers),
|
|
96
158
|
};
|
|
97
159
|
return question;
|
|
98
160
|
};
|
|
@@ -108,4 +170,5 @@ export const equationCosOnRandomInterval = {
|
|
|
108
170
|
isAnswerValid,
|
|
109
171
|
subject: "Mathématiques",
|
|
110
172
|
getQuestionFromIdentifiers,
|
|
173
|
+
hasHintAndCorrection: true,
|
|
111
174
|
};
|
|
@@ -18,7 +18,7 @@ export * from "../math/functions/affines/affineExpressionReading.js";
|
|
|
18
18
|
export * from "../math/geometry/thales/thales.js";
|
|
19
19
|
export * from "../math/geometry/thales/thalesCalcul.js";
|
|
20
20
|
export * from "../math/equaDiff/equaDiffCheckSolutionFirstOrder.js";
|
|
21
|
-
export * from "../math/equaDiff/
|
|
21
|
+
export * from "../math/equaDiff/exponentialDifferentialEquation.js";
|
|
22
22
|
export * from "../math/equaDiff/exponentialDifferentialEquationWithIC.js";
|
|
23
23
|
export * from "../math/derivation/tangent/derivativeNumberReading.js";
|
|
24
24
|
export * from "../math/derivation/derivative/polynomial/usualderivative.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mathExosInPC.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/mathExosInPC.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,cAAc,mCAAmC,CAAC;AAClD,cAAc,wDAAwD,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,cAAc,uCAAuC,CAAC;AACtD,cAAc,gDAAgD,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AACrF,cAAc,sDAAsD,CAAC;AACrE,cAAc,sDAAsD,CAAC;AACrE,cAAc,sDAAsD,CAAC;AACrE,cAAc,sDAAsD,CAAC;AACrE,cAAc,kEAAkE,CAAC;AACjF,cAAc,+DAA+D,CAAC;AAC9E,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sDAAsD,CAAC;AACrE,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,
|
|
1
|
+
{"version":3,"file":"mathExosInPC.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/mathExosInPC.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,cAAc,mCAAmC,CAAC;AAClD,cAAc,wDAAwD,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,cAAc,uCAAuC,CAAC;AACtD,cAAc,gDAAgD,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AACrF,cAAc,sDAAsD,CAAC;AACrE,cAAc,sDAAsD,CAAC;AACrE,cAAc,sDAAsD,CAAC;AACrE,cAAc,sDAAsD,CAAC;AACrE,cAAc,kEAAkE,CAAC;AACjF,cAAc,+DAA+D,CAAC;AAC9E,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sDAAsD,CAAC;AACrE,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qDAAqD,CAAC;AACpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,6DAA6D,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mEAAmE,CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,mEAAmE,CAAC;AAC1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,oEAAoE,CAAC;AAC5G,cAAc,yDAAyD,CAAC;AACxE,cAAc,0DAA0D,CAAC"}
|
|
@@ -18,7 +18,7 @@ export * from "../math/functions/affines/affineExpressionReading.js";
|
|
|
18
18
|
export * from "../math/geometry/thales/thales.js";
|
|
19
19
|
export * from "../math/geometry/thales/thalesCalcul.js";
|
|
20
20
|
export * from "../math/equaDiff/equaDiffCheckSolutionFirstOrder.js";
|
|
21
|
-
export * from "../math/equaDiff/
|
|
21
|
+
export * from "../math/equaDiff/exponentialDifferentialEquation.js";
|
|
22
22
|
export * from "../math/equaDiff/exponentialDifferentialEquationWithIC.js";
|
|
23
23
|
export * from "../math/derivation/tangent/derivativeNumberReading.js";
|
|
24
24
|
export * from "../math/derivation/derivative/polynomial/usualderivative.js";
|
package/lib/index.d.ts
CHANGED
|
@@ -1005,6 +1005,11 @@ declare const mathExercises: (Exercise<{
|
|
|
1005
1005
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1006
1006
|
nodeIdsU: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1007
1007
|
nodeIdsV: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1008
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1009
|
+
nodeIdsLambda: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1010
|
+
nodeIdsU: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1011
|
+
nodeIdsV: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1012
|
+
nodeIdsRewriteUsing: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1008
1013
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1009
1014
|
affineA: number;
|
|
1010
1015
|
affineB: number;
|
|
@@ -1130,6 +1135,10 @@ declare const mathExercises: (Exercise<{
|
|
|
1130
1135
|
x: number;
|
|
1131
1136
|
k: number;
|
|
1132
1137
|
nodeIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
1138
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1139
|
+
nodeIdsSlope: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1140
|
+
nodeIdsF: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1141
|
+
nodeIdsAbscissa: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
1133
1142
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1134
1143
|
pofIds: import("./math/utils/polynomial/polynomialInterpolationUtils.js").PointOfFunctionIdentifiers[];
|
|
1135
1144
|
cubicSplineIds: {
|
|
@@ -1197,6 +1206,11 @@ declare const mathExercises: (Exercise<{
|
|
|
1197
1206
|
coeffsF: number[];
|
|
1198
1207
|
}, {
|
|
1199
1208
|
typeF: string;
|
|
1209
|
+
}> | Exercise<{
|
|
1210
|
+
coeffsF: number[];
|
|
1211
|
+
isFOverExp: boolean;
|
|
1212
|
+
}, {
|
|
1213
|
+
typeF: string;
|
|
1200
1214
|
}> | Exercise<{
|
|
1201
1215
|
nodeIdsF: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1202
1216
|
typeF: string;
|
|
@@ -1261,6 +1275,13 @@ declare const mathExercises: (Exercise<{
|
|
|
1261
1275
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1262
1276
|
nodeIdsF: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1263
1277
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1278
|
+
nodeIdsF: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1279
|
+
pofIds: import("./math/utils/polynomial/polynomialInterpolationUtils.js").PointOfFunctionIdentifiers[];
|
|
1280
|
+
boundPHigh: number;
|
|
1281
|
+
typeF: string;
|
|
1282
|
+
}, {
|
|
1283
|
+
typeF: string;
|
|
1284
|
+
}> | Exercise<{
|
|
1264
1285
|
nodeIdsF: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1265
1286
|
nodeIdsValueFunction: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1266
1287
|
typeF: string;
|
|
@@ -4297,6 +4318,9 @@ declare const mathExercises: (Exercise<{
|
|
|
4297
4318
|
}, {
|
|
4298
4319
|
typeDataForParallelLine: string;
|
|
4299
4320
|
}> | Exercise<{
|
|
4321
|
+
spacePointIdsPlanePoints: import("./math/geometry/spacePoint.js").SpacePointIdentifiers[];
|
|
4322
|
+
spaceVectorIdsProposed: import("./math/geometry/spaceVector.js").SpaceVectorIdentifiers[];
|
|
4323
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4300
4324
|
idsP1: {
|
|
4301
4325
|
spacePointIdsContained: import("./math/geometry/spacePoint.js").SpacePointIdentifiers;
|
|
4302
4326
|
spaceVectorIdsNormal: import("./math/geometry/spaceVector.js").SpaceVectorIdentifiers;
|
|
@@ -4406,6 +4430,8 @@ declare const mathExercises: (Exercise<{
|
|
|
4406
4430
|
isIncludeMidpoints: boolean;
|
|
4407
4431
|
}> | Exercise<{
|
|
4408
4432
|
spacePointIds: import("./math/geometry/spacePoint.js").SpacePointIdentifiers[];
|
|
4433
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4434
|
+
spacePointIds: import("./math/geometry/spacePoint.js").SpacePointIdentifiers[];
|
|
4409
4435
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4410
4436
|
spacePointIdsForVecs: import("./math/geometry/spacePoint.js").SpacePointIdentifiers[];
|
|
4411
4437
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
@@ -4415,6 +4441,18 @@ declare const mathExercises: (Exercise<{
|
|
|
4415
4441
|
spacePointIdsForAB: import("./math/geometry/spacePoint.js").SpacePointIdentifiers[];
|
|
4416
4442
|
spacePointIdsForUV: import("./math/geometry/spacePoint.js").SpacePointIdentifiers[];
|
|
4417
4443
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4444
|
+
idsP: {
|
|
4445
|
+
spacePointIdsContained: import("./math/geometry/spacePoint.js").SpacePointIdentifiers;
|
|
4446
|
+
spaceVectorIdsNormal: import("./math/geometry/spaceVector.js").SpaceVectorIdentifiers;
|
|
4447
|
+
nodeIdsPlaneEquation: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4448
|
+
typeDefinitionData: string;
|
|
4449
|
+
texName: string;
|
|
4450
|
+
};
|
|
4451
|
+
spacePointIdsA: import("./math/geometry/spacePoint.js").SpacePointIdentifiers;
|
|
4452
|
+
spacePointIdsProposed: import("./math/geometry/spacePoint.js").SpacePointIdentifiers[];
|
|
4453
|
+
}, {
|
|
4454
|
+
typeDataForPlane: string;
|
|
4455
|
+
}> | Exercise<{
|
|
4418
4456
|
spacePointIds: import("./math/geometry/spacePoint.js").SpacePointIdentifiers;
|
|
4419
4457
|
spaceVectorIds: import("./math/geometry/spaceVector.js").SpaceVectorIdentifiers;
|
|
4420
4458
|
randInstr: number;
|
|
@@ -4976,6 +5014,15 @@ declare const mathExercises: (Exercise<{
|
|
|
4976
5014
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4977
5015
|
cloudPointsIdentifiers: import("./math/geometry/CloudPoints.js").CloudPointsIdentifiers;
|
|
4978
5016
|
evolutionType: string;
|
|
5017
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
5018
|
+
pointIds: import("./math/geometry/point.js").PointIdentifiers[];
|
|
5019
|
+
strGroupBy: string;
|
|
5020
|
+
isTransposed: boolean;
|
|
5021
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
5022
|
+
pointIds: import("./math/geometry/point.js").PointIdentifiers[];
|
|
5023
|
+
strGroupBy: string;
|
|
5024
|
+
isTransposed: boolean;
|
|
5025
|
+
nodeIdsDataClasses: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
4979
5026
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4980
5027
|
pointIds: import("./math/geometry/point.js").PointIdentifiers[];
|
|
4981
5028
|
strGroupBy: string;
|
|
@@ -5532,6 +5579,14 @@ declare const mathExercises: (Exercise<{
|
|
|
5532
5579
|
}, {
|
|
5533
5580
|
typeSignBoundLow: string;
|
|
5534
5581
|
typeSignBoundHigh: string;
|
|
5582
|
+
}> | Exercise<{
|
|
5583
|
+
nodeIdsF: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
5584
|
+
nodeIdsG: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
5585
|
+
nodeIdsBounds: [import("./tree/nodes/nodeConstructor.js").NodeIdentifiers, import("./tree/nodes/nodeConstructor.js").NodeIdentifiers];
|
|
5586
|
+
}, {
|
|
5587
|
+
typeCrossingCurves: string;
|
|
5588
|
+
typeSignBoundLow: string;
|
|
5589
|
+
typeSignBoundHigh: string;
|
|
5535
5590
|
}> | Exercise<{
|
|
5536
5591
|
nodeIdsF: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
5537
5592
|
nodeIdsBounds: [import("./tree/nodes/nodeConstructor.js").NodeIdentifiers, import("./tree/nodes/nodeConstructor.js").NodeIdentifiers];
|
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,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa
|
|
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,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA+B,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -39,5 +39,7 @@ export declare class SpaceVector {
|
|
|
39
39
|
getNorm(): AlgebraicNode;
|
|
40
40
|
getEndPoint(startPoint: SpacePoint, name?: string): SpacePoint;
|
|
41
41
|
equals(v: SpaceVector): boolean;
|
|
42
|
+
static createRandomOrthogonalVector(vecSrc: SpaceVector): SpaceVector;
|
|
43
|
+
getRandomOrthogonalVectorNonZero(): SpaceVector;
|
|
42
44
|
}
|
|
43
45
|
//# sourceMappingURL=spaceVector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spaceVector.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/spaceVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"spaceVector.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/spaceVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAe7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,aAAa,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAEF,8BAAsB,sBAAsB;IAC1C,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,sBAAsB;IAS1D,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,WAAW;IAQnE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,WAAW;IAe3D,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,UAAQ,GAAG,WAAW,EAAE;IAc1E,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,MAAM;CAWhD;AAED,qBAAa,WAAW;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;gBAEf,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,aAAa,EAChB,CAAC,EAAE,aAAa,EAChB,CAAC,EAAE,aAAa;IASlB,aAAa,IAAI,sBAAsB;IAUvC,SAAS;IAGT,kBAAkB;IAGlB,KAAK,IAAI,MAAM;IAIf,WAAW,IAAI,MAAM;IAGrB,iBAAiB,IAAI,MAAM;IAK3B,eAAe,IAAI,MAAM;IAMzB,eAAe,CAAC,CAAC,EAAE,WAAW,GAAG,WAAW;IAiB5C,UAAU,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO;IAMnC,UAAU,IAAI,OAAO;IAGrB,WAAW,IAAI,aAAa;IAI5B,KAAK,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM;IAQrC,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,aAAa;IAQ7C,GAAG,CAAC,CAAC,EAAE,WAAW,GAAG,WAAW;IAShC,OAAO,IAAI,aAAa;IAYxB,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM;IAQjD,MAAM,CAAC,CAAC,EAAE,WAAW;IAIrB,MAAM,CAAC,4BAA4B,CAAC,MAAM,EAAE,WAAW;IA+BvD,gCAAgC;CAoBjC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { opposite } from "../../tree/nodes/functions/oppositeNode.js";
|
|
1
2
|
import { SqrtNode } from "../../tree/nodes/functions/sqrtNode.js";
|
|
2
3
|
import { NodeConstructor, } from "../../tree/nodes/nodeConstructor.js";
|
|
3
4
|
import { NumberNode } from "../../tree/nodes/numbers/numberNode.js";
|
|
@@ -5,6 +6,10 @@ import { add, AddNode } from "../../tree/nodes/operators/addNode.js";
|
|
|
5
6
|
import { multiply, MultiplyNode, } from "../../tree/nodes/operators/multiplyNode.js";
|
|
6
7
|
import { SquareNode } from "../../tree/nodes/operators/powerNode.js";
|
|
7
8
|
import { SubstractNode } from "../../tree/nodes/operators/substractNode.js";
|
|
9
|
+
import { NodeComparator } from "../../tree/utilities/nodeComparator.js";
|
|
10
|
+
import { coinFlip } from "../../utils/alea/coinFlip.js";
|
|
11
|
+
import { random } from "../../utils/alea/random.js";
|
|
12
|
+
import { shuffle } from "../../utils/alea/shuffle.js";
|
|
8
13
|
import { zip } from "../../utils/arrays/arrayZip.js";
|
|
9
14
|
import { randint } from "../utils/random/randint.js";
|
|
10
15
|
import { SpacePoint } from "./spacePoint.js";
|
|
@@ -125,4 +130,39 @@ export class SpaceVector {
|
|
|
125
130
|
equals(v) {
|
|
126
131
|
return this.x.equals(v.x) && this.y.equals(v.y) && this.z.equals(v.z);
|
|
127
132
|
}
|
|
133
|
+
static createRandomOrthogonalVector(vecSrc) {
|
|
134
|
+
const isVecSrcZero = [vecSrc.x, vecSrc.y, vecSrc.z].every((node) => NodeComparator.isEqualViaSub(node, (0).toTree()));
|
|
135
|
+
if (isVecSrcZero) {
|
|
136
|
+
throw new Error("vecSrc is zero");
|
|
137
|
+
}
|
|
138
|
+
const [nodeX, nodeY, nodeZ] = [vecSrc.x, vecSrc.y, vecSrc.z];
|
|
139
|
+
const nodeZero = (0).toTree();
|
|
140
|
+
const vec1 = new SpaceVector("v1", opposite(nodeY), nodeX, nodeZero);
|
|
141
|
+
const vec2 = new SpaceVector("v2", nodeZero, opposite(nodeZ), nodeY);
|
|
142
|
+
const vec3 = new SpaceVector("v3", opposite(nodeZ), nodeZero, nodeX);
|
|
143
|
+
const arrIsCanBeZero = shuffle(random([
|
|
144
|
+
[coinFlip(), false, false],
|
|
145
|
+
[coinFlip(), coinFlip(), false],
|
|
146
|
+
]));
|
|
147
|
+
const [factor1, factor2, factor3] = arrIsCanBeZero.map((isCanBeZero) => randint(-3, 4, isCanBeZero ? [] : [0]).toTree());
|
|
148
|
+
return vec1
|
|
149
|
+
.times(factor1)
|
|
150
|
+
.add(vec2.times(factor2))
|
|
151
|
+
.add(vec3.times(factor3));
|
|
152
|
+
}
|
|
153
|
+
getRandomOrthogonalVectorNonZero() {
|
|
154
|
+
function isVectorZero(vec) {
|
|
155
|
+
return [vec.x, vec.y, vec.z].every((node) => NodeComparator.isEqualViaSub(node, (0).toTree()));
|
|
156
|
+
}
|
|
157
|
+
let vecOrth;
|
|
158
|
+
let counter = -1;
|
|
159
|
+
do {
|
|
160
|
+
vecOrth = SpaceVector.createRandomOrthogonalVector(this);
|
|
161
|
+
counter++;
|
|
162
|
+
} while (isVectorZero(vecOrth) && counter < 100);
|
|
163
|
+
if (counter === 100) {
|
|
164
|
+
throw new Error("while looped too much");
|
|
165
|
+
}
|
|
166
|
+
return vecOrth;
|
|
167
|
+
}
|
|
128
168
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Point } from "../../../math/geometry/point.js";
|
|
2
|
-
import { AlgebraicNode } from "../../../tree/nodes/algebraicNode.js";
|
|
2
|
+
import { AlgebraicNode, SimplifyOptions } from "../../../tree/nodes/algebraicNode.js";
|
|
3
3
|
import { VariableNode } from "../../../tree/nodes/variables/variableNode.js";
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -26,7 +26,7 @@ export declare function createNodeFPolynomialFromCoeffs(arrNodeCoeff: AlgebraicN
|
|
|
26
26
|
* @param arrPoint
|
|
27
27
|
* @returns coeffN x^N + ... + coeff2 x^2 + coeff1 x^1 + coeff0
|
|
28
28
|
*/
|
|
29
|
-
export declare function createNodeFTrinomFromPoints(nodeA: AlgebraicNode, arrPoint: Point[]): AlgebraicNode | import("../../../tree/nodes/operators/multiplyNode.js").MultiplyNode;
|
|
29
|
+
export declare function createNodeFTrinomFromPoints(nodeA: AlgebraicNode, arrPoint: Point[], isShouldSimplify?: boolean, simplifyOptionsPass1?: SimplifyOptions, simplifyOptionsPass2?: SimplifyOptions): AlgebraicNode | import("../../../tree/nodes/operators/multiplyNode.js").MultiplyNode;
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
32
|
* @param arrNodeCoeff
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polynomialUtils.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/polynomial/polynomialUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"polynomialUtils.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/polynomial/polynomialUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EACL,aAAa,EACb,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAQ3C,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAO1E;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,aAAa,EACpB,WAAW,EAAE,aAAa,EAAE,iBAO7B;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,cAAc,EAAE,aAAa,mBA4B5E;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,YAAY,EAAE,aAAa,EAAE,EAC7B,wBAAwB,GAAE,OAAc,qFA8CzC;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,KAAK,EAAE,EACjB,gBAAgB,GAAE,OAAe,EACjC,oBAAoB,GAAE,eAAoB,EAC1C,oBAAoB,GAAE,eAAoB,qFAmC3C;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,aAAa,EAAE,uEAGpE;AAaD,eAAO,MAAM,+BAA+B,GAC1C,gBAAgB,aAAa,EAC7B,OAAM;IAAE,OAAO,EAAE,YAAY,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAGrD,WAoGF,CAAC;AAEF,eAAO,MAAM,yCAAyC,GACpD,gBAAgB,aAAa;;;CA+C9B,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,cAAc,EAAE,aAAa,EAC7B,KAAK,EAAE,aAAa,iBAQrB"}
|