File: /home/mmtprep/public_html/mathzen.mmtprep.com/assets/can3F08--uK-jMMM.js.map
{"version":3,"file":"can3F08--uK-jMMM.js","sources":["../../src/exercices/can/3e/can3F08.js"],"sourcesContent":["import { droite } from '../../../lib/2d/droites.js'\nimport { repere } from '../../../lib/2d/reperes.js'\nimport { segment } from '../../../lib/2d/segmentsVecteurs.js'\nimport { texteParPosition } from '../../../lib/2d/textes.js'\nimport { miseEnEvidence } from '../../../lib/outils/embellissements'\nimport { deprecatedTexFraction, texFractionReduite } from '../../../lib/outils/deprecatedFractions.js'\nimport { ecritureAlgebrique } from '../../../lib/outils/ecritures.js'\nimport { texteCentre } from '../../../lib/format/miseEnPage.js'\nimport { abs } from '../../../lib/outils/nombres.js'\nimport Exercice from '../../Exercice.js'\nimport { mathalea2d, colorToLatexOrHTML } from '../../../modules/2dGeneralites.js'\nimport { fraction } from '../../../modules/fractions.js'\nimport { randint, egal, calculANePlusJamaisUtiliser } from '../../../modules/outils.js'\nexport const titre = 'Lire graphiquement une fonction affine*'\nexport const interactifReady = true\nexport const interactifType = 'mathLive'\n\n// Les exports suivants sont optionnels mais au moins la date de publication semble essentielle\nexport const dateDePublication = '25/10/2021' // La date de publication initiale au format 'jj/mm/aaaa' pour affichage temporaire d'un tag\n\n/**\n * Modèle d'exercice très simple pour la course aux nombres\n * @author Gilles Mora (2F10-02)\n * Référence\n*/\nexport const uuid = 'f554f'\nexport const ref = 'can3F08'\nexport default function LectureGraphiqueFonctionAffine2 () {\n Exercice.call(this) // Héritage de la classe Exercice()\n this.typeExercice = 'simple' // Cette ligne est très importante pour faire faire un exercice simple !\n this.nbQuestions = 1\n this.tailleDiaporama = 2\n // Dans un exercice simple, ne pas mettre de this.listeQuestions = [] ni de this.consigne\n this.formatChampTexte = 'largeur15 inline'\n this.formatInteractif = 'calcul'\n this.nouvelleVersion = function () {\n const o = texteParPosition('O', -0.3, -0.3, 'milieu', 'black', 1)\n let s1, s2\n const a = randint(-5, 5, [0, 4]) // numérateut coefficient directeur non nul\n const b = randint(-2, 2) // ordonnée à l'origine\n const d = randint(2, 5, [-a, a, 2 * a, -2 * a]) // dénominateur coefficient directeur non multiple du numérateur pour éviter nombre entier\n const r = repere({ xMin: -5, yMin: -5, xMax: 6, yMax: 5 })\n const c = droite(a / d, -1, b)\n const maFraction = fraction(a, d)\n\n c.color = colorToLatexOrHTML('red')\n c.epaisseur = 2\n this.question = '$f$ est une fonction affine définie par $f(x)=...$<br>'\n this.question += `${mathalea2d({\n xmin: -5,\n ymin: -5,\n xmax: 6,\n ymax: 5,\npixelsParCm: 20,\nscale: 0.7,\nstyle: 'margin: auto'\n }, r, c, o)}`// On trace le graphique\n\n this.reponse = [`${texFractionReduite(a, d)}x${ecritureAlgebrique(b)}`]\n if (egal(a * 1000 / d, Math.round(a * 1000 / d))) {\n this.reponse.push(`${calculANePlusJamaisUtiliser(a / d)}x${ecritureAlgebrique(b)}`)\n }\n this.correction = `<br> $f$ est de la forme\n $f(x)=ax+b$ avec $a$ le coefficient directeur de la droite (inclinaison de la droite par rapport à l'horizontale)\n et $b$ l'ordonnée à l'origine (ordonnée du point d'intersection entre la droite et l'axe des ordonnées).<br>\n L'ordonnée à l'origine est $b=${b}$ et :`\n this.correction += texteCentre(`$a=\\\\dfrac{\\\\text{Dénivelé vertical}}{\\\\text{Déplacement horizontal}}=\n ${deprecatedTexFraction(miseEnEvidence(a, 'red'), miseEnEvidence(d, 'green'))}$`)\n this.correction += `On en déduit que la fonction $f$ est définie par : $f(x)=${miseEnEvidence(`${maFraction.texFractionSimplifiee}x${ecritureAlgebrique(b)}`)}$ .<br>`\n if (a > 0) {\n s1 = segment(0, b - a, -d, b - a, 'green')\n s2 = segment(0, b - a, 0, b, 'red')\n }\n if (a < 0) {\n s1 = segment(d, b, 0, b, 'green')\n s2 = segment(d, b, d, b - abs(a), 'red')\n }\n s2.epaisseur = 2\n s1.epaisseur = 2\n s2.styleExtremites = '->'\n s1.styleExtremites = '<-'\n if (a !== 0) {\n this.correction += `${mathalea2d({\n xmin: -5,\n ymin: -5,\n xmax: 6,\n ymax: 5,\n pixelsParCm: 20,\n scale: 0.7,\n style: 'margin: auto'\n }, r, s1, s2, c, o)}`\n }// On trace le graphique\n this.canEnonce = `$f$ est une fonction affine. <br>\n \n Exprimer $f(x)$ en fonction de $x$.<br>`\n this.canEnonce +=\n `\n ${mathalea2d({\n xmin: -5,\n ymin: -5,\n xmax: 6,\n ymax: 5,\npixelsParCm: 20,\nscale: 0.7,\nstyle: 'margin: auto'\n }, r, c, o)}\n \n `\n this.canReponseACompleter = '$f(x)=\\\\ldots$'\n }\n}\n"],"names":["titre","interactifReady","interactifType","dateDePublication","uuid","ref","LectureGraphiqueFonctionAffine2","Exercice","o","texteParPosition","s1","s2","a","randint","b","d","r","repere","c","droite","maFraction","fraction","colorToLatexOrHTML","mathalea2d","texFractionReduite","ecritureAlgebrique","egal","calculANePlusJamaisUtiliser","texteCentre","deprecatedTexFraction","miseEnEvidence","segment","abs"],"mappings":"wOAaY,MAACA,EAAQ,0CACRC,EAAkB,GAClBC,EAAiB,WAGjBC,EAAoB,aAOpBC,EAAO,QACPC,EAAM,UACJ,SAASC,GAAmC,CACzDC,EAAS,KAAK,IAAI,EAClB,KAAK,aAAe,SACpB,KAAK,YAAc,EACnB,KAAK,gBAAkB,EAEvB,KAAK,iBAAmB,mBACxB,KAAK,iBAAmB,SACxB,KAAK,gBAAkB,UAAY,CACjC,MAAMC,EAAIC,EAAiB,IAAK,IAAM,IAAM,SAAU,QAAS,CAAC,EAChE,IAAIC,EAAIC,EACR,MAAMC,EAAIC,EAAQ,GAAI,EAAG,CAAC,EAAG,CAAC,CAAC,EACzBC,EAAID,EAAQ,GAAI,CAAC,EACjBE,EAAIF,EAAQ,EAAG,EAAG,CAAC,CAACD,EAAGA,EAAG,EAAIA,EAAG,GAAKA,CAAC,CAAC,EACxCI,EAAIC,EAAO,CAAE,KAAM,GAAI,KAAM,GAAI,KAAM,EAAG,KAAM,CAAC,CAAE,EACnDC,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