Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 5poke53280,15:s=8192
- 10poke53272,peek(53272)or8:poke53265,peek(53265)or32
- 15gosub395
- 20rem clear color ram
- 25cb$="pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp"
- 30cb$=cb$+cb$:cb$=cb$+left$(cb$,121)
- 35print"ppp"cb$;cb$;cb$;cb$;
- 40fori=0to7:tw%(i)=2^i:next
- 45goto315
- 50rem plot x,y
- 55ify<0ory>199thengoto75
- 60ifx<0orx>319thengoto75
- 65p=s+320*int(y/8)+8*int(x/8)+(yand7)
- 70pokep,peek(p)ortw%(7-(xand7))
- 75return
- 80rem calc lines pixels
- 85dx=x1-x2:dy=y1-y2
- 90ifdx=0goto135
- 95m=dy/dx
- 100ab=1:ifm>1orm<-1goto160
- 105ifdx>0thenab=-1
- 110forx=x1tox2stepab
- 115y=m*(x-x1)+y1
- 120gosub55
- 125next:return
- 130rem if dx=0
- 135x=x1:ab=1:ifdy>0thenab=-1
- 140fory=y1toy2stepab
- 145gosub55
- 150next:return
- 155rem if m>1orm<-1
- 160ab=1:ifdy>0thenab=-1
- 165fory=y1toy2stepab
- 170x=(y-y1)/m+x1
- 175gosub55
- 180next:return
- 185rem plot polygon
- 190fi=2*pi/n:s1=sin(fi):c1=cos(fi)
- 195y1=0:x1=r:kk=0
- 200fork=0ton-1
- 205x2=xc+x1*c1-y1*s1:a(kk,0)=x2
- 210y2=yc+x1*s1+y1*c1:a(kk,1)=y2
- 215kk=kk+1
- 220x1=xc+x1:a(kk,0)=x1
- 225y1=yc+y1:a(kk,1)=y1:kk=kk+1
- 230gosub85
- 235x1=x2-xc:y1=y2-yc
- 240next:return
- 245rem rotate polygon
- 250fi=pi/w:s1=sin(fi):c1=cos(fi):kk=0
- 255fork=0ton-1
- 260x2=a(kk,0)*c1-a(kk,1)*s1
- 265y2=a(kk,0)*s1+a(kk,1)*c1
- 270a(kk,0)=x2:a(kk,1)=y2
- 275kk=kk+1
- 280x1=a(kk,0)*c1-a(kk,1)*s1
- 285y1=a(kk,0)*s1+a(kk,1)*c1
- 290a(kk,0)=x1:a(kk,1)=y1
- 295gosub85
- 300kk=kk+1
- 305next:return
- 310rem main
- 315xc=50:yc=10:r=10:w=18:dima(20,1)
- 320forn=3to10
- 325gosub190
- 330fori=0ton+3
- 335gosub245
- 340next
- 345co=2+int(13*rnd(0))
- 350forj=1024to2023:pokej,16*co:next
- 360xc=xc+37:next
- 364poke198,0:wait198,1
- 365printchr$(147)
- 370rem turn graphics off
- 375poke53265,peek(53265)and(223)
- 380poke53272,21:poke53280,14
- 385end
- 390rem clear graphic ram
- 395cb$=""
- 400p1=peek(51):p2=peek(52)
- 405poke51,64:poke52,63
- 410forcn=1to125:cb$=cb$+chr$(0):next
- 415poke51,p1:poke52,p2
- 420return
Add Comment
Please, Sign In to add comment