Advertisement
Guest User

Untitled

a guest
Jun 1st, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. xed=720:yed=480:wdwd=1:frmall=2000:frmct=0:ivbl=0
  2. randomize
  3. function rndfloat(a):rndfloat=(rnd(a*1000))/1000:end function
  4. setdisplay(xed,yed,32,wdwd):paper(8^8-1):ink(0):pen(0):cls
  5. paper (rgb(rnd(255),rnd(255),rnd(255))):cls
  6. setcaption("Spirographics (...?)")
  7. while frmct<frmall
  8.   ink (rgb(rnd(255),rnd(255),rnd(255)))
  9.   r0=rndfloat(15):r1=rndfloat(5):r2=rndfloat(5)
  10.   fc=rndfloat(60):st=rndfloat(10)/1000
  11.   xq0=rnd(xed):yq0=rnd(yed)
  12.   inic=0:fi=80:pi=3.141592
  13.   xol=0:yol=0:mol=0
  14.   for i=inic to fi step st
  15.     a0=(i/r0)*(2*pi):a1=((i/r1)*(2*pi))*-1
  16.     x1=xq0+(sin(a0)*((r0-r1)*fc)):y1=yq0+(cos(a0)*((r0-r1)*fc))
  17.     x2=x1+(sin(a1)*((r2)*fc)):y2=y1+(cos(a1)*((r2)*fc))
  18.   if mol=0 then: mol=1:xol=x2:yol=y2
  19.     else: line (xol,yol,x2,y2):xol=x2:yol=y2
  20.     end if
  21.   if key(k_esc)<>0 then:end:end if
  22.   if key(k_delete)<>0 then:cls:end if
  23.   ivbl+=1
  24.   if ivbl>2048 then:
  25.     'waitvbl
  26.     grab (1,0,0,xed,yed):saveimage ("tmp.bmp",1):shell("convert tmp.bmp frm"+str$(frmct)+".jpg")
  27.     frmct+=1:ivbl=0
  28.     end if
  29.     next
  30.   wend
  31. shell ("ffmpeg -i frm%d.jpg -target ntsc-dvd final.vob")
  32. shell ("rm *.jpg")
  33. '- sudo apt-get install sdlbasic ffmpeg imagemagick
  34. '- sudo apt-get install libcdaudio1 gstreamer0.10-ffmpeg libxine1-ffmpeg libenca0 libcdaudio1 libdvdread4 libdvdnav4
  35. '- sudo apt-get install gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad-multiverse
  36. '- sudo apt-get install libavutil49 libavcodec52 gstreamer0.10-plugins-bad
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement