Last active
November 29, 2022 04:29
-
-
Save MCJack123/e914bfcaaa0a204249e50594c7891676 to your computer and use it in GitHub Desktop.
Donut (ComputerCraft edition)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local A, | |
B,z,b,S,C,F,r= | |
0,0,{},{},math.sin | |
,math.cos,math.floor,{ | |
}for c in([[0123456789ab | |
]]):gmatch"%S"do r[#r+1]=c | |
end term.clear()for i=0,11-- | |
do term.setPaletteColor(2^i,i/ | |
11,i/18,i/21)end while""do for | |
n=0,1759 do b[n], z[n]=" ",0 end | |
for j=0,6.23,.07 do for i=0,6.26 | |
,0.02 do local c,d,e,f,g,l,m, | |
n=S(i),C(j),S (A),S(j),C(A) | |
,C(i),C(B),S (B)local h=d | |
+2 local t,D =c*h*g-f*e,1 | |
/(c*h*e+f*g +5)local x, | |
y,N=F(40+30 *D*(l*h*m-t | |
*n)), F(12+ 15*D*(l*h*n | |
+t*m)),F(8* ((f*e-c*d*g | |
)*m-c*d*e-f *g-l* d*n)) | |
-1 local o= F(x+80*y)if | |
22>y and y>0 and x >0 and | |
80>x and D>z [o] then z[o | |
],b[o]=D,r[N> 1 and N or 1] | |
end end end t= term--@#*)$%(: | |
term.setCursorPos(1, 1)for k =0, | |
1760 do if k%80==0 then term.--/ | |
setCursorPos(1,F(k/80)+1) else | |
term.blit(" ","f",b[k])end end | |
A,B=A+.04,B+.02 if not --@#/ | |
pcall(sleep,.05)then break | |
end end for i=0,11 do t. | |
setPaletteColor(2^i,t. | |
nativePaletteColor( | |
2^i))end term. | |
clear () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment