0 Members and 1 Guest are viewing this topic.

:.GR8GRAY::Full::.[8140201008040281]→Pic2:.[2291482412894422]→Pic3:.[F7FBFD7EBFDFEFF7]→Pic4:[0281402010080402]→Pic2:[4824128944229148]→Pic3:[B55AAD56ABD56AB5]→Pic4::0→A→B→C→T→J→K→M→N→O::1→Q::GetCalc("prgmCRYS")→R::det(768,0)→E:det(768,0)→F:det(768,0)→G::For(H,0,11):For(I,0,63):(I*12)+H→K:{2+(K*3)+R}→{K+G}:{2+(K*3)+1+R}→{K+F}:{2+(K*3)+2+R}→{K+E}:End:End::ClrDraw::.FnOff :.FnInt(D,0)::While 1:If (J<7):J++:Else:1→J:End:.If (Q=1):.FnOff :For(I,0,63):If (J<7):J++:Else:1→J:End:{J+Pic2}→M:{J+Pic3}→N:{J+Pic4}→O:For(H,0,11):(I*12)+H→K:.((({K+E} xor {K+G} xor M) and ({K+F} xor {K+G} xor N) and O) xor {K+G})→{K+{L6}}:(({K+E} and M) xor ({K+F} and N) xor ({K+G} and O))→{K+{L6}}:End:End:.0→Q:.FnOn :.End:DispGraph:EndIf (getKey(15)):.FnOff :.LnReg {^r}:Return::Lbl D:!If (T++^10):If (J<7):J++:Else:1→J:End:1→Q:DispGraph:End:Return

:.GR8GRAY::Full::.[8140201008040281]→Pic2:.[2291482412894422]→Pic3:.[F7FBFD7EBFDFEFF7]→Pic4:[0281402010080402]→Pic2:[4824128944229148]→Pic3:[B55AAD56ABD56AB5]→Pic4::0→A→B→C→T→J→K→M→N→O::1→Q::GetCalc("prgmCRYS")→R::det(768,0)→E:det(768,0)→F:det(768,0)→G::For(H,0,11):For(I,0,63):(I*12)+H→K:{2+(K*3)+R}→{K+G}:{2+(K*3)+1+R}→{K+F}:{2+(K*3)+2+R}→{K+E}:End:End::ClrDraw::FnOff :FnInt(D,0)::While 1:If (J<7):J++:Else:1→J:End:.If (Q=1):FnOff :For(I,0,63):If (J<7):J++:Else:1→J:End:{J+Pic2}→M:{J+Pic3}→N:{J+Pic4}→O:For(H,0,11):(I*12)+H→K:.((({K+E} xor {K+G} xor M) and ({K+F} xor {K+G} xor N) and O) xor {K+G})→{K+{L6}}:(({K+E} and M) xor ({K+F} and N) xor ({K+G} and O))→{K+{L6}}:End:End:0→Q:FnOn :End:.DispGraph:EndIf (getKey(15)):FnOff :LnReg {^r}:Return::Lbl D:!If (T++^10):If (J<7):J++:Else:1→J:End:1→Q:DispGraph:End:Return

:.GR8GRAY::Full::[8140201008040281]→Pic2:[2291482412894422]→Pic3:[F7FBFD7EBFDFEFF7]→Pic4:.[0281402010080402]→Pic2:.[4824128944229148]→Pic3:.[B55AAD56ABD56AB5]→Pic4::0→A→B→C→T→J→K→M→N→O::1→Q::GetCalc("prgmCRYS")→R::det(768,0)→E:det(768,0)→F:det(768,0)→G::For(H,0,11):For(I,0,63):(I*12)+H→K:{2+(K*3)+R}→{K+G}:{2+(K*3)+1+R}→{K+F}:{2+(K*3)+2+R}→{K+E}:End:End::ClrDraw::.FnOff :.FnInt(D,0)::While 1:If (J<7):J++:Else:1→J:End:.If (Q=1):.FnOff :For(I,0,63):If (J<7):J++:Else:1→J:End:{J+Pic2}→M:{J+Pic3}→N:{J+Pic4}→O:For(H,0,11):(I*12)+H→K:((({K+E} xor {K+G} xor M) and ({K+F} xor {K+G} xor N) and O) xor {K+G})→{K+{L6}}:.(({K+E} and M) xor ({K+F} and N) xor ({K+G} and O))→{K+{L6}}:End:End:.0→Q:.FnOn :.End:DispGraph:EndIf (getKey(15)):.FnOff :.LnReg {^r}:Return::Lbl D:!If (T++^10):If (J<7):J++:Else:1→J:End:1→Q:DispGraph:End:Return

