1import{aM as w,r as m,aE as L,aP as R,b as V,e as D,f as A,aJ as n,aS as y,aT as g,aL as b,_ as B}from"./B7W8xUR6.js";const H={class:"container"},I=["innerHTML"],Y={class:"sliders"},j={class:"slider-group"},C={class:"slider-group"},E={class:"slider-group"},k=600,x=300,F=800,z=w({__name:"sine-with-sliders",setup(J){const T=m(null),d=Array.from({length:F+1},(l,e)=>-5+10*e/F),a=m(0),i=m(1),r=m(1),S=L(()=>a.value<0?`s(t)=${i.value.toFixed(2)} cos(2 Ï ${r.value.toFixed(2)} (t+${Math.abs(a.value).toFixed(2)})).`:`s(t)=${i.value.toFixed(2)} cos(2 Ï ${r.value.toFixed(2)} (t-${a.value.toFixed(2)})).`);function P(){return d.map(l=>i.value*Math.cos(2*Math.PI*r.value*(l-a.value)))}function U(){return d.map(l=>Math.cos(2*Math.PI*l))}function _(){const l=T.value;if(!l)return;const e=l.getContext("2d");if(!e)return;e.clearRect(0,0,k,x);const s=-5,p=5,f=-2,h=2,u=t=>(t-s)/(p-s)*k,c=t=>x-(t-f)/(h-f)*x;e.strokeStyle="#dcdcdc",e.lineWidth=1;for(let t=s;t<=p;t+=.5){const o=u(t);e.beginPath(),e.moveTo(o,c(f)),e.lineTo(o,c(h)),e.stroke()}for(let t=f;t<=h;t+=.5){const o=c(t);e.beginPath(),e.moveTo(u(s),o),e.lineTo(u(p),o),e.stroke()}e.strokeStyle="black",e.lineWidth=3;const M=c(0);e.beginPath(),e.moveTo(u(s),M),e.lineTo(u(p),M),e.stroke();const W=P();e.strokeStyle="red",e.lineWidth=2,e.beginPath();for(let t=0;t<d.length;t++){const o=u(d[t]),v=c(W[t]);t===0?e.moveTo(o,v):e.lineTo(o,v)}e.stroke();const $=U();e.strokeStyle="black",e.lineWidth=2,e.setLineDash([5,5]),e.beginPath();for(let t=0;t<d.length;t++){const o=u(d[t]),v=c($[t]);t===0?e.moveTo(o,v):e.lineTo(o,v)}e.stroke(),e.setLineDash([]),e.font="14px sans-serif",e.fillStyle="red",e.fillText("Anpassbare Funktion",10,20),e.fillStyle="black",e.fillText("Referenzfunktion",10,40)}return R(()=>{_()}),V([a,i,r],()=>{_()}),(l,e)=>(A(),D("div",H,[n("h2",{class:"title",innerHTML:S.value},null,8,I),n("div",Y,[n("div",j,[e[3]||(e[3]=n("label",{for:"tau"},"Ï:",-1)),y(n("input",{type:"range",id:"tau",min:"-1.2",max:"1.22",step:"0.01","onUpdate:modelValue":e[0]||(e[0]=s=>a.value=s)},null,512),[[g,a.value,void 0,{number:!0}]]),n("span",null,b(a.value.toFixed(2)),1)]),n("div",C,[e[4]||(e[4]=n("label",{for:"U0"},"Uâ:",-1)),y(n("input",{type:"range",id:"U0",min:"-1.4",max:"1.4",step:"0.01","onUpdate:modelValue":e[1]||(e[1]=s=>i.value=s)},null,512),[[g,i.value,void 0,{number:!0}]]),n("span",null,b(i.value.toFixed(2)),1)]),n("div",E,[e[5]||(e[5]=n("label",{for:"f"},"f:",-1)),y(n("input",{type:"range",id:"f",min:"-2",max:"2",step:"0.01","onUpdate:modelValue":e[2]||(e[2]=s=>r.value=s)},null,512),[[g,r.value,void 0,{number:!0}]]),n("span",null,b(r.value.toFixed(2)),1)])]),n("canvas",{ref_key:"canvasRef",ref:T,width:k,height:x,class:"canvas"},null,512)]))}}),O=Object.assign(B(z,[["__scopeId","data-v-45316525"]]),{__name:"SineWithSliders"});export{O as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.