home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 4 / AUCD4.iso / acornuser / 1998 / apr1998 / regulars / StarInfo / Stoner / Satin (.txt) next >
RISC OS BBC BASIC V Source  |  1997-06-30  |  2KB  |  74 lines

  1.  True Plasma Drawer
  2.  by Nigel Stoner 1997
  3. doit:
  4. " in line ";
  5. setpal
  6.     ti%=
  7. fullscrn
  8. -ti%)/100))
  9. <>22 
  10.  "OS_SWINumberFromString",,"ColourTrans_SetGCOL" 
  11.  col%
  12.  cx%(16),cy%(16),pal%(255)
  13. pickcs
  14.  x%,y%,b%,ox%,oy%
  15.  x%=0 
  16.  1280 
  17. x%,0,1,1024:
  18. 0,x%*.75,1280,1:
  19. 0,10)"Place your attractors with Select"
  20. centre%=3:
  21.  3,15
  22.  a%=0 
  23.  centre%:
  24. x%,y%,b%:
  25. b%=0:ox%=x%:oy%=y%:
  26. x%,y%,128
  27.  x%,y%,b%
  28.  ox%<>x% 
  29.  oy%<>y% 
  30. ox%,oy%,128:ox%=x%:oy%=y%:
  31. ox%,oy%,128
  32.  b%=4:cx%(a%)=x%:cy%(a%)=y%:
  33. setpal
  34.  set pallette
  35.  a%=0 
  36. a%,a%*16,a%*16,a%*16::
  37. fullscrn
  38. centre%=3:
  39. pickcs
  40. 0,12)"Enter Band Width (1-99)";
  41.  band:
  42.  band >0 
  43.  band <100
  44. band=1-(band/100) 
  45. over%=8:start%=0
  46.  y%= start% 
  47.  1024-over% 
  48.  over%:
  49.  x%= start% 
  50.  1280-over% 
  51.  over%:xsum%=0:ysum%=0:
  52.  a%=0 
  53.  centre%:dx%=cx%(a%)-x%:dy%=cy%(a%)-y%:d2%=dx%*dx%+dy%*dy%
  54.  d2% <> 0  adj%=(dx%*dy%):x2%=(dx%*adj%)>>7:y2%=(dx%*adj%)>>7:xsum%+=(x2%*cx%(a%))/d2%:ysum%+=(y2%*cy%(a%))/d2% 
  55.  a%=centre%+1
  56.  a%:d%=
  57. (xsum%^2+ysum%^2):tx%=d%*band 
  58.  256:
  59. col%,(tx%<<8)+(tx%<<16)+(tx%<<24),,,&100:
  60. x%,y%,over%-4:
  61.  x%,y%
  62. cycle:
  63. cycle
  64. /7.6 
  65. 15:r%=16*
  66. (t%/9+60)+18:g%=16*
  67. (t%/8)+18:b%=15*
  68. (t%/7+120)+18:
  69.  a%=0 
  70. (a%+n%)
  71. 16,a%*r%,a%*g%,a%*b%:
  72. (15-a%+n%)
  73. 16,a%*r%,a%*g%,a%*b%:
  74.