From aad71a110fe78a00488ee593e2822e794a2188ef Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Fri, 23 Oct 2026 20:05:45 +0000 Subject: [PATCH] Plane-only view: look straight down at the yantra overlaid with its inverse Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01161aC97vUnBnyZRBGyJeHy --- sphere/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sphere/index.html b/sphere/index.html index ff5acf9..5eb20a5 100644 --- a/sphere/index.html +++ b/sphere/index.html @@ -130,7 +130,7 @@ function build(){ if(!showSphere)bindu2.visible=false; if(showPlane){tris.forEach(t=>mk(t.pts,t.up?C.up:C.down,pOp,planeG,toPlane));decor.forEach(d=>mk(d,C.fg,pOp*.45,planeG,toPlane)); if(showInv){const R=6/lift;const clip=(pts,col,op)=>{let run=[];const flush=()=>{if(run.length>1)mk(run,col,op,planeG,toPlane);run=[]};for(const p of pts){if(Math.hypot(p[0],p[1])>R)flush();else run.push(p)}flush()}; - trisDense.forEach(t=>clip(t.pts.map(invP),t.up?C.up:C.down,pOp*.85));decor.forEach(d=>clip(d.map(invP),C.fg,pOp*.35));}} + trisDense.forEach(t=>clip(t.pts.map(invP),t.up?C.up:C.down,showSphere?pOp*.85:.55));decor.forEach(d=>clip(d.map(invP),C.fg,pOp*.35));}} const deg=mode==='stereo'?2*Math.atan(lift)*180/Math.PI:Math.atan(lift)*180/Math.PI; document.getElementById('note').textContent=(!showSphere?'The plane on its own: the yantra and its inversion in the outer circle. ':'')+(mode==='stereo' ?'Straight sides lift to circles through the top pole. Concurrences are kept exactly; only curvature changes.' @@ -146,7 +146,9 @@ if(reduce){ctl.autoRotate=false;document.getElementById('t-spin').setAttribute(' const $=id=>document.getElementById(id); function setMode(m){mode=m;$('m-stereo').setAttribute('aria-pressed',m==='stereo');$('m-gnomo').setAttribute('aria-pressed',m==='gnomo');build()} $('m-stereo').onclick=()=>setMode('stereo');$('m-gnomo').onclick=()=>setMode('gnomo'); -$('t-sphere').onclick=e=>{showSphere=!showSphere;e.currentTarget.setAttribute('aria-pressed',showSphere);if(!showSphere&&!showPlane){showPlane=true;$('t-plane').setAttribute('aria-pressed','true')}build()}; +$('t-sphere').onclick=e=>{showSphere=!showSphere;e.currentTarget.setAttribute('aria-pressed',showSphere);if(!showSphere&&!showPlane){showPlane=true;$('t-plane').setAttribute('aria-pressed','true')} + if(!showSphere){cam.position.set(0,3.6,0.0001);ctl.target.set(0,-1,0);ctl.autoRotate=false;$('t-spin').setAttribute('aria-pressed','false')}else{cam.position.set(2.6,-2.4,3.2);ctl.target.set(0,0,0)} + ctl.update();build()}; $('t-inv').onclick=e=>{showInv=!showInv;e.currentTarget.setAttribute('aria-pressed',showInv);build()}; $('t-plane').onclick=e=>{showPlane=!showPlane;e.currentTarget.setAttribute('aria-pressed',showPlane);build()}; $('t-spin').onclick=e=>{ctl.autoRotate=!ctl.autoRotate;e.currentTarget.setAttribute('aria-pressed',ctl.autoRotate)};