Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

2.3 KB
Raw Blame
<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Pleat</title><style>*{box-sizing:border-box}body{margin:0;background:#e8dfd2;color:#514735;font-family:Arial,sans-serif}header{padding:28px 6%;font-size:12px;letter-spacing:2px}svg{display:block;width:100%;height:420px;max-height:65vh}form{display:flex;gap:25px;justify-content:center;flex-wrap:wrap;padding:25px 6%;background:#f4ece0}label{font-size:11px;display:flex;flex-direction:column;gap:10px;min-width:120px}input{accent-color:#977347;width:140px}button{border:0;background:transparent;font:inherit;color:inherit;cursor:pointer;padding:10px}p{margin:0;text-align:center;padding:15px;font-size:11px;color:#8e816c}</style><header>PLEAT / A STUDY IN LIGHT</header><svg id="lamp" viewBox="0 0 600 420" role="img" aria-label="A parametric pleated lampshade"><ellipse cx="300" cy="358" rx="110" ry="16" fill="#c9bdac"/><rect x="294" y="235" width="12" height="109" fill="#706550"/><ellipse cx="300" cy="345" rx="60" ry="10" fill="#9f8f74"/><g id="shade"></g></svg><form onsubmit="return false"><label>Width <input id="width" type="range" min="130" max="330" value="240"></label><label>Height <input id="height" type="range" min="70" max="210" value="150"></label><label>Pleats <input id="pleats" type="range" min="8" max="42" value="26"></label><button id="save">Export SVG ↓</button></form><p>A design study. Dimensions are illustrative, not manufacturing specifications.</p><script>const width=document.getElementById('width'),height=document.getElementById('height'),pleats=document.getElementById('pleats');function draw(){const w=+width.value,h=+height.value,n=+pleats.value,top=235-h;let shapes='';for(let i=0;i<n;i++){let l=300-w/2+i*w/n,r=l+w/n,tl=300-w*.3+i*w*.6/n,tr=tl+w*.6/n;shapes+='<path d="M'+tl+' '+top+'L'+tr+' '+top+'L'+r+' 235Q'+(l+r)/2+' 246 '+l+' 235Z" fill="'+(i%2?'#efc185':'#d99e5f')+'"/>'}document.getElementById('shade').innerHTML=shapes}for(const el of [width,height,pleats])el.oninput=draw;document.getElementById('save').onclick=()=>{const source=new XMLSerializer().serializeToString(document.getElementById('lamp')),url=URL.createObjectURL(new Blob([source],{type:'image/svg+xml'})),a=document.createElement('a');a.href=url;a.download='pleat.svg';a.click();setTimeout(()=>URL.revokeObjectURL(url),1000)};draw();</script></html>