Skip to content

Commit

Permalink
Merge pull request #144 from TheWing/main
Browse files Browse the repository at this point in the history
added g33kou for 2024-10-28
  • Loading branch information
creativenucleus authored Dec 14, 2024
2 parents 84c4a71 + f5b9877 commit 2067e2f
Showing 1 changed file with 160 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1 +1,160 @@
-- missing for now, this is a placeholder
sin=math.sin
cos=math.cos
abs=math.abs
rnd=math.random

p1={
2,4,1,5,0,5, 3,
2,4,0,5,-1,4, 3,
2,4,-1,4,-2,2, 3,
2,4,-2,2,1,2, 3,
1,2,-2,2,-2,-2, 3,
1,2,-2,-2,1,-2, 3,
2,-4,1,-2,-2,-2, 3,
2,-4,-2,-2,-1,-4, 3,
2,-4,-1,-4,0,-5, 3,
2,-4,0,-5,1,-5, 3,
}

p2={
-2,2,-1,4,0,4, 3,
-2,2,0,4,2,2, 3,
-2,2,2,2,2,-2, 3,
-2,2,-2,-2,2,-2, 3,
0,4,2,2,1,4, 3,
-1,-4,-2,-2,0,-2, 3,
-1,-4,0,-2,1,-4, 3,
-1,-4,1,-4,0,-5, 3,
0,-2,2,-2,1,-4, 3,
0,4,0,6,1,6, 6,
}

p3={
-3,1,-2,0,-2,-1, 4,
-2,-1,-2,0,-1,1, 4,
-2,-1,-1,1,-1,0, 4,
-1,0,-1,1,0,-1, 4,
0,-1,0,0,-1,1, 4,
0,0,1,1,0,-1, 4,
0,-1,1,1,1,0, 4,
1,0,1,1,2,-1, 4,
2,-1,1,1,2,0, 4,
2,-1,2,0,3,1, 4,
}

p4={
0,0,-2,1,-3,0, 4,
0,0,-3,0,0,-1, 4,
0,-1,-.5,0,-1.5,0, 0,
0,1,-1,2,-2,2, 4,
}

function mtri(x,y,p,i,s,fl)
x1=p[i]*s
y1=p[i+1]*s
x2=p[i+2]*s
y2=p[i+3]*s
x3=p[i+4]*s
y3=p[i+5]*s
if fl&1==1 then
x1=x-x1
x2=x-x2
x3=x-x3
else
x1=x+x1
x2=x+x2
x3=x+x3
end
if fl&2==2 then
y1=y+y1
y2=y+y2
y3=y+y3
else
y1=y-y1
y2=y-y2
y3=y-y3
end
tri(x1,y1,x2,y2,x3,y3,p[i+6])
end

function bump(t,d)
return abs(sin(-t/10+d)*2)
end

web={
0,0,40,0,
0,0,0,40,
0,0,35,35,
0,15,10,10,
0,20,15,15,
0,25,20,20,
0,30,25,25,
0,35,30,30,
10,10,15,0,
15,15,20,0,
20,20,25,0,
25,25,30,0,
30,30,35,0,
}

spi={
20,60,15,55,
15,55,10,60,
20,63,15,58,
15,58,10,63,
20,66,15,61,
15,61,10,66,
20,60,25,55,
25,55,30,60,
20,63,25,58,
25,58,30,63,
20,66,25,61,
25,61,30,66,
}

function mline(x,y,p)
for i=1,#p,4 do
line(x+p[i],y+p[i+1],x+p[i+2],y+p[i+3],1)
end
end

t=0
function TIC()
t=t+1
--
vbank(0)
cls()
for i=0,100 do
pix(rnd()*240,rnd()*136,12)
end
--
vbank(1)
cls()
mline(0,0,web)
y=fft(0,40)
line(20,20,20,y+60,1)
elli(20,y+60,3,6,1)
pix(19,y+64,2)
pix(21,y+64,2)
mline(0,y,spi)
--
s=.2*fft(0,40) --sin(t)/10)
x=cos(t/50)*20
y=sin(t/50)*20
for i=1,#p1,7 do
mtri(x+120-19-s*3,y+68+bump(t,.5),p1,i,6+s,0)
mtri(x+120-38-s*6,y+68+bump(t,1),p1,i,6+s,0)
mtri(x+120+19+s*3,y+68+bump(t,.5),p1,i,6+s,1)
mtri(x+120+38+s*6,y+68+bump(t,1),p1,i,6+s,1)
end
for i=1,#p2,7 do
mtri(x+120,y+68+bump(t,0),p2,i,6+s,0)
end
for i=1,#p3,7 do
mtri(x+120,y+80+bump(t,0),p3,i,sin(t/100)*8,0)
end
for i=1,#p4,7 do
mtri(x+120-10,y+60+bump(t,0),p4,i,6+s,0)
mtri(x+120+10,y+60+bump(t,0),p4,i,6+s,1)
end
end

0 comments on commit 2067e2f

Please sign in to comment.