home *** CD-ROM | disk | FTP | other *** search
/ CBM Funet Archive / cbm-funet-archive-2003.iso / cbm / magazines / c=hacking / code / 08 / init3d.prg (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1995-02-01  |  512 b   |  22 lines

  1. 10 rem program to initialize cube3d
  2. 20 rem stephen judd, george taylor
  3. 25 print"working";
  4. 30 bs=6528:bc=6656:bz=6784
  5. 40 a=0:da=(NULL)/60
  6. 50 fori=0to120:s%=32*sin(a)+.5:c%=32*cos(a)+.5:a=a+da
  7. 51 print".";
  8. 55 if s%<0 then s%=256+s%
  9. 56 if c%<0 then c%=256+c%
  10. 58 pokebs+i,s%:pokebc+i,c%
  11. 59 next
  12. 60 d=80:z0=3:z=-128:dz=1
  13. 70 forj=0to255
  14. 71 print"!";
  15. 80 q%=64*d/(64*z0-z)
  16. 81 if q%>127 then q%=127
  17. 82 if q%<-127 then q%=-127
  18. 83 if q%<0 then q%=256+q%
  19. 85 pokebz+j,q%
  20. 90 z=z+dz:next
  21. 100 sys4096:print"neat, huh?"
  22.