feat(math6): Глава 5 — Координатная плоскость (§1–§5, на Math6.plane)

§1 чтение координат + определение четверти (плоскость с точкой);
§2 чтение графиков реальных процессов + изменение величины (polyline);
§3 слайдер y=kx + классификатор прямая/обратная пропорциональность;
§5 прикладной (путь–время); финал — 5 боссов (координаты, четверти,
график, k для y=kx и y=k/x). Math6.plane получил поддержку polyline.
Тесты math6: 13/13.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maxim Dolgolyov
2026-06-02 19:42:48 +03:00
parent ba847db060
commit 09c61d8eed
3 changed files with 313 additions and 0 deletions
+6
View File
@@ -133,6 +133,12 @@ M.plane = function (opts) {
}
s += '<path d="' + d + '" fill="none" stroke="' + (pl.color || 'var(--pri,#4f46e5)') + '" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>';
}
/* ломаная (график реального процесса по точкам) */
if (opts.polyline && opts.polyline.length) {
var pl2 = opts.polyline, pts2 = pl2.map(function (p) { return X(p.x) + ',' + Y(p.y); }).join(' ');
s += '<polyline points="' + pts2 + '" fill="none" stroke="' + (opts.polylineColor || 'var(--pri,#4f46e5)') + '" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>';
if (opts.polylineDots) pl2.forEach(function (p) { s += '<circle cx="' + X(p.x) + '" cy="' + Y(p.y) + '" r="3.5" fill="' + (opts.polylineColor || 'var(--pri,#4f46e5)') + '"/>'; });
}
/* отрезки */
(opts.segments || []).forEach(function (sg) {
s += '<line x1="' + X(sg.from.x) + '" y1="' + Y(sg.from.y) + '" x2="' + X(sg.to.x) + '" y2="' + Y(sg.to.y) + '" stroke="' + (sg.color || 'var(--pri,#4f46e5)') + '" stroke-width="2"' + (sg.dash ? ' stroke-dasharray="' + sg.dash + '"' : '') + '/>';