math-exercises 3.0.200 → 3.0.201
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/calcul/fractions/fractionsSumsPrimeDenominators.js +1 -1
- package/lib/exercises/math/calcul/index.d.ts +1 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +1 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/index.js +1 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.d.ts +14 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.js +263 -0
- package/lib/exercises/math/combinatory/anagrams.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/anagrams.js +89 -68
- package/lib/exercises/math/combinatory/index.d.ts +1 -0
- package/lib/exercises/math/combinatory/index.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/index.js +1 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts +1 -1
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +5 -1
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts +0 -2
- 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/derivation/derivative/trigo/index.d.ts +2 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/index.js +3 -0
- package/lib/exercises/math/derivation/problems/index.d.ts +0 -1
- 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/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +5 -2
- package/lib/exercises/math/derivation/tangent/index.d.ts +0 -1
- 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 -1
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/index.js +2 -1
- package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.d.ts +10 -0
- package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.js +222 -0
- package/lib/exercises/math/derivation/variations/signVarTableProductFExp.js +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +1 -1
- package/lib/exercises/math/functions/affines/index.d.ts +5 -0
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +5 -0
- package/lib/exercises/math/functions/integral/index.d.ts +1 -0
- package/lib/exercises/math/functions/integral/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/index.js +1 -0
- package/lib/exercises/math/functions/integral/integralTrinomialOverX2.d.ts +12 -0
- package/lib/exercises/math/functions/integral/integralTrinomialOverX2.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralTrinomialOverX2.js +280 -0
- package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.d.ts +13 -0
- package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.js +622 -0
- package/lib/exercises/math/functions/logarithm/index.d.ts +5 -0
- package/lib/exercises/math/functions/logarithm/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/index.js +5 -0
- package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.d.ts +10 -0
- package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.js +172 -0
- package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.d.ts +11 -0
- package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.js +163 -0
- package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.d.ts +18 -0
- package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.js +330 -0
- package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.d.ts +11 -0
- package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.js +185 -0
- package/lib/exercises/math/index.d.ts +1 -1
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +2 -1
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts +15 -0
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.js +505 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.d.ts +16 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.js +433 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.d.ts +15 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.js +436 -0
- package/lib/exercises/math/integration/fromExpr/byParts/index.d.ts +3 -0
- package/lib/exercises/math/integration/fromExpr/byParts/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/byParts/index.js +2 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.d.ts +9 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.js +234 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.d.ts +12 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.js +330 -0
- package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.d.ts +15 -0
- package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.js +450 -0
- package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.d.ts +10 -0
- package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.js +261 -0
- package/lib/exercises/math/integration/fromExpr/index.d.ts +8 -0
- package/lib/exercises/math/integration/fromExpr/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/index.js +8 -0
- package/lib/exercises/math/integration/fromExpr/integralFromExpr.d.ts +13 -0
- package/lib/exercises/math/integration/fromExpr/integralFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/integralFromExpr.js +359 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/index.d.ts +2 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/index.js +1 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.d.ts +14 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.js +429 -0
- package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.d.ts +10 -0
- package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.js +286 -0
- package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.d.ts +9 -0
- package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.js +231 -0
- package/lib/exercises/math/integration/fromGraph/index.d.ts +7 -0
- package/lib/exercises/math/integration/fromGraph/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/index.js +6 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.d.ts +15 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.js +464 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.d.ts +15 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.js +493 -0
- package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.d.ts +18 -0
- package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.js +466 -0
- package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.d.ts +10 -0
- package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.js +192 -0
- package/lib/exercises/math/integration/index.d.ts +4 -0
- package/lib/exercises/math/integration/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/index.js +3 -0
- package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.d.ts +14 -0
- package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.d.ts.map +1 -0
- package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.js +222 -0
- package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.d.ts +8 -0
- package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.js +121 -0
- package/lib/exercises/math/limits/index.d.ts +3 -0
- package/lib/exercises/math/limits/index.d.ts.map +1 -1
- package/lib/exercises/math/limits/index.js +3 -0
- package/lib/exercises/math/limits/kLogXPlusTrinomLimit.d.ts +12 -0
- package/lib/exercises/math/limits/kLogXPlusTrinomLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/kLogXPlusTrinomLimit.js +224 -0
- package/lib/exercises/math/limits/logOfPolynomialLimit.d.ts +10 -0
- package/lib/exercises/math/limits/logOfPolynomialLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/logOfPolynomialLimit.js +154 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.d.ts +12 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.js +170 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.d.ts +7 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.js +163 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.d.ts +14 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.js +150 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/index.js +5 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.d.ts +12 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.js +193 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.d.ts +13 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.js +171 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.js +125 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.js +126 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.d.ts +8 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.js +150 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.d.ts +15 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.js +386 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.d.ts +14 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.js +248 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.d.ts +47 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.js +184 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.js +120 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/index.d.ts +7 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/index.js +6 -0
- package/lib/exercises/math/probaStat/binomial/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/binomial/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/index.js +1 -0
- package/lib/exercises/math/probaStat/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -0
- package/lib/exercises/math/probaStat/tchebychev/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/tchebychev/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/index.js +4 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/index.d.ts +4 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/index.js +3 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.d.ts +11 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.js +273 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.d.ts +14 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.js +219 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.d.ts +14 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.js +245 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.d.ts +10 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.js +191 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.d.ts +10 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.js +135 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.d.ts +10 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.js +155 -0
- package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.d.ts +9 -0
- package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.js +124 -0
- package/lib/exercises/math/probaStat/trees/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/index.js +1 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts +4 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/graph/index.js +4 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts +2 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +2 -0
- package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.js +71 -48
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts +2 -1
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/index.js +2 -2
- package/lib/exercises/math/sets/index.d.ts +3 -0
- package/lib/exercises/math/sets/index.d.ts.map +1 -1
- package/lib/exercises/math/sets/index.js +3 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts +6 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/basis/index.js +6 -0
- package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.js +576 -0
- package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.js +595 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.js +501 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.d.ts +16 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.js +753 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.d.ts +12 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.js +546 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.d.ts +13 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.js +233 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.js +192 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.d.ts +15 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.js +511 -0
- package/lib/exercises/math/spaceGeometry/collinearity/index.d.ts +3 -0
- package/lib/exercises/math/spaceGeometry/collinearity/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/collinearity/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +5 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/index.js +5 -1
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts +22 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.js +366 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/index.d.ts +3 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.js +325 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.d.ts +13 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.js +181 -0
- package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.js +208 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.js +255 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.js +232 -0
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts +5 -1
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/planes/index.js +6 -2
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.js +273 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.d.ts +12 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.js +398 -0
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts +22 -0
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.js +509 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.js +229 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.js +200 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.js +176 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.js +263 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts +6 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.js +6 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.js +497 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.js +173 -0
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.js +236 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.js +156 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts +1 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/index.js +1 -0
- package/lib/exercises/utils/data/randomDataTable.d.ts +4 -1
- package/lib/exercises/utils/data/randomDataTable.d.ts.map +1 -1
- package/lib/exercises/utils/data/randomDataTable.js +1 -2
- package/lib/exercises/vea/varLineVEA.d.ts.map +1 -1
- package/lib/exercises/vea/varLineVEA.js +15 -2
- package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -1
- package/lib/exercises/vea/xTableLineVEA.js +13 -2
- package/lib/index.d.ts +539 -34
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +9 -7
- package/lib/math/geometry/parametricLine.d.ts +1 -1
- package/lib/math/geometry/parametricLine.d.ts.map +1 -1
- package/lib/math/geometry/parametricLine.js +2 -2
- package/lib/math/geometry/spaceVector.d.ts +11 -1
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +18 -4
- package/lib/math/probability/randomVariable.d.ts +3 -2
- package/lib/math/probability/randomVariable.d.ts.map +1 -1
- package/lib/math/probability/randomVariable.js +14 -8
- package/lib/math/systems/generalSystem.d.ts +3 -3
- package/lib/math/systems/generalSystem.d.ts.map +1 -1
- package/lib/math/systems/generalSystem.js +20 -17
- package/lib/math/utils/functions/functionComparison.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComparison.js +2 -45
- package/lib/math/utils/functions/functionComposition.d.ts +3 -1
- package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComposition.js +17 -17
- package/lib/math/utils/integration/rectanglesMethod.d.ts +6 -0
- package/lib/math/utils/integration/rectanglesMethod.d.ts.map +1 -0
- package/lib/math/utils/integration/rectanglesMethod.js +66 -0
- package/lib/math/utils/polynomial/polynomialUtils.d.ts +9 -1
- package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -1
- package/lib/math/utils/polynomial/polynomialUtils.js +66 -7
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +34 -2
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.js +288 -47
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +5 -2
- package/lib/tests/singleExo.test.js +2 -2
- package/lib/tree/nodes/functions/cosNode.d.ts +1 -1
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +5 -2
- package/lib/tree/nodes/functions/factorialNode.d.ts +1 -0
- package/lib/tree/nodes/functions/factorialNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/factorialNode.js +16 -1
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +2 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +2 -0
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.js +34 -0
- package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.js +1 -0
- package/lib/tree/utilities/nodeComparator.d.ts +7 -0
- package/lib/tree/utilities/nodeComparator.d.ts.map +1 -1
- package/lib/tree/utilities/nodeComparator.js +59 -0
- package/lib/tree/utilities/nodeInspector.d.ts +2 -0
- package/lib/tree/utilities/nodeInspector.d.ts.map +1 -1
- package/lib/tree/utilities/nodeInspector.js +23 -1
- package/lib/tree/utilities/nodeRewriter.d.ts.map +1 -1
- package/lib/tree/utilities/nodeRewriter.js +4 -1
- package/lib/types/keyIds.d.ts +1 -1
- package/lib/types/keyIds.d.ts.map +1 -1
- package/lib/utils/strings/splitAndKeep.d.ts +2 -0
- package/lib/utils/strings/splitAndKeep.d.ts.map +1 -0
- package/lib/utils/strings/splitAndKeep.js +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { ParametricLine } from "../../../../math/geometry/parametricLine.js";
|
|
4
|
+
import { SpacePointConstructor, } from "../../../../math/geometry/spacePoint.js";
|
|
5
|
+
import { SpaceVectorConstructor, } from "../../../../math/geometry/spaceVector.js";
|
|
6
|
+
import { nodeBySubstitutingVar } from "../../../../math/utils/functions/functionComposition.js";
|
|
7
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
8
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
9
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
10
|
+
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
11
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
12
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
13
|
+
import { zip } from "../../../../utils/arrays/arrayZip.js";
|
|
14
|
+
const texForSystem = (spacePointLhs, parametricLineRhs) => {
|
|
15
|
+
return `\\left\\{\\begin{matrix}
|
|
16
|
+
${spacePointLhs.x.toTex()}=${parametricLineRhs.equations[0].toTex()} \\\\
|
|
17
|
+
${spacePointLhs.y.toTex()}=${parametricLineRhs.equations[1].toTex()} \\\\
|
|
18
|
+
${spacePointLhs.z.toTex()}=${parametricLineRhs.equations[2].toTex()}
|
|
19
|
+
\\end{matrix}
|
|
20
|
+
\\right.`;
|
|
21
|
+
};
|
|
22
|
+
const findNodeParameterForSpacePointOnParametricLine = (spacePoint, parametricLine, varNameOfParameter) => {
|
|
23
|
+
if (!parametricLine.hasPoint(spacePoint)) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const [nodeRhs, index] = parametricLine.equations
|
|
28
|
+
.map((node, i) => [node, i])
|
|
29
|
+
.find(([node]) => node.toTex().includes(varNameOfParameter));
|
|
30
|
+
const [_varNamePointWise, nodePointCoord] = zip(["x", "y", "z"], [spacePoint.x, spacePoint.y, spacePoint.z])[index];
|
|
31
|
+
const nodeA = nodeRhs
|
|
32
|
+
.derivative(varNameOfParameter)
|
|
33
|
+
.simplify({ towardsDistribute: true });
|
|
34
|
+
const nodeB = nodeBySubstitutingVar(nodeRhs, (0).toTree(), new VariableNode(varNameOfParameter)).simplify({ towardsDistribute: true });
|
|
35
|
+
//xOrYOrZ=at+b <=> t = (xOrYOrZ-b)/a
|
|
36
|
+
return frac(substract(nodePointCoord, nodeB), nodeA);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const isSpacePointIntersectionOfParametricLines = (spacePoint, parametricLine1, parametricLine2) => {
|
|
40
|
+
return (parametricLine1.hasPoint(spacePoint) && parametricLine2.hasPoint(spacePoint));
|
|
41
|
+
};
|
|
42
|
+
const createMyPropositions = (identifiers) => {
|
|
43
|
+
const { A, B, parametricLine1, parametricLine2 } = getHydrated(identifiers);
|
|
44
|
+
const propositions = [];
|
|
45
|
+
let isValidAlreadyGiven = false;
|
|
46
|
+
//intersection is point
|
|
47
|
+
[A, B].forEach((spacePoint) => {
|
|
48
|
+
const str = `Le point d'intersection de $d_{1}$ et $d_{2}$ est $${spacePoint.toTexWithCoords()}$.`;
|
|
49
|
+
if (isSpacePointIntersectionOfParametricLines(spacePoint, parametricLine1, parametricLine2)) {
|
|
50
|
+
addValidProp(propositions, str, "raw");
|
|
51
|
+
isValidAlreadyGiven = true;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//lines are parallel
|
|
58
|
+
{
|
|
59
|
+
const str = `$d_{1}$ et $d_{2}$ sont parallèles.`;
|
|
60
|
+
if (parametricLine1.vector.isColinear(parametricLine2.vector)) {
|
|
61
|
+
addValidProp(propositions, str, "raw");
|
|
62
|
+
isValidAlreadyGiven = true;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
//lines are non-coplanar
|
|
69
|
+
{
|
|
70
|
+
const str = `$d_{1}$ et $d_{2}$ sont non coplanaires.`;
|
|
71
|
+
if (!isValidAlreadyGiven) {
|
|
72
|
+
addValidProp(propositions, str, "raw");
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return propositions;
|
|
79
|
+
};
|
|
80
|
+
const getHydrated = (identifiers) => {
|
|
81
|
+
const { spacePointIdsAB, spaceLineIds } = identifiers;
|
|
82
|
+
const [A, B] = spacePointIdsAB.map((spacePointIds) => SpacePointConstructor.fromIdentifiers(spacePointIds));
|
|
83
|
+
const [parametricLine1, parametricLine2] = zip(["t", "t'"], spaceLineIds).map(([varName, { spacePointIds, spaceVectorIds }]) => {
|
|
84
|
+
const spacePoint = SpacePointConstructor.fromIdentifiers(spacePointIds);
|
|
85
|
+
const spaceVector = SpaceVectorConstructor.fromIdentifiers(spaceVectorIds);
|
|
86
|
+
return new ParametricLine(spacePoint, spaceVector, varName);
|
|
87
|
+
});
|
|
88
|
+
return {
|
|
89
|
+
A,
|
|
90
|
+
B,
|
|
91
|
+
parametricLine1,
|
|
92
|
+
parametricLine2,
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
const getInstruction = (identifiers) => {
|
|
96
|
+
const { parametricLine1, parametricLine2 } = getHydrated(identifiers);
|
|
97
|
+
return `Soient $d_{1}$ et $d_{2}$ deux droites telles que :
|
|
98
|
+
|
|
99
|
+
$$
|
|
100
|
+
(d_{1}): ${parametricLine1.toTex()} \\ (t \\in \\mathbb{R})
|
|
101
|
+
$$
|
|
102
|
+
|
|
103
|
+
$$
|
|
104
|
+
(d_{2}): ${parametricLine2.toTex()} \\ (t' \\in \\mathbb{R})
|
|
105
|
+
$$
|
|
106
|
+
|
|
107
|
+
Parmi les propositions ci-dessous, déterminer celle qui est vraie.`;
|
|
108
|
+
};
|
|
109
|
+
const getAnswer = (identifiers) => {
|
|
110
|
+
return createMyPropositions(identifiers).find((proposition) => proposition.isRightAnswer).statement;
|
|
111
|
+
};
|
|
112
|
+
const getHint = () => {
|
|
113
|
+
return `Deux droites coplanaires sont soit sécantes soit parallèles. Autrement dit, deux droites non coplanaires ne sont ni sécantes ni parallèles.
|
|
114
|
+
|
|
115
|
+
Procède donc par élimination.
|
|
116
|
+
Premièrement, vérifie s'il y a un point dont les coordonnées peuvent être générées avec chacune des $2$ équations paramétriques.
|
|
117
|
+
Dans ce cas les droites sont sécantes en ce point.
|
|
118
|
+
Sinon, regarde si les deux droites ont des vecteurs directeurs colinéaires :
|
|
119
|
+
s'ils sont colinéaires, les droites sont parallèles
|
|
120
|
+
et s'ils ne sont pas colinéaires alors les droites ne sont pas coplanaires.`;
|
|
121
|
+
};
|
|
122
|
+
const getCorrection = (identifiers) => {
|
|
123
|
+
const { A, B, parametricLine1, parametricLine2 } = getHydrated(identifiers);
|
|
124
|
+
const [[texSystem1A, texSystem2A], [texSystem1B, texSystem2B]] = [A, B].map((spacePoint) => [parametricLine1, parametricLine2].map((parametricLine) => texForSystem(spacePoint, parametricLine)));
|
|
125
|
+
const [_, indexRightAnswer] = createMyPropositions(identifiers)
|
|
126
|
+
.map((proposition, i) => [proposition, i])
|
|
127
|
+
.find(([proposition, _]) => proposition.isRightAnswer);
|
|
128
|
+
const texAIsIntersection = `On commence par vérifier si $A$ est un point d'intersection.
|
|
129
|
+
|
|
130
|
+
Pour $A$ :
|
|
131
|
+
|
|
132
|
+
$$
|
|
133
|
+
${texSystem1A}
|
|
134
|
+
$$
|
|
135
|
+
|
|
136
|
+
${(() => {
|
|
137
|
+
const nodeT = findNodeParameterForSpacePointOnParametricLine(A, parametricLine1, "t")?.simplify({ towardsDistribute: true });
|
|
138
|
+
if (nodeT !== undefined) {
|
|
139
|
+
return `admet pour solution $t=${nodeT.toTex()}$`;
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
return `n'admet pas de solution.`;
|
|
143
|
+
}
|
|
144
|
+
})()}
|
|
145
|
+
|
|
146
|
+
$$
|
|
147
|
+
${texSystem2A}
|
|
148
|
+
$$
|
|
149
|
+
|
|
150
|
+
${(() => {
|
|
151
|
+
const nodeTPrime = findNodeParameterForSpacePointOnParametricLine(A, parametricLine2, "t'")?.simplify({ towardsDistribute: true });
|
|
152
|
+
if (nodeTPrime !== undefined) {
|
|
153
|
+
return `admet pour solution $t'=${nodeTPrime.toTex()}$`;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
return `n'admet pas de solution.`;
|
|
157
|
+
}
|
|
158
|
+
})()}
|
|
159
|
+
|
|
160
|
+
${indexRightAnswer === 0
|
|
161
|
+
? `Donc $A$ est le point d'intersection de $d_{1}$ et $d_{2}$.`
|
|
162
|
+
: `Donc $A$ n'est pas le point d'intersection de $d_{1}$ et $d_{2}$.`}`;
|
|
163
|
+
const texBIsIntersection = `Pour $B$ :
|
|
164
|
+
|
|
165
|
+
$$
|
|
166
|
+
${texSystem1B}
|
|
167
|
+
$$
|
|
168
|
+
|
|
169
|
+
${(() => {
|
|
170
|
+
const nodeT = findNodeParameterForSpacePointOnParametricLine(B, parametricLine1, "t")?.simplify({ towardsDistribute: true });
|
|
171
|
+
if (nodeT !== undefined) {
|
|
172
|
+
return `admet pour solution $t=${nodeT.toTex()}$`;
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
return `n'admet pas de solution.`;
|
|
176
|
+
}
|
|
177
|
+
})()}
|
|
178
|
+
|
|
179
|
+
$$
|
|
180
|
+
${texSystem2B}
|
|
181
|
+
$$
|
|
182
|
+
|
|
183
|
+
${(() => {
|
|
184
|
+
const nodeTPrime = findNodeParameterForSpacePointOnParametricLine(B, parametricLine2, "t'")?.simplify({ towardsDistribute: true });
|
|
185
|
+
if (nodeTPrime !== undefined) {
|
|
186
|
+
return `admet pour solution $t'=${nodeTPrime.toTex()}$`;
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
return `n'admet pas de solution.`;
|
|
190
|
+
}
|
|
191
|
+
})()}
|
|
192
|
+
|
|
193
|
+
${indexRightAnswer === 1
|
|
194
|
+
? `Donc $B$ est le point d'intersection de $d_{1}$ et $d_{2}$.`
|
|
195
|
+
: `Donc $B$ n'est pas le point d'intersection de $d_{1}$ et $d_{2}$.`}`;
|
|
196
|
+
const texParallel = `Les vecteurs directeurs respectifs des droites $d_{1}$ et $d_{2}$ sont :
|
|
197
|
+
|
|
198
|
+
$$
|
|
199
|
+
\\overrightarrow{v_{1}} = ${parametricLine1.vector.toCoordsTex()}
|
|
200
|
+
$$
|
|
201
|
+
|
|
202
|
+
$$
|
|
203
|
+
\\overrightarrow{v_{2}} = ${parametricLine2.vector.toCoordsTex()}
|
|
204
|
+
$$
|
|
205
|
+
|
|
206
|
+
${indexRightAnswer === 2
|
|
207
|
+
? `Ils sont colinéaires donc $d_{1}$ et $d_{2}$ sont parallèles.`
|
|
208
|
+
: `Ils ne sont pas colinéaires donc $d_{1}$ et $d_{2}$ ne sont pas parallèles.`}`;
|
|
209
|
+
const texNonSecant = "Les droites ne sont ni sécantes ni parallèles. Elles sont donc non coplanaires.";
|
|
210
|
+
return [
|
|
211
|
+
texAIsIntersection,
|
|
212
|
+
texBIsIntersection,
|
|
213
|
+
texParallel,
|
|
214
|
+
texNonSecant,
|
|
215
|
+
].reduce((acc, tex, i) => {
|
|
216
|
+
return i <= indexRightAnswer
|
|
217
|
+
? [acc, tex].join(`
|
|
218
|
+
|
|
219
|
+
`)
|
|
220
|
+
: acc;
|
|
221
|
+
}, "");
|
|
222
|
+
};
|
|
223
|
+
const getPropositions = (_n, { answer, ...identifiers }) => {
|
|
224
|
+
return createMyPropositions(identifiers);
|
|
225
|
+
};
|
|
226
|
+
const createRandomIdentifiers = () => {
|
|
227
|
+
const [vecU, vecV] = ["u", "v"].reduce((acc, name) => {
|
|
228
|
+
let vec;
|
|
229
|
+
do {
|
|
230
|
+
vec = SpaceVectorConstructor.random(name, false);
|
|
231
|
+
} while (acc.some((vecExisting) => vec.isColinear(vecExisting)));
|
|
232
|
+
return [...acc, vec];
|
|
233
|
+
}, []);
|
|
234
|
+
const [A, B] = SpacePointConstructor.randomDifferent(["A", "B", "C"]);
|
|
235
|
+
const [[P1, vec1], [P2, vec2]] = (() => {
|
|
236
|
+
const rand = randint(0, 4);
|
|
237
|
+
switch (rand) {
|
|
238
|
+
case 0: {
|
|
239
|
+
const [vec1, vec2] = [vecU, vecV];
|
|
240
|
+
const [P1, P2] = zip([vec1, vec2], shuffle([false, coinFlip()])).map(([vec, isZeroAllowed]) => vec
|
|
241
|
+
.times(randint(-2, 3, isZeroAllowed ? [] : [0]).toTree())
|
|
242
|
+
.getEndPoint(A));
|
|
243
|
+
return [
|
|
244
|
+
[P1, vec1],
|
|
245
|
+
[P2, vec2],
|
|
246
|
+
];
|
|
247
|
+
}
|
|
248
|
+
case 1: {
|
|
249
|
+
const [vec1, vec2] = [vecU, vecV];
|
|
250
|
+
const [P1, P2] = zip([vec1, vec2], shuffle([false, coinFlip()])).map(([vec, isZeroAllowed]) => vec
|
|
251
|
+
.times(randint(-2, 3, isZeroAllowed ? [] : [0]).toTree())
|
|
252
|
+
.getEndPoint(B));
|
|
253
|
+
return [
|
|
254
|
+
[P1, vec1],
|
|
255
|
+
[P2, vec2],
|
|
256
|
+
];
|
|
257
|
+
}
|
|
258
|
+
case 2: {
|
|
259
|
+
const [vec1, vec2] = coinFlip() ? [vecU, vecU] : [vecV, vecV];
|
|
260
|
+
const [P1, P2] = zip([A, B], zip([vec1, vec2], shuffle([false, coinFlip()]))).map(([spacePoint, [vec, isZeroAllowed]]) => vec
|
|
261
|
+
.times(randint(-2, 3, isZeroAllowed ? [] : [0]).toTree())
|
|
262
|
+
.getEndPoint(spacePoint));
|
|
263
|
+
return [
|
|
264
|
+
[P1, vec1],
|
|
265
|
+
[P2, vec2],
|
|
266
|
+
];
|
|
267
|
+
}
|
|
268
|
+
case 3: {
|
|
269
|
+
const [vec1, vec2] = [vecU, vecV];
|
|
270
|
+
const [P1, P2] = zip([A, B], zip([vec1, vec2], shuffle([false, coinFlip()]))).map(([spacePoint, [vec, isZeroAllowed]]) => vec
|
|
271
|
+
.times(randint(-2, 3, isZeroAllowed ? [] : [0]).toTree())
|
|
272
|
+
.getEndPoint(spacePoint));
|
|
273
|
+
return [
|
|
274
|
+
[P1, vec1],
|
|
275
|
+
[P2, vec2],
|
|
276
|
+
];
|
|
277
|
+
}
|
|
278
|
+
default:
|
|
279
|
+
throw new Error("Unsupported rand: " + rand);
|
|
280
|
+
}
|
|
281
|
+
})();
|
|
282
|
+
const identifiers = {
|
|
283
|
+
spacePointIdsAB: [A, B].map((spacePoint) => spacePoint.toIdentifiers()),
|
|
284
|
+
spaceLineIds: [
|
|
285
|
+
[P1, vec1],
|
|
286
|
+
[P2, vec2],
|
|
287
|
+
].map(([spacePoint, spaceVector]) => {
|
|
288
|
+
return {
|
|
289
|
+
spacePointIds: spacePoint.toIdentifiers(),
|
|
290
|
+
spaceVectorIds: spaceVector.toIdentifiers(),
|
|
291
|
+
};
|
|
292
|
+
}),
|
|
293
|
+
};
|
|
294
|
+
return identifiers;
|
|
295
|
+
};
|
|
296
|
+
const getLineLineRelativePositionsFromParametricLinesQuestion = () => {
|
|
297
|
+
const identifiers = createRandomIdentifiers();
|
|
298
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
299
|
+
};
|
|
300
|
+
const getQuestionFromIdentifiers = (identifiers, _opts) => {
|
|
301
|
+
const question = {
|
|
302
|
+
answer: getAnswer(identifiers),
|
|
303
|
+
instruction: getInstruction(identifiers),
|
|
304
|
+
answerFormat: "raw",
|
|
305
|
+
identifiers,
|
|
306
|
+
hint: getHint(identifiers),
|
|
307
|
+
correction: getCorrection(identifiers),
|
|
308
|
+
};
|
|
309
|
+
return question;
|
|
310
|
+
};
|
|
311
|
+
export const lineLineRelativePositionsFromParametricLines = {
|
|
312
|
+
id: "lineLineRelativePositionsFromParametricLines",
|
|
313
|
+
label: "Déterminer les positions relatives de deux droites dont sont données les représentations paramétriques",
|
|
314
|
+
isSingleStep: true,
|
|
315
|
+
generator: (nb, opts) => getDistinctQuestions(() => getLineLineRelativePositionsFromParametricLinesQuestion(opts), nb),
|
|
316
|
+
qcmTimer: 60,
|
|
317
|
+
freeTimer: 60,
|
|
318
|
+
getPropositions,
|
|
319
|
+
subject: "Mathématiques",
|
|
320
|
+
getQuestionFromIdentifiers,
|
|
321
|
+
getHint,
|
|
322
|
+
getCorrection,
|
|
323
|
+
hasHintAndCorrection: true,
|
|
324
|
+
answerType: "QCU",
|
|
325
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { SpacePointIdentifiers } from "../../../../math/geometry/spacePoint.js";
|
|
3
|
+
import { SpaceVectorIdentifiers } from "../../../../math/geometry/spaceVector.js";
|
|
4
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
5
|
+
type Identifiers = {
|
|
6
|
+
spacePointIds: SpacePointIdentifiers;
|
|
7
|
+
spaceVectorIds: SpaceVectorIdentifiers;
|
|
8
|
+
randInstr: number;
|
|
9
|
+
nodeIdsFactor: NodeIdentifiers;
|
|
10
|
+
};
|
|
11
|
+
export declare const parametricLineFromPointAndDirectionVector: Exercise<Identifiers>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=parametricLineFromPointAndDirectionVector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parametricLineFromPointAndDirectionVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAGL,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAK5C,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAS7C,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,qBAAqB,CAAC;IACrC,cAAc,EAAE,sBAAsB,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,eAAe,CAAC;CAChC,CAAC;AAgQF,eAAO,MAAM,yCAAyC,EAAE,QAAQ,CAAC,WAAW,CAoBzE,CAAC"}
|
package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.js
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { addValidProp, tryToAddWrongProp, shuffleProps, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { ParametricLine } from "../../../../math/geometry/parametricLine.js";
|
|
4
|
+
import { SpacePoint, SpacePointConstructor, } from "../../../../math/geometry/spacePoint.js";
|
|
5
|
+
import { SpaceVector, SpaceVectorConstructor, } from "../../../../math/geometry/spaceVector.js";
|
|
6
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
7
|
+
import { EqualNode } from "../../../../tree/nodes/equations/equalNode.js";
|
|
8
|
+
import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
|
|
9
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
10
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
11
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
12
|
+
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
13
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
14
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
15
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
16
|
+
import { zip } from "../../../../utils/arrays/arrayZip.js";
|
|
17
|
+
const getHydrated = (identifiers) => {
|
|
18
|
+
const { spacePointIds, spaceVectorIds, nodeIdsFactor } = identifiers;
|
|
19
|
+
const spacePoint = SpacePointConstructor.fromIdentifiers(spacePointIds);
|
|
20
|
+
const spaceVector = SpaceVectorConstructor.fromIdentifiers(spaceVectorIds);
|
|
21
|
+
const nodeFactor = NodeConstructor.fromIdentifiers(nodeIdsFactor);
|
|
22
|
+
const spaceVectorScaled = spaceVector.times(nodeFactor);
|
|
23
|
+
const parametricLineAnswer = new ParametricLine(spacePoint, spaceVectorScaled);
|
|
24
|
+
return {
|
|
25
|
+
spacePoint,
|
|
26
|
+
spaceVector,
|
|
27
|
+
spaceVectorScaled,
|
|
28
|
+
parametricLineAnswer,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
const getInstruction = (identifiers) => {
|
|
32
|
+
const { randInstr } = identifiers;
|
|
33
|
+
const { spacePoint, spaceVector } = getHydrated(identifiers);
|
|
34
|
+
switch (randInstr) {
|
|
35
|
+
case 0:
|
|
36
|
+
return `Donner l'équation paramétrique de la droite de vecteur directeur $${spaceVector.toCoordsTex()}$ passant par le point $${spacePoint.toTexWithCoords()}$`;
|
|
37
|
+
case 1:
|
|
38
|
+
return `Donner l'équation paramétrique de la droite passant par le point $${spacePoint.toTexWithCoords()}$ et dont $${spaceVector.toCoordsTex()}$ est un vecteur directeur.`;
|
|
39
|
+
default:
|
|
40
|
+
throw new Error("Unsupported randInstr: " + randInstr);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const getAnswer = (identifiers) => {
|
|
44
|
+
const { parametricLineAnswer } = getHydrated(identifiers);
|
|
45
|
+
return `${parametricLineAnswer.toTex()} \\ (t \\in \\mathbb{R})`;
|
|
46
|
+
};
|
|
47
|
+
const getHint = () => {
|
|
48
|
+
const I = new SpacePoint("I", new VariableNode("x_{I}"), new VariableNode("y_{I}"), new VariableNode("z_{I}"));
|
|
49
|
+
const vecU = new SpaceVector("u", new VariableNode("u_{x}"), new VariableNode("u_{y}"), new VariableNode("u_{z}"));
|
|
50
|
+
const parametricLine = new ParametricLine(I, vecU);
|
|
51
|
+
return `La droite $d$ passant par le point $${I.toTexWithCoords()}$ et dont $${vecU.toTexWithCoords()}$ est un vecteur directeur a pour équation paramétrique :
|
|
52
|
+
|
|
53
|
+
$$
|
|
54
|
+
${parametricLine.toTex()} \\ (t \\in \\mathbb{R})
|
|
55
|
+
$$
|
|
56
|
+
|
|
57
|
+
De plus, si $\\overrightarrow{u}$ est un vecteur directeur de $d$ alors $k\\overrightarrow{u}$ ($k \\in \\mathbb{R}, k \\neq 0$) est aussi un vecteur directeur de $d$.
|
|
58
|
+
|
|
59
|
+
`;
|
|
60
|
+
};
|
|
61
|
+
const getCorrection = (identifiers) => {
|
|
62
|
+
const { spacePoint, spaceVector, parametricLineAnswer } = getHydrated(identifiers);
|
|
63
|
+
return `La droite passant par le point $${spacePoint.toTexWithCoords()}$ et dont $${spaceVector.toTexWithCoords()}$ est un vecteur directeur a pour équation paramétrique :
|
|
64
|
+
|
|
65
|
+
$$
|
|
66
|
+
${parametricLineAnswer.toTex()} \\ (t \\in \\mathbb{R})
|
|
67
|
+
$$
|
|
68
|
+
|
|
69
|
+
`;
|
|
70
|
+
};
|
|
71
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
72
|
+
const propositions = [];
|
|
73
|
+
addValidProp(propositions, answer);
|
|
74
|
+
const { spacePoint, spaceVector } = getHydrated(identifiers);
|
|
75
|
+
//student: "+point" -> "-point"
|
|
76
|
+
{
|
|
77
|
+
const identifiersWrong = {
|
|
78
|
+
...identifiers,
|
|
79
|
+
spacePointIds: new SpacePoint("v", opposite(spacePoint.x), opposite(spacePoint.y), opposite(spacePoint.z)).toIdentifiers(),
|
|
80
|
+
};
|
|
81
|
+
const texWrong = getAnswer(identifiersWrong);
|
|
82
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
83
|
+
}
|
|
84
|
+
//student: point <-> vector
|
|
85
|
+
{
|
|
86
|
+
const identifiersWrong = {
|
|
87
|
+
...identifiers,
|
|
88
|
+
spacePointIds: new SpacePoint(spacePoint.name, spaceVector.x, spaceVector.y, spaceVector.z).toIdentifiers(),
|
|
89
|
+
spaceVectorIds: new SpaceVector("v", spacePoint.x, spacePoint.y, spacePoint.z).toIdentifiers(),
|
|
90
|
+
};
|
|
91
|
+
const texWrong = getAnswer(identifiersWrong);
|
|
92
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
93
|
+
}
|
|
94
|
+
//student: t, t', t'' as parameters
|
|
95
|
+
{
|
|
96
|
+
const pointCoords = [spacePoint.x, spacePoint.y, spacePoint.z];
|
|
97
|
+
const vectorCoords = [spaceVector.x, spaceVector.y, spaceVector.z];
|
|
98
|
+
const equations = ["t", "t'", "t''"].map((varName, i) => add(pointCoords[i], multiply(vectorCoords[i], new VariableNode(varName))).simplify({ forbidFactorize: true }));
|
|
99
|
+
const texSystem = `\\left\\{\\begin{matrix}
|
|
100
|
+
x=${equations[0].toTex()} \\\\
|
|
101
|
+
y=${equations[1].toTex()} \\\\
|
|
102
|
+
z=${equations[2].toTex()}
|
|
103
|
+
\\end{matrix}
|
|
104
|
+
\\right.`;
|
|
105
|
+
const texWrong = `${texSystem} \\ ((t,t',t'') \\in \\mathbb{R}^{3})`;
|
|
106
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
107
|
+
}
|
|
108
|
+
//student: x,y,z as parameters
|
|
109
|
+
{
|
|
110
|
+
const pointCoords = [spacePoint.x, spacePoint.y, spacePoint.z];
|
|
111
|
+
const vectorCoords = [spaceVector.x, spaceVector.y, spaceVector.z];
|
|
112
|
+
const equations = ["x", "y", "z"].map((varName, i) => add(pointCoords[i], multiply(vectorCoords[i], new VariableNode(varName))).simplify({ forbidFactorize: true }));
|
|
113
|
+
const texSystem = `\\left\\{\\begin{matrix}
|
|
114
|
+
x=${equations[0].toTex()} \\\\
|
|
115
|
+
y=${equations[1].toTex()} \\\\
|
|
116
|
+
z=${equations[2].toTex()}
|
|
117
|
+
\\end{matrix}
|
|
118
|
+
\\right.`;
|
|
119
|
+
const texWrong = `${texSystem}`;
|
|
120
|
+
tryToAddWrongProp(propositions, texWrong);
|
|
121
|
+
}
|
|
122
|
+
//student: plane equation
|
|
123
|
+
{
|
|
124
|
+
const [nodeVarX, nodeVarY, nodeVarZ] = ["x", "y", "z"].map((name) => new VariableNode(name));
|
|
125
|
+
const createPlaneEquationFromNormalVectorAndContainedPoint = (vec, spacePoint) => {
|
|
126
|
+
const [nodeA, nodeB, nodeC] = [vec.x, vec.y, vec.z];
|
|
127
|
+
const nodeD = opposite(add(multiply(nodeA, spacePoint.x), add(multiply(nodeB, spacePoint.y), multiply(nodeC, spacePoint.z))));
|
|
128
|
+
const nodeLhs = add(add(multiply(nodeA, nodeVarX), add(multiply(nodeB, nodeVarY), multiply(nodeC, nodeVarZ))), nodeD).simplify({ towardsDistribute: true });
|
|
129
|
+
return new EqualNode(nodeLhs, (0).toTree());
|
|
130
|
+
};
|
|
131
|
+
const planeEquation = createPlaneEquationFromNormalVectorAndContainedPoint(spaceVector, spacePoint);
|
|
132
|
+
tryToAddWrongProp(propositions, planeEquation.toTex());
|
|
133
|
+
}
|
|
134
|
+
return shuffleProps(propositions, n);
|
|
135
|
+
};
|
|
136
|
+
const createRandomIdentifiers = () => {
|
|
137
|
+
const funcRand1 = () => randint(-3, 4, coinFlip() ? [0] : []).toTree();
|
|
138
|
+
const funcRand2 = () => randint(-6, 7, coinFlip() ? [0] : []).toTree();
|
|
139
|
+
const funcRand3 = () => randint(-9, 10, coinFlip() ? [0] : []).toTree();
|
|
140
|
+
const [vecV] = zip(["v"], [shuffle([funcRand3, funcRand2, funcRand1])]).map(([name, [funcRandX, funcRandY, funcRandZ]]) => new SpaceVector(name, funcRandX(), funcRandY(), funcRandZ()));
|
|
141
|
+
const spacePoint = new SpacePoint(random("ABCDRST".split("")), randint(-4, 5).toTree(), randint(-4, 5).toTree(), randint(-4, 5).toTree());
|
|
142
|
+
const randInstr = randint(0, 2);
|
|
143
|
+
const nodeFactor = randint(-4, 5, [0]).toTree();
|
|
144
|
+
const identifiers = {
|
|
145
|
+
spacePointIds: spacePoint.toIdentifiers(),
|
|
146
|
+
spaceVectorIds: vecV.toIdentifiers(),
|
|
147
|
+
randInstr,
|
|
148
|
+
nodeIdsFactor: nodeFactor.toIdentifiers(),
|
|
149
|
+
};
|
|
150
|
+
return identifiers;
|
|
151
|
+
};
|
|
152
|
+
const getParametricLineFromPointAndDirectionVectorQuestion = () => {
|
|
153
|
+
const identifiers = createRandomIdentifiers();
|
|
154
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
155
|
+
};
|
|
156
|
+
const getQuestionFromIdentifiers = (identifiers, _opts) => {
|
|
157
|
+
const question = {
|
|
158
|
+
answer: getAnswer(identifiers),
|
|
159
|
+
instruction: getInstruction(identifiers),
|
|
160
|
+
answerFormat: "tex",
|
|
161
|
+
identifiers,
|
|
162
|
+
hint: getHint(identifiers),
|
|
163
|
+
correction: getCorrection(identifiers),
|
|
164
|
+
};
|
|
165
|
+
return question;
|
|
166
|
+
};
|
|
167
|
+
export const parametricLineFromPointAndDirectionVector = {
|
|
168
|
+
id: "parametricLineFromPointAndDirectionVector",
|
|
169
|
+
label: "Déterminer une représentation paramétrique d'une droite connaissant un point et un vecteur directeur",
|
|
170
|
+
isSingleStep: true,
|
|
171
|
+
generator: (nb, opts) => getDistinctQuestions(() => getParametricLineFromPointAndDirectionVectorQuestion(opts), nb),
|
|
172
|
+
qcmTimer: 60,
|
|
173
|
+
freeTimer: 60,
|
|
174
|
+
getPropositions,
|
|
175
|
+
subject: "Mathématiques",
|
|
176
|
+
getQuestionFromIdentifiers,
|
|
177
|
+
getHint,
|
|
178
|
+
getCorrection,
|
|
179
|
+
hasHintAndCorrection: true,
|
|
180
|
+
answerType: "QCU",
|
|
181
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { SpacePointIdentifiers } from "../../../../math/geometry/spacePoint.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
spacePointIds: SpacePointIdentifiers;
|
|
6
|
+
nodeIdsPlaneEquation: NodeIdentifiers;
|
|
7
|
+
};
|
|
8
|
+
export declare const checkIsPointBelongingToPlane: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=checkIsPointBelongingToPlane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkIsPointBelongingToPlane.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAO3C,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAqC7C,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,qBAAqB,CAAC;IACrC,oBAAoB,EAAE,eAAe,CAAC;CACvC,CAAC;AAyPF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAkB9D,CAAC"}
|