BBC Micro Bot 'JWST' images

Here you can link to screenshots and demos etc. of programs made using BBC BASIC
Hated Moron

BBC Micro Bot 'JWST' images

Post by Hated Moron »

There has been some recent interest in the BBC Micro Bot (at Twitter) renderings of some images reminiscent of those from the James Webb Space Telescope. Unsurprisingly, the code for these often contains shortcuts such as poking directly into the Beeb's screen RAM, which obviously won't work in BB4W or BBCSDL. However only very minor modifications may be necessary to overcome this, and here for example is a minimally-altered program to display the MODE 2 image below:

Code: Select all

   10 REM01377764
   20 MODE2
   30 B=12288
   40 H=300
   50 VDU5,19,4,15;0;
   60 FORi=0TOH
   70   PLOT69,RND(1278),RND(1022):PLOT65,0,4
   80 NEXT
   90 FORj=99TOB
  100   X=RND(1):Y=RND(1)
  110   IFRND(9)>5THENC=-RND(2):Y=-(Y^4)ELSEC=1:Y=-LN(Y^.3)
  120   A=.2:S=4
  130   FORk%=0TO2
  140     X=X+FNN(X+Y*3)+FNN(Y)
  150     Y=Y+FNN(Y+X*3)+FNN(X)
  160     S=S+S
  170     A=A/2
  180   NEXT
  190   IFj>B-H THENX=RND(6)/6:Y=Y/3:C=0ELSEY=Y+.5
  200   X=X*PI*2
  210   s=650+SINX*Y*H
  220   t=650+COSX*Y*H-s/4
  230   GCOL0,C+POINT(s,t)AND7
  240   IFC=0GCOL0,4
  250   PLOT69,s,t
  260 NEXT
  270 REPEATUNTILINKEY(4)=0
  280 DEFFNN(x)
  290 x=x*S
  300 f=x-INTx
  310 i=99*INTx
  320 a=SINi
  330 b=SIN(i+99)
  340 =((a-INTa)*(1-f)+(b-INTb)*f)*A
(Reminder: this will be mis-formatted if read at the Discussion Group, please click through to the original forum message to see the listing).

Image