0 Members and 1 Guest are viewing this topic.
t=2^8;TestMod[k_,b_,y_,x_]:=Mod[k,b]-Mod[k-y,b-x];Array1=Array[0&,t^2];Array2=Array[0&,t^2];Array3=Array[0&,t^2];Array4=Array[0&,t^2];j=0;For[b = 1, b < t, b++,For[k = 1, k < t, k++,y=k;x=b;x=BitOr[x,BitShiftRight[x,1]];x=BitOr[x,BitShiftRight[x,2]];x=BitOr[x,BitShiftRight[x,4]];x=BitOr[x,BitShiftRight[x,8]];x=BitOr[x,BitShiftRight[x,16]];x=x-BitShiftRight[x,1];y=BitOr[y,BitShiftRight[y,1]];y=BitOr[y,BitShiftRight[y,2]];y=BitOr[y,BitShiftRight[y,4]];y=BitOr[y,BitShiftRight[y,8]];y=BitOr[y,BitShiftRight[y,16]];y=y-BitShiftRight[y,1];Array1[[t*(b-1)+k]]=Mod[k,b];Array2[[t*(b-1)+k]]=Mod[k-y,b-x];Array3[[t*(b-1)+k]]=TestMod[k,b,y,x];If[TestMod[k,b,y,x]==0,j=j+1]]]ListPlot[Array3]
FUNCTION decToRom$ (num AS INTEGER)DIM rom AS STRINGDIM dec AS INTEGERDIM i AS INTEGERDIM j AS INTEGERDIM x AS INTEGERdec = num + 1 - 1 ' Bonus points if you can explain why this is here.IF dec < 1 OR dec > 3999 THEN ERROR 5i = 1DO WHILE dec / 10 > 0 x = dec - INT(dec / 10) * 10 ' Mod is for losers. dec = INT(dec / 10) IF x >= 1 AND x <= 3 THEN FOR j = 1 TO x rom = romchar(i) + rom NEXT j END IF IF x = 4 THEN rom = romchar(i) + romchar(i + 1) + rom IF x = 5 THEN rom = romchar(i + 1) + rom IF x >= 6 AND x <= 8 THEN FOR j = 1 TO x - 5 rom = romchar(i) + rom NEXT j rom = romchar(i + 1) + rom END IF IF x = 9 THEN rom = romchar(i) + romchar(i + 2) + rom i = i + 2LOOPdecToRom$ = romEND FUNCTIONFUNCTION romchar$ (quark AS INTEGER)romchar$ = MID$("IVXLCDM", quark, 1)END FUNCTION
I want a 3D Game of Life Generator now!
The last pic shows a ship of the "Replicatoren" (german) of Stargate SG1!