:.GR8GRAY::Full::[8140201008040281]→Pic2:[2291482412894422]→Pic3:[F7FBFD7EBFDFEFF7]→Pic4:.[0281402010080402]→Pic2:.[4824128944229148]→Pic3:.[B55AAD56ABD56AB5]→Pic4::0→A→B→C→T→J→K→M→N→O::1→Q::GetCalc("prgmCRYS")→R::det(768,0)→E:det(768,0)→F:det(768,0)→G::For(H,0,11):For(I,0,63):(I*12)+H→K:{2+(K*3)+R}→{K+G}:{2+(K*3)+1+R}→{K+F}:{2+(K*3)+2+R}→{K+E}:End:End::ClrDraw::FnOff :FnInt(D,0)::While 1:If (J<7):J++:Else:1→J:End:If (Q=1):FnOff :For(I,0,63):If (J<7):J++:Else:1→J:End:{J+Pic2}→M:{J+Pic3}→N:{J+Pic4}→O:For(H,0,11):(I*12)+H→K:((({K+E} xor {K+G} xor M) and ({K+F} xor {K+G} xor N) and O) xor {K+G})→{K+{L6}}:.(({K+E} and M) xor ({K+F} and N) xor ({K+G} and O))→{K+{L6}}:End:End:0→Q:FnOn :End:.DispGraph:EndIf (getKey(15)):FnOff :LnReg {^r}:Return::Lbl D:!If (T++^10):If (J<7):J++:Else:1→J:End:1→Q:DispGraph:End:Return

:.[8140201008040281]→Pic2:.[2291482412894422]→Pic3:.[F7FBFD7EBFDFEFF7]→Pic4:[0281402010080402]→Pic2:[4824128944229148]→Pic3:[B55AAD56ABD56AB5]→Pic4

:.((({K+E} xor {K+G} xor M) and ({K+F} xor {K+G} xor N) and O) xor {K+G})→{K+{L6}}:(({K+E} and M) xor ({K+F} and N) xor ({K+G} and O))→{K+{L6}}

:.GR8GRAY::Full::.[8140201008040281]→Pic2:.[2291482412894422]→Pic3:.[F7FBFD7EBFDFEFF7]→Pic4:[0281402010080402]→Pic2:[4824128944229148]→Pic3:[B55AAD56ABD56AB5]→Pic4::0→A→B→C→T→J→K→M→N→O::1→Q

:GetCalc("prgmCRYS")→R::det(768,0)→E:det(768,0)→F:det(768,0)→G::For(H,0,11):For(I,0,63):(I*12)+H→K:{2+(K*3)+R}→{K+G}:{2+(K*3)+1+R}→{K+F}:{2+(K*3)+2+R}→{K+E}:End:End

:ClrDraw::.FnOff :.FnInt(D,0)::While 1:If (J<7):J++:Else:1→J:End:.If (Q=1):.FnOff :For(I,0,63):If (J<7):J++:Else:1→J:End:{J+Pic2}→M:{J+Pic3}→N:{J+Pic4}→O

:For(H,0,11):(I*12)+H→K:.((({K+E} xor {K+G} xor M) and ({K+F} xor {K+G} xor N) and O) xor {K+G})→{K+{L6}}:(({K+E} and M) xor ({K+F} and N) xor ({K+G} and O))→{K+{L6}}:End:End:.0→Q:.FnOn :.End:DispGraph:EndIf (getKey(15)):.FnOff :.LnReg {^r}:Return

:Lbl D:!If (T++^10):If (J<7):J++:Else:1→J:End:1→Q:DispGraph:End:Return

Essentially, the way I do 8 level is by shifting patterns across the screen. These patterns sample each of the 3 layers (low, medium, and high) so that the amount of time that a pixel is darkened is equal to the value of the underlying layers.I hope you understand this as it's pretty simple when it comes to grayscale. With 8 colors, you essentially have a pattern that has to repeat every 7 frames. Here are the fractions:0 = 0/71 = 1/72 = 2/73 = 3/74 = 4/75 = 5/76 = 6/77 = 7/7Those are pretty obvious, but I just have them there for good measure.Now, as far as translating those fractions to a pattern. Here are the patterns that each of the different shades need to display:0: 0000000 1: 1000000 2: 0010001 3: 0101010 4: 1010101 5: 1101110 6: 0111111 7: 1111111 But of course, the question is, how do you make those patterns? The answer is that it's tough. I spent a long time trying to figure this out. The issue is that since these patterns are 7 bits wide, they are really annoying to work with. I don't know how you want to go about doing it, but here's how I did it.h = high byte (the very back layer (I think it's back, it might be front though. It has a value of 4))m = middle byte (value = 2)l = low byte (value = 1)^ = xor& = bitwise and((l ^ h ^ 1000000) & (m ^ h ^ 0010001) & 1111011) ^ h This will get you the value to display. You literally apply this function with those constants rotated to every single byte and you will get the values that you should display to the screen. To finish rotating those values, you basically just imagine what the pattern should look like and take a subsection of it. For example:1000000 - if this continued on forever it would be: 1000000100000010000001000000So you get masks 10000001, 01000000, 00100000, 00010000, 00001000, 00000100, 00000010, 10000001