HEX
Server: Apache
System: Linux vps.mmtprep.com 4.18.0-477.21.1.el8_8.x86_64 #1 SMP Thu Aug 10 13:51:50 EDT 2023 x86_64
User: mmtprep (1001)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/2G33-2-tx0VQ0zk.js.map
{"version":3,"file":"2G33-2-tx0VQ0zk.js","sources":["../../src/exercices/2e/2G33-2.js"],"sourcesContent":["import { combinaisonListes } from '../../lib/outils/arrayOutils'\nimport { ecritureAlgebrique, ecritureParentheseSiNegatif, reduireAxPlusB } from '../../lib/outils/ecritures'\nimport Exercice from '../deprecatedExercice.js'\n\nimport { listeQuestionsToContenu, randint } from '../../modules/outils.js'\nexport const titre = 'Determine if lines are parallel, intersecting or coincident'\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 = 'Determine whether the lines $\\\\bm{(d)}$ and $\\\\bm{(d\\')}$, of which the Cartesian equations are given below, are parallel, coincident or secant.'\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      // Main loop where i+1 corresponds to the question number\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 = 'We give: $(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 += ' and $(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 = 'We know that a line $(d)$ with a Cartesian equation: '\n          texteCorr += ' $(d): ax+by+c=0$, with $(a,b)\\\\neq (0,0)$.'\n          texteCorr += '<br>admits a direction vector of coordinates: '\n          texteCorr += '$\\\\vec {u} \\\\begin{pmatrix}-b\\\\\\\\a\\\\end{pmatrix}$.'\n          texteCorr += `<br>As we have from the statement: $a=${a1}$ , $b=${b1}$ , $c=${c1}$ ,`\n          texteCorr += 'we deduce that: $\\\\vec {u} \\\\begin{pmatrix}'\n          if (b1 === 0) { texteCorr += '0' } else { texteCorr += `-${ecritureParentheseSiNegatif(b1)}` }\n          texteCorr += `\\\\\\\\${a1}\\\\end{pmatrix}$ is a direction vector of $(d)$. `\n          texteCorr += `<br>Similarly, let $\\\\vec {u'}$ be the direction vector of $(d')$. <br>As here, we have: $a=${a2}$ , $b=${b2}$ , $c=${c2}$ ,`\n          texteCorr += 'we deduce that: $\\\\vec {u\\'} \\\\begin{pmatrix}'\n          if (b2 === 0) { texteCorr += '0' } else { texteCorr += `-${ecritureParentheseSiNegatif(b2)}` }\n          texteCorr += `\\\\\\\\${a2}\\\\end{pmatrix}$`\n          texteCorr += '<br> To determine the relative position of $(d)$ and $(d\\')$, we study the collinearity of the two direction vectors. '\n          texteCorr += '<br> To do this, we calculate their determinant: '\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>We observe that the determinant is non-zero. <br>The direction vectors of the two lines are therefore not collinear.'\n            texteCorr += '<br>The lines $(d)$ and $(d\\')$ ne sont donc pas parallèles.'\n          } else {\n            texteCorr += '<br>We observe that the determinant is zero. <br>The direction vectors of the two lines are therefore collinear.'\n            texteCorr += '<br>The lines $(d)$ and $(d\\')$ are then parallel.'\n          }\n          if (a1 * b2 === a2 * b1 & a1 * c1 === a2 * c2 & b1 * c2 === b2 * c1) {\n            texteCorr += 'We even observe that in this situation, the equations being multiples of each other, the two lines are confused.'\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 = 'We give: $(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 += ' and $(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 = 'We know that a right-hand Cartesian equation of the form: '\n          texteCorr += '$(d): ax+by+c=0$, with $(a,b)\\\\neq (0,0)$.'\n          texteCorr += '<br>admits a direction vector of coordinates: '\n          texteCorr += '$\\\\vec {u} \\\\begin{pmatrix}-b\\\\\\\\a\\\\end{pmatrix}$.'\n          texteCorr += '<br>Let $\\\\vec {u}$ be the direction vector of $(d)$: '\n          texteCorr += `<br>As we have according to the statement: $a=${a1}$, $b=${b1}$, $c=${c1}$`\n          texteCorr += ', we deduce that: $\\\\vec {u} \\\\begin{pmatrix}'\n          if (b1 === 0) { texteCorr += '0' } else { texteCorr += `-${ecritureParentheseSiNegatif(b1)}` }\n          texteCorr += `\\\\\\\\${a1}\\\\end{pmatrix}$`\n          texteCorr += `<br>Similarly for $(d')$: $a=${a2}$, $b=${b2}$, $c=${c2}$`\n          texteCorr += ', we deduce that: $\\\\vec {u\\'} \\\\begin{pmatrix}'\n          if (b2 === 0) { texteCorr += '0' } else { texteCorr += `-${ecritureParentheseSiNegatif(b2)}` }\n          texteCorr += `\\\\\\\\${a2}\\\\end{pmatrix}$`\n          texteCorr += '<br> To determine the relative position of $(d)$ and $(d\\')$, we study the collinearity of the two direction vectors. '\n          texteCorr += '<br> To do this, we calculate their determinant: '\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>We observe that the determinant is non-zero. <br>The direction vectors of the two lines are therefore not collinear.'\n            texteCorr += '<br>The lines $(d)$ and $(d\\')$ ne sont donc pas parallèles.'\n          } else {\n            texteCorr += '<br>We observe that the determinant is zero. <br>The direction vectors of the two lines are therefore collinear.'\n            texteCorr += '<br>The lines $(d)$ and $(d\\')$ are then parallel.'\n          }\n          if (a1 * b2 === a2 * b1 & a1 * c1 === a2 * c2 & b1 * c2 === b2 * c1) {\n            texteCorr += '<br>We even observe that in this situation, the equations being multiples of each other, the two lines are confused.'\n          }\n          break\n      }\n      if (this.questionJamaisPosee(i, a1, b1, c1, b2, c2, a2)) {\n        // If the question has never been asked, we create another one\n        this.listeQuestions.push(texte)\n        this.listeCorrections.push(texteCorr)\n        i++\n      }\n      cpt++\n    }\n    listeQuestionsToContenu(this)\n  }\n  // this.needNumericalForm = ['Difficulty level', 2,'1: Easy\\n2: Difficult'];\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,8DAORC,EAAO,QACPC,EAAM,SACJ,SA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