diff --git a/frontend/js/labs/trigcircle.js b/frontend/js/labs/trigcircle.js
index 1c4a0dc..7381563 100644
--- a/frontend/js/labs/trigcircle.js
+++ b/frontend/js/labs/trigcircle.js
@@ -130,7 +130,16 @@ class TrigCircleSim {
const ct = Math.abs(s) > 1e-9 ? co / s : undefined;
const deg = a * 180 / Math.PI;
const q = a < Math.PI/2 ? 1 : a < Math.PI ? 2 : a < 3*Math.PI/2 ? 3 : 4;
- return { angle: a, deg, radLabel: this._radLbl(a), sin: s, cos: co, tan: t, cot: ct, quadrant: q };
+ // Опорный (острый) угол — к ближайшей оси Ox: основа формул приведения.
+ let ref;
+ if (a <= Math.PI / 2) ref = a;
+ else if (a <= Math.PI) ref = Math.PI - a;
+ else if (a <= 3 * Math.PI/2) ref = a - Math.PI;
+ else ref = 2 * Math.PI - a;
+ return {
+ angle: a, deg, radLabel: this._radLbl(a), sin: s, cos: co, tan: t, cot: ct, quadrant: q,
+ refAngle: ref, refDeg: ref * 180 / Math.PI,
+ };
}
/* ═══ Layout ═══════════════════════════════════════════════════════ */
@@ -1029,6 +1038,26 @@ if (typeof window !== 'undefined') window.TrigCircleSim = TrigCircleSim;
if (window.LabFX) LabFX.sound.play('click');
}
+ /* Ввод угла в градусах (поле + Enter/кнопка). Принимает любое число (включая <0 и >360),
+ goToAngle нормализует — заодно демонстрирует котерминальность. */
+ function trigSetAngleDeg(inp) {
+ if (!trigSim || !inp) return;
+ const v = parseFloat(String(inp.value || '').replace(',', '.'));
+ if (!isFinite(v)) return;
+ trigSim.goToAngle(v * Math.PI / 180);
+ }
+ function trigAngleKey(e, inp) { if (e && (e.key === 'Enter' || e.keyCode === 13)) trigSetAngleDeg(inp); }
+
+ /* Показать/скрыть график функций (тема «функции» — по умолчанию можно убрать,
+ круг займёт всю ширину). Переиспользует существующий слой 'graph'. */
+ function trigToggleGraph(rowEl) {
+ if (!trigSim) return;
+ const on = rowEl.classList.toggle('active');
+ trigSim.toggleLayer('graph', on);
+ const fns = document.getElementById('trig-graph-fns');
+ if (fns) fns.style.display = on ? '' : 'none';
+ }
+
function _trigUpdateUI(s) {
const _f = v => {
if (v === undefined) return '—';
@@ -1050,9 +1079,22 @@ if (typeof window !== 'undefined') window.TrigCircleSim = TrigCircleSim;
document.getElementById('trig-v-tan').textContent = _f(s.tan);
document.getElementById('trig-v-cot').textContent = _f(s.cot);
- // Angle badge
+ // Angle badge + котерминальные углы (+360°·k)
document.getElementById('trig-angle-badge').innerHTML =
- `${degStr} = ${s.radLabel}
${s.angle.toFixed(4)} рад`;
+ `${degStr} = ${s.radLabel}
${s.angle.toFixed(4)} рад` +
+ `
+ 360°·k (котерминальные)`;
+
+ // Опорный (острый) угол — guarded (панель может не иметь элемента)
+ const refEl = document.getElementById('trig-ref');
+ if (refEl) refEl.textContent = (Math.round(s.refDeg * 10) / 10) + '°';
+ // Знаки функций в текущей четверти
+ const signsEl = document.getElementById('trig-signs');
+ if (signsEl) {
+ const sg = v => (v > 1e-9 ? '+' : v < -1e-9 ? '−' : '0');
+ signsEl.innerHTML =
+ `sin ${sg(s.sin)} · cos ${sg(s.cos)} · ` +
+ `tg ${s.tan === undefined ? '—' : sg(s.tan)}`;
+ }
// Stats bar (nice fractions)
document.getElementById('trigbar-angle').textContent = degStr;
diff --git a/frontend/labs-bodies.html b/frontend/labs-bodies.html
index dcf3bea..b7cebcf 100644
--- a/frontend/labs-bodies.html
+++ b/frontend/labs-bodies.html
@@ -506,6 +506,16 @@