File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/2G33-2-4hEpZk7C.js.map
{"version":3,"file":"2G33-2-4hEpZk7C.js","sources":["../../src/exercices/2e/2G33-2.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { ecritureAlgebrique, ecritureParentheseSiNegatif, reduireAxPlusB } from '../../lib/outils/ecritures.js'\nimport Exercice from '../Exercice.js'\n\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nexport const titre = 'Déterminer si des droites sont parallèles, sécantes ou confondues'\n\n/**\n * Description didactique de l'exercice\n * @author Stéphane Guyon\n * Référence 2G33-2, ex 2G50-2\n*/\nexport const uuid = 'e715d'\nexport const ref = '2G33-2'\nexport default function PositionsDeDroites () {\n Exercice.call(this) // Héritage de la classe Exercice()\n this.titre = titre\n this.consigne = 'Déterminer si les droites $\\\\bm{(d)}$ et $\\\\bm{(d\\')}$ dont on donne ci-dessous des équations cartésiennes, sont parallèles, confondues ou sécantes.'\n this.nbQuestions = 3\n this.nbCols = 2 // Uniquement pour la sortie LaTeX\n this.nbColsCorr = 2 // Uniquement pour la sortie LaTeX\n this.sup = 1 // Niveau de difficulté\n this.tailleDiaporama = 2 // Pour les exercices chronométrés. 50 par défaut pour les exercices avec du texte\n this.video = '' // Id YouTube ou url\n\n const typeQuestionsDisponibles = ['type1', 'type1', 'type2'] //, 'type1', 'type2' On créé 2 types de questions\n const listeTypeQuestions = combinaisonListes(typeQuestionsDisponibles, this.nbQuestions) // Tous les types de questions sont posés mais l'ordre diffère à chaque \"cycle\"\n this.nouvelleVersion = function () {\n this.listeQuestions = [] // Liste de questions\n this.listeCorrections = [] // Liste de questions corrigées\n\n for (let i = 0, a1, b1, c1, k, a2, b2, c2, texte, texteCorr, cpt = 0; i < this.nbQuestions && cpt < 50;) {\n // Boucle principale où i+1 correspond au numéro de la question\n switch (listeTypeQuestions[i]) { // Suivant le type de question, le contenu sera différent\n case 'type1':\n a1 = randint(-9, 9, 0)\n b1 = randint(-9, 9, 0)\n c1 = randint(-9, 9)\n a2 = randint(-9, 9, 0)\n b2 = randint(-9, 9, 0)\n c2 = randint(-9, 9)\n\n texte = 'On donne : $(d) : '\n if (a1 !== 0) {\n texte += `${reduireAxPlusB(a1, 0)}`\n }\n if (b1 === 1) { // cas où b=1\n texte += '+ y '\n }\n if (b1 === -1) { // cas où b=1\n texte += '- y '\n }\n if (b1 !== 1 & b1 !== 0 & b1 !== -1) { // cas général\n texte += `${ecritureAlgebrique(b1)} y `\n }\n if (c1 !== 0) {\n texte += `${ecritureAlgebrique(c1)} `\n }\n texte += '=0$ '\n texte += ' et $(d\\') : '\n if (a2 !== 0) {\n texte += `${reduireAxPlusB(a2, 0)}`\n }\n if (b2 === 1) { // cas où b=1\n texte += '+ y '\n }\n if (b2 === -1) { // cas où b=1\n texte += '- y '\n }\n if (b2 !== 1 & b2 !== 0 & b2 !== -1) { // cas général\n texte += `${ecritureAlgebrique(b2)} y `\n }\n if (c2 !== 0) {\n texte += `${ecritureAlgebrique(c2)} `\n }\n texte += '=0$'\n\n texteCorr = 'On sait qu\\'une droite $(d)$ d\\'équation cartésienne :'\n texteCorr += ' $(d) : ax+by+c=0$, avec $(a;b)\\\\neq (0;0)$.'\n texteCorr += '<br>admet un vecteur directeur de coordonnées : '\n texteCorr += '$\\\\vec {u} \\\\begin{pmatrix}-b\\\\\\\\a\\\\end{pmatrix}$.'\n texteCorr += `<br>Comme on a d'après l'énoncé : $a=${a1}$ , $b=${b1}$ , $c=${c1}$ ,`\n texteCorr += 'on en déduit que : $\\\\vec {u} \\\\begin{pmatrix} '\n if (b1 === 0) { texteCorr += '0' } else { texteCorr += `-${ecritureParentheseSiNegatif(b1)}` }\n texteCorr += `\\\\\\\\${a1}\\\\end{pmatrix}$ est un vecteur directeur de $(d)$.`\n texteCorr += `<br>De même, appelons $\\\\vec {u'}$ le vecteur directeur de $(d')$. <br>Comme ici, on a : $a=${a2}$ , $b=${b2}$ , $c=${c2}$ ,`\n texteCorr += 'on en déduit que : $\\\\vec {u\\'} \\\\begin{pmatrix} '\n if (b2 === 0) { texteCorr += '0' } else { texteCorr += `-${ecritureParentheseSiNegatif(b2)}` }\n texteCorr += `\\\\\\\\${a2}\\\\end{pmatrix}$`\n texteCorr += '<br> Pour déterminer la position relative de $(d)$ et $(d\\')$, on étudie la colinéarité des deux vecteurs directeurs. '\n texteCorr += '<br> Pour cela, on calcule leur déterminant : '\n texteCorr += `$Det\\\\big(\\\\vec u;\\\\vec {u'}\\\\big)=\\\\begin{vmatrix}${-b1}&${-b2}\\\\\\\\${a1}&${a2}\\\\end{vmatrix}=${ecritureParentheseSiNegatif(-b1)} \\\\times ${ecritureParentheseSiNegatif(a2)} - ${ecritureParentheseSiNegatif(a1)} \\\\times ${ecritureParentheseSiNegatif(-b2)}=${-b1 * a2 + a1 * b2}$`\n if (-b1 * a2 + a1 * b2 !== 0) {\n texteCorr += '<br>On observe que le déterminant est non-nul. <br>Les vecteurs directeurs des deux droites ne sont donc pas colinéaires.'\n texteCorr += '<br>Les droites $(d)$ et $(d\\')$ ne sont donc pas parallèles.'\n } else {\n texteCorr += '<br>On observe que le déterminant est nul. <br>Les vecteurs directeurs des deux droites sont donc colinéaires.'\n texteCorr += '<br>Les droites $(d)$ et $(d\\')$ sont alors parallèles.'\n }\n if (a1 * b2 === a2 * b1 & a1 * c1 === a2 * c2 & b1 * c2 === b2 * c1) {\n texteCorr += 'On observe même que dans cette situation, les équations étant multiples l\\'une de l\\'autre, les deux droites sont confondues.'\n }\n break\n case 'type2':\n a1 = randint(-9, 9, 0)\n b1 = randint(-9, 5, 0)\n c1 = randint(-5, 5)\n k = randint(-9, 9, [0, 1])\n a2 = a1 * k\n b2 = b1 * k\n c2 = randint(-7, 7)\n\n texte = 'On donne : $(d) : '\n if (a1 !== 0) {\n texte += `${reduireAxPlusB(a1, 0)}`\n }\n if (b1 === 1) { // cas où b=1\n texte += '+ y '\n }\n if (b1 === -1) { // cas où b=1\n texte += '- y '\n }\n if (b1 !== 1 & b1 !== 0 & b1 !== -1) { // cas général\n texte += `${ecritureAlgebrique(b1)} y `\n }\n if (c1 !== 0) {\n texte += `${ecritureAlgebrique(c1)} `\n }\n texte += '=0$ '\n texte += ' et $(d\\') : '\n if (a2 !== 0) {\n texte += `${reduireAxPlusB(a2, 0)}`\n }\n if (b2 === 1) { // cas où b=1\n texte += '+ y '\n }\n if (b2 === -1) { // cas où b=1\n texte += '- y '\n }\n if (b2 !== 1 & b2 !== 0 & b2 !== -1) { // cas général\n texte += `${ecritureAlgebrique(b2)} y `\n }\n if (c2 !== 0) {\n texte += `${ecritureAlgebrique(c2)} `\n }\n texte += '=0$'\n\n texteCorr = 'On sait qu\\'une équation cartésienne de droite de la forme :'\n texteCorr += ' $(d) : ax+by+c=0$, avec $(a;b)\\\\neq (0;0)$.'\n texteCorr += '<br>admet un vecteur directeur de coordonnées : '\n texteCorr += '$\\\\vec {u} \\\\begin{pmatrix}-b\\\\\\\\a\\\\end{pmatrix}$.'\n texteCorr += '<br>Soit $\\\\vec {u}$ le vecteur directeur de $(d)$ :'\n texteCorr += `<br>Comme on a d'après l'énoncé : $a=${a1}$ , $b=${b1}$ , $c=${c1}$ `\n texteCorr += ', on en déduit que : $\\\\vec {u} \\\\begin{pmatrix} '\n if (b1 === 0) { texteCorr += '0' } else { texteCorr += `-${ecritureParentheseSiNegatif(b1)}` }\n texteCorr += `\\\\\\\\${a1}\\\\end{pmatrix}$`\n texteCorr += `<br>De même pour $(d')$ : $a=${a2}$ , $b=${b2}$ , $c=${c2}$ `\n texteCorr += ', on en déduit que : $\\\\vec {u\\'} \\\\begin{pmatrix} '\n if (b2 === 0) { texteCorr += '0' } else { texteCorr += `-${ecritureParentheseSiNegatif(b2)}` }\n texteCorr += `\\\\\\\\${a2}\\\\end{pmatrix}$`\n texteCorr += '<br> Pour déterminer la position relative de $(d)$ et $(d\\')$, on étudie la colinéarité des deux vecteurs directeurs. '\n texteCorr += '<br> Pour cela, on calcule leur déterminant : '\n texteCorr += `$Det\\\\big(\\\\vec u;\\\\vec {u'}\\\\big)=\\\\begin{vmatrix}${-b1}&${-b2}\\\\\\\\${a1}&${a2}\\\\end{vmatrix}=${ecritureParentheseSiNegatif(-b1)} \\\\times ${ecritureParentheseSiNegatif(a2)} - ${ecritureParentheseSiNegatif(a1)} \\\\times ${ecritureParentheseSiNegatif(-b2)}=${-b1 * a2 + a1 * b2}$`\n if (-b1 * a2 + a1 * b2 !== 0) {\n texteCorr += '<br>On observe que le déterminant est non-nul. <br>Les vecteurs directeurs des deux droites ne sont donc pas colinéaires.'\n texteCorr += '<br>Les droites $(d)$ et $(d\\')$ ne sont donc pas parallèles.'\n } else {\n texteCorr += '<br>On observe que le déterminant est nul. <br>Les vecteurs directeurs des deux droites sont donc colinéaires.'\n texteCorr += '<br>Les droites $(d)$ et $(d\\')$ sont alors parallèles.'\n }\n if (a1 * b2 === a2 * b1 & a1 * c1 === a2 * c2 & b1 * c2 === b2 * c1) {\n texteCorr += '<br>On observe même que dans cette situation, les équations étant multiples l\\'une de l\\'autre, les deux droites sont confondues.'\n }\n break\n }\n if (this.questionJamaisPosee(i, a1, b1, c1, b2, c2, a2)) {\n // Si la question n'a jamais été posée, on en crée une autre\n this.listeQuestions.push(texte)\n this.listeCorrections.push(texteCorr)\n i++\n }\n cpt++\n }\n listeQuestionsToContenu(this)\n }\n // this.besoinFormulaireNumerique = ['Niveau de difficulté', 2,'1 : Facile\\n2 : Difficile'];\n}\n"],"names":["titre","uuid","ref","PositionsDeDroites","Exercice","listeTypeQuestions","combinaisonListes","i","a1","b1","c1","k","a2","b2","c2","texte","texteCorr","cpt","randint","reduireAxPlusB","ecritureAlgebrique","ecritureParentheseSiNegatif","listeQuestionsToContenu"],"mappings":"mFAKY,MAACA,EAAQ,oEAORC,EAAO,QACPC,EAAM,SACJ,SAASC,GAAsB,CAC5CC,EAAS,KAAK,IAAI,EAClB,KAAK,MAAQJ,EACb,KAAK,SAAW,sJAChB,KAAK,YAAc,EACnB,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