Puoi aprire il codice e modificare la funzione: vedi l'Help
You can open the Code and modify the function: see the Help
HELP
function ROTx(x,y,A) {AA = A*Math.PI/180; return x*Math.cos(AA)-y*Math.sin(AA)} function ROTy(x,y,A) {AA = A*Math.PI/180; return x*Math.sin(AA)+y*Math.cos(AA)} // --- base = height -- base = altezza ---- f blue, g green, h red, k orange ---- ... Lx=[13,11,10, 9, 7,7.5, 7, 9,10,11,13,17,20,20.5,18.5,21,20,17,13] Ly=[17,16,15,13,10, 13,16,13,11,10, 9, 9,11, 12, 13,13,15,17,17] nP=Lx.length A=180+45; C1="red"; C2="green"; Q1x=[0]; Q1y=[0] for(i=0;i<nP;i=i+1) {L1x[i]=ROTx(Lx[i],Ly[i],A); L1y[i]=ROTy(Lx[i],Ly[i],A)} L2x=[Lx[10],0,L1x[10]]; L2y=[Ly[10],0,L1y[10]] A=180-60; CX=-5; CY=5; C3="magenta"; C4="brown"; Q2x=[CX]; Q2y=[CY] for(i=0;i<nP;i=i+1) { L3x[i]=ROTx(Lx[i]-CX,Ly[i]-CY,A)+CX; L3y[i]=ROTy(Lx[i]-CX,Ly[i]-CY,A)+CY } L4x=[Lx[10],CX,L3x[10]]; L4y=[Ly[10],CY,L3y[10]]