diff --git a/frontend/js/trainer/generators.js b/frontend/js/trainer/generators.js index d0496d8..32c6ab1 100644 --- a/frontend/js/trainer/generators.js +++ b/frontend/js/trainer/generators.js @@ -32,10 +32,13 @@ { key: 'systems', label: 'Системы', subject: 'algebra', grade: 7, order: 8 }, { key: 'quadratic', label: 'Квадратные', subject: 'algebra', grade: 8, order: 9 }, { key: 'progressions', label: 'Прогрессии', subject: 'algebra', grade: 9, order: 10 }, + { key: 'fractions', label: 'Дроби', subject: 'algebra', grade: 5, order: 1.5 }, { key: 'applied', label: 'Задачи', subject: 'algebra', grade: 7, order: 11 }, { key: 'g-angles', label: 'Углы', subject: 'geometry', grade: 7, order: 12 }, { key: 'g-pyth', label: 'Пифагор', subject: 'geometry', grade: 8, order: 13 }, - { key: 'g-area', label: 'Площади', subject: 'geometry', grade: 8, order: 14 } + { key: 'g-area', label: 'Площади', subject: 'geometry', grade: 8, order: 14 }, + { key: 'g-poly', label: 'Многоугольники', subject: 'geometry', grade: 8, order: 15 }, + { key: 'g-sim', label: 'Подобие', subject: 'geometry', grade: 8, order: 16 } ]; var GENERATORS = [ @@ -695,6 +698,137 @@ { note: 'Новая цена = старая × (100 − скидка) ÷ 100:', tex: 'x = {price}*(100 - {d})/100' }, { note: 'Считаем:', tex: 'x = {ans}' } ] + }, + + /* ═══ Площади (дополнение к g-area): трапеция, параллелограмм, ромб ═══ */ + + /* площадь трапеции */ + { + id: 'area-trapezoid', topic: 'g-area', order: 4, subject: 'geometry', grade: 8, kind: 'compute', + title: 'Площадь трапеции', + pick: { a: [2, 14], b: [2, 14], h: [2, 12] }, require: 'mod((a + b)*h, 2) == 0', + derive: { val: '(a + b)*h/2' }, + lhs: 'x', rhs: '({a} + {b})*{h}/2', display: 'Основания трапеции {a} и {b}, высота {h}. Найдите площадь.', + answerVar: 'x', answer: 'val', integerAnswer: true, + solution: [ + { note: 'Площадь трапеции — полусумма оснований на высоту:', tex: 'x = ({a} + {b})*{h}/2' }, + { note: 'Считаем:', tex: 'x = {ans}' } + ] + }, + + /* площадь параллелограмма */ + { + id: 'area-parallelogram', topic: 'g-area', order: 5, subject: 'geometry', grade: 8, kind: 'compute', + title: 'Площадь параллелограмма', + pick: { a: [2, 16], h: [2, 14] }, derive: { val: 'a*h' }, + lhs: 'x', rhs: '{a}*{h}', display: 'Сторона параллелограмма {a}, высота к ней {h}. Найдите площадь.', + answerVar: 'x', answer: 'val', integerAnswer: true, + solution: [ + { note: 'Площадь параллелограмма — сторона на высоту к ней:', tex: 'x = {a}*{h}' }, + { note: 'Считаем:', tex: 'x = {ans}' } + ] + }, + + /* площадь ромба по диагоналям */ + { + id: 'area-rhombus', topic: 'g-area', order: 6, subject: 'geometry', grade: 8, kind: 'compute', + title: 'Площадь ромба', + pick: { d1: [2, 16], d2: [2, 16] }, require: 'mod(d1*d2, 2) == 0', + derive: { val: 'd1*d2/2' }, + lhs: 'x', rhs: '{d1}*{d2}/2', display: 'Диагонали ромба {d1} и {d2}. Найдите площадь.', + answerVar: 'x', answer: 'val', integerAnswer: true, + solution: [ + { note: 'Площадь ромба — половина произведения диагоналей:', tex: 'x = {d1}*{d2}/2' }, + { note: 'Считаем:', tex: 'x = {ans}' } + ] + }, + + /* ═══ Тема: Многоугольники (геометрия, 8 класс) ═══ */ + + /* сумма углов выпуклого n-угольника */ + { + id: 'poly-angles-sum', topic: 'g-poly', order: 1, subject: 'geometry', grade: 8, kind: 'compute', + title: 'Сумма углов многоугольника', + pick: { n: [3, 12] }, derive: { val: '180*(n - 2)' }, + lhs: 'x', rhs: '180*({n} - 2)', display: 'Найдите сумму углов выпуклого {n}-угольника (в градусах).', + answerVar: 'x', answer: 'val', integerAnswer: true, + solution: [ + { note: 'Сумма углов выпуклого n-угольника равна 180°·(n − 2):', tex: 'x = 180*({n} - 2)' }, + { note: 'Считаем:', tex: 'x = {ans}' } + ] + }, + + /* угол правильного n-угольника */ + { + id: 'poly-regular-angle', topic: 'g-poly', order: 2, subject: 'geometry', grade: 8, kind: 'compute', + title: 'Угол правильного многоугольника', + pick: { n: [3, 20] }, require: 'mod(180*(n - 2), n) == 0', + derive: { val: '180*(n - 2)/n' }, + lhs: 'x', rhs: '180*({n} - 2)/{n}', display: 'Найдите величину угла правильного {n}-угольника (в градусах).', + answerVar: 'x', answer: 'val', integerAnswer: true, + solution: [ + { note: 'Угол правильного n-угольника = 180°·(n − 2) ÷ n:', tex: 'x = 180*({n} - 2)/{n}' }, + { note: 'Считаем:', tex: 'x = {ans}' } + ] + }, + + /* ═══ Тема: Подобие (геометрия, 8 класс) ═══ */ + + /* сходственная сторона по коэффициенту подобия */ + { + id: 'sim-side', topic: 'g-sim', order: 1, subject: 'geometry', grade: 8, kind: 'compute', + title: 'Сторона по коэффициенту', + pick: { a: [2, 15], k: [2, 5] }, derive: { val: 'a*k' }, + lhs: 'x', rhs: '{a}*{k}', display: 'Треугольники подобны с коэффициентом {k}. Сторона первого равна {a}. Найдите сходственную сторону второго.', + answerVar: 'x', answer: 'val', integerAnswer: true, + solution: [ + { note: 'Сходственные стороны подобных фигур пропорциональны коэффициенту подобия:', tex: 'x = {a}*{k}' }, + { note: 'Считаем:', tex: 'x = {ans}' } + ] + }, + + /* периметр подобной фигуры */ + { + id: 'sim-perimeter', topic: 'g-sim', order: 2, subject: 'geometry', grade: 8, kind: 'compute', + title: 'Периметр подобной фигуры', + pick: { p: [5, 30], k: [2, 5] }, derive: { val: 'p*k' }, + lhs: 'x', rhs: '{p}*{k}', display: 'Фигуры подобны с коэффициентом {k}. Периметр первой равен {p}. Найдите периметр второй.', + answerVar: 'x', answer: 'val', integerAnswer: true, + solution: [ + { note: 'Периметры подобных фигур относятся как коэффициент подобия:', tex: 'x = {p}*{k}' }, + { note: 'Считаем:', tex: 'x = {ans}' } + ] + }, + + /* ═══ Тема: Дроби (5–6 класс) ═══ + kind:'compute'; ответ может быть дробным — ученик вводит «3/4» (SimExpr посчитает). */ + + /* часть от числа (целый ответ: число кратно знаменателю) */ + { + id: 'frac-of-number', topic: 'fractions', order: 1, subject: 'algebra', grade: 5, kind: 'compute', + title: 'Часть от числа', + pick: { n: [2, 6], a: [1, 5], mfac: [2, 9] }, require: 'a < n', + derive: { m: 'n*mfac', val: 'mfac*a' }, + lhs: 'x', rhs: '{m}*{a}/{n}', display: 'Найдите {a}/{n} от числа {m}.', + answerVar: 'x', answer: 'val', integerAnswer: true, + solution: [ + { note: 'Чтобы найти часть от числа, умножаем число на числитель и делим на знаменатель:', tex: 'x = {m}*{a}/{n}' }, + { note: 'Считаем:', tex: 'x = {ans}' } + ] + }, + + /* сложение дробей с одинаковым знаменателем (ответ — дробь) */ + { + id: 'frac-add-same', topic: 'fractions', order: 2, subject: 'algebra', grade: 5, kind: 'compute', + title: 'Сложение дробей', + pick: { n: [3, 9], a: [1, 6], b: [1, 6] }, require: 'a + b < 2*n', + derive: { val: '(a + b)/n' }, + lhs: 'x', rhs: '({a} + {b})/{n}', display: 'Вычислите {a}/{n} + {b}/{n}. Ответ запишите дробью (например 3/4) или числом.', + answerVar: 'x', answer: 'val', + solution: [ + { note: 'При одинаковом знаменателе складываем числители, знаменатель оставляем:', tex: 'x = ({a} + {b})/{n}' }, + { note: 'Получаем значение:', tex: 'x = {ans}' } + ] } ]; @@ -731,7 +865,12 @@ // Геометрия — Пифагор 'pyth-hyp': 2, 'pyth-leg': 3, // Геометрия — Площади - 'area-square': 1, 'area-rect': 1, 'area-triangle': 2 + 'area-square': 1, 'area-rect': 1, 'area-triangle': 2, + 'area-parallelogram': 2, 'area-trapezoid': 3, 'area-rhombus': 2, + // Геометрия — Многоугольники / Подобие + 'poly-angles-sum': 1, 'poly-regular-angle': 2, 'sim-side': 1, 'sim-perimeter': 2, + // Дроби + 'frac-of-number': 1, 'frac-add-same': 2 }; GENERATORS.forEach(function (g) { g.level = LEVELS[g.id] || 1; });