setrgb 0,255,255,255 open window 640,512 aliasing=1 gd=210 gd2=210 hb=270 y=0.79 x=2.365 zoom=1.424 zoom2=1.424 30 setdrawbuf curbuff curbuff = 1 - curbuff setdispbuf curbuff clear window setrgb 1,0,0,0 if aliasing=1 type$="IMAGE NORMALE (ALIASEE)" if aliasing=0 type$="IMAGE CORRIGEE (ANTI ALIASEE)" text 320,500,type$,"cc" text 320,50,"L1:ALIASING R1:ANTI-ALIASING","cc" text 320,70,"L2:ZOOM OUT R2:ZOOM IN","cc" setrgb 1,0,0,0 fill triangle 30,156 to 220,166 to 20,356 fill triangle 210,366 to 220,166 to 20,356 setrgb 1,250,0,0 fill rect 180,240 to 240,243 fill rect 180,240 to 183,300 fill rect 240,240 to 243,300 fill rect 180,297 to 240,300 '>>>>>>>>>>>>>> ANTI ALIASING <<<<<<<<<<<<<< if aliasing=0 then t=0 for u=0 to 20 step 2 t=t+30 setrgb 1,t,t,t line 30,156-u to 20,356-u line 210,366+u to 220,166+u line 30+u,356 to 210+u,366 line 20-u,356 to 210-u,366 next fi p1=30*zoom p2=2*zoom p3=5*zoom p4=1*zoom p5=20*zoom p6=27*zoom p7=33*zoom p8=2*zoom p9=15*zoom p10=27*zoom setrgb 1,0,0,0 fill rect gd-p1*cos(y),hb-p1*sin(x) to gd+p0*cos(y),hb+p1*sin(x) fill rect gd-p1*cos(y),hb-p1*sin(x) to gd+p2*cos(y),hb-p3*sin(x) fill rect gd-p1*cos(y),hb-p3*sin(x) to gd+p4*cos(y),hb+p5*sin(x) setrgb 1,250,0,0 fill rect gd-p1*cos(y),hb-p1*sin(x) to gd+p1*cos(y),hb-p6*sin(x) fill rect gd-p1*cos(y),hb-p1*sin(x) to gd-p6*cos(y),hb+p1*sin(x) fill rect gd+p1*cos(y),hb-p1*sin(x) to gd+p7*cos(y),hb+p1*sin(x) fill rect gd-p1*cos(y),hb+p6*sin(x) to gd+p1*cos(y),hb+p1*sin(x) if aliasing=0 then setrgb 1,100,100,100 setrgb 2,100,100,100 setrgb 3,250,250,250 gtriangle gd+p8*cos(y),hb-p3*sin(x) to gd+p4*cos(y),hb-p3*sin(x) to gd+p4*cos(y),hb+p9*sin(x) setrgb 2,250,250,250 gtriangle gd+p8*cos(y),hb-p3*sin(x) to gd+p8*cos(y),hb+p9*sin(x) to gd+p4*cos(y),hb+p9*sin(x) setrgb 1,100,100,100 setrgb 2,100,100,100 setrgb 3,150,150,150 gtriangle gd+p4*cos(y),hb+p5*sin(x) to gd+p0*cos(y),hb+p5*sin(x) to gd+p0*cos(y),hb+p10*sin(x) setrgb 2,150,150,150 gtriangle gd+p4*cos(y),hb+p5*sin(x) to gd+p4*cos(y),hb+p10*sin(x) to gd+p0*cos(y),hb+p10*sin(x) fi if zoomzoom2 zoom=zoom-0.5 if gdgd2 gd=gd-22 k=peek("port1") if and(k,512)<>0 then zoom2=8.72 gd2=530 fi if and(k,256)<>0 then zoom2=1.424 gd2=210 fi if and(k,2048)<>0 then aliasing=0 fi if and(k,1024)<>0 then aliasing=1 fi goto 30