diff --git a/frontend/textbooks/geometry_8_ch4.html b/frontend/textbooks/geometry_8_ch4.html index 9b1d8a2..651240e 100644 --- a/frontend/textbooks/geometry_8_ch4.html +++ b/frontend/textbooks/geometry_8_ch4.html @@ -867,7 +867,7 @@ function buildP2(){
- + @@ -1379,6 +1379,20 @@ function buildP3(){ const ur2x=(T2x-cx)/R, ur2y=(T2y-cy)/R; const ut2x=-(ur2y), ut2y=ur2x; const rm2=`${(T2x+ur2x*s).toFixed(1)},${(T2y+ur2y*s).toFixed(1)} ${(T2x+ur2x*s+ut2x*s).toFixed(1)},${(T2y+ur2y*s+ut2y*s).toFixed(1)} ${(T2x+ut2x*s).toFixed(1)},${(T2y+ut2y*s).toFixed(1)}`; + /* Position T₁ label OUTSIDE circle, above-left of T₁ (away from upper tangent) */ + const T1lx=(T1x-cx)/R, T1ly=(T1y-cy)/R; /* outward unit */ + const T1labelX=T1x+T1lx*14-6, T1labelY=T1y+T1ly*14+3; + const T2labelX=T2x+(T2x-cx)/R*14-6, T2labelY=T2y+(T2y-cy)/R*14+10; + /* Length labels OFF the tangent line (perpendicular offset to outer side) */ + const m1x=(T1x+Ax)/2, m1y=(T1y+Ay)/2; + const t1dx=Ax-T1x, t1dy=Ay-T1y, t1len=Math.hypot(t1dx,t1dy); + /* Perpendicular outward (upper) */ + const n1x=-t1dy/t1len, n1y=t1dx/t1len; /* CCW perpendicular */ + const len1lx=m1x+n1x*-14-10, len1ly=m1y+n1y*-14; + const m2x=(T2x+Ax)/2, m2y=(T2y+Ay)/2; + const t2dx=Ax-T2x, t2dy=Ay-T2y, t2len=Math.hypot(t2dx,t2dy); + const n2x=-t2dy/t2len, n2y=t2dx/t2len; + const len2lx=m2x+n2x*14-10, len2ly=m2y+n2y*14+6; const svg=` @@ -1392,12 +1406,12 @@ function buildP3(){ - T₁ - T₂ - O - A - ${fmt(AT)} - ${fmt(AT)} + T₁ + T₂ + O + A + AT₁=${fmt(AT)} + AT₂=${fmt(AT)} `; svgWrap.innerHTML=svg; info.textContent='AT₁ = AT₂ = '+fmt(AT)+' (при R = '+R+', |OA| = '+OA+')'; @@ -1451,7 +1465,11 @@ function buildP3(){ equal+=``; } const mainColor=ph==='done'?'#10b981':'#0284c7'; - const svg=` + const T1lx=(T1x-cx)/R, T1ly=(T1y-cy)/R; + const T1labelX=T1x+T1lx*16-7, T1labelY=T1y+T1ly*16+4; + const T2lx=(T2x-cx)/R, T2ly=(T2y-cy)/R; + const T2labelX=T2x+T2lx*16-7, T2labelY=T2y+T2ly*16+10; + const svg=` ${tri1}${tri2} @@ -1464,10 +1482,10 @@ function buildP3(){ - O - T₁ - T₂ - A + O + T₁ + T₂ + A `; svgEl.innerHTML=svg; txtEl.innerHTML=steps.find(s=>s.phase===ph).text;