            HOME  PENTOS  MARQUEE  FRACTAL  GALLERY  GRAPHIX  LINKS     PROGRAMS general color methods col hypercube fuzzy logic 1 fuzzy logic 2 fuzzy logic 3 macrame mandelzoom julia set ripples sines newtons basin hadamard matrix   PROGRAMS 2 L-systems IF-Systems    e-mail   FUZZY LOGIC THREE - MINIMUM FIELD  fuzzy affine minimum field - comparison mouseover PROGRAM fuzzylogField_3A   ! © W.van Duyn 22nd May 2004 !adaptation from program by R.L.Bagula !2 point minimum field fuzzy logic SET MODE "color" SET WINDOW 0,1199,0,903 PRINT "Input unit size(try 5), scale(try 32) (maximum size x scale = 450)" INPUT h,f CLEAR SET COLOR "black" BOX AREA 0,1199,0,903 LET q=1/2 LET dx=0   ! dx,dy center diagram in screen LET dy=-0.5 FOR i = -h*f TO h*f FOR j = -h*f TO h*f LET xx = dx+i/(2*f) LET yy = dy+j/(2*f) LET r=1 LET mm=0 DO WHILE mm=<40 LET r1=r LET x=xx LET y=yy LET xx1=1-abs((x+y)*q) LET yy1=1-abs((-x+y)*q-1/2) LET xx2=1-abs((-x-y)*q-1/2) LET yy2=1-abs((x-y)*q-1) LET xx=min(xx1,xx2) LET yy=min(yy1,yy2) LET r = xx + yy LET mm = mm+1 IF r>1 OR ABS(r-r1)<10^(-3) THEN EXIT DO LOOP LET xi=i+600 LET yj=j+451 CALL colpatA(mm) PLOT xi,yj NEXT j NEXT i END SUB colpatA(mm) LET mc=MOD(mm,16) IF mc=0 THEN SET COLOR "15" IF mc=1 THEN SET COLOR "14" IF mc=2 THEN SET COLOR "12" IF mc=3 THEN SET COLOR "11" IF mc=4 THEN SET COLOR "13" IF mc=5 THEN SET COLOR "10" IF mc=6 THEN SET COLOR "15" IF mc=7 THEN SET COLOR "9" IF mc=8 THEN SET COLOR "8" IF mc=9 THEN SET COLOR "6" IF mc=10 THEN SET COLOR "5" IF mc=11 THEN SET COLOR "2" IF mc=12 THEN SET COLOR "4" IF mc=13 THEN SET COLOR "3" IF mc=14 THEN SET COLOR "7" IF mc=15 THEN SET COLOR "1" IF mm=41 THEN SET COLOR "16" END SUB    HOME  PENTOS  MARQUEE  FRACTAL  GALLERY  GRAPHIX  LINKS   