Crop Circles bplus B = B + ... Offline This member has written at least 1,268 posts and created at least 154 threads on this forum since joining inApr 2017. 09-12-2017, 02:55 PM Code:```'crop circles 1.bas SmallBASIC 2015-09-19 MGA/B+ cx=xmax/2:cy=ymax/2:cr=cy-60:m=20:OK=1 pen on rect 0,0,xmax,ymax,rgb(0,128,0) filled while OK    k=inkey    if len(k)=1 and asc(k)=27 then OK=0    if k="c" then rect 0,0,xmax,ymax,rgb(0,128,0) filled    mx=pen(4):my=pen(5)    dx=(mx-cx)/m:dy=(my-cy)/m:dr=cr/m    for i=m to 0 step -1       if i mod 2 then cc=rgb(0,160,0) else cc=rgb(0,128,0)       x=cx+dx*(m-i):y=cy+dy*(m-i):r=dr*i       circle x,y,r,1,cc filled    next    delay 200 wend pen off``` Attached Files Thumbnail(s) B += x bplus B = B + ... Offline This member has written at least 1,268 posts and created at least 154 threads on this forum since joining inApr 2017. 09-12-2017, 02:57 PM This post was last modified: 09-12-2017, 02:59 PM by bplus.Edited 0 times Coming soon... Attached Files Thumbnail(s) B += x Waltersmind A computer programming hobbyist and enthusiast Offline This member has written at least 816 posts and created at least 109 threads on this forum since joining inJun 2014. 09-15-2017, 01:37 AM Where's the source code to the second set of graphics? Dedicated to empowering computer programming hobbyists, tinkerers, amateurs, and enthusiasts. bplus B = B + ... Offline This member has written at least 1,268 posts and created at least 154 threads on this forum since joining inApr 2017. 09-15-2017, 03:26 AM Of course these are cherry picked! Attached Files Thumbnail(s) B += x bplus B = B + ... Offline This member has written at least 1,268 posts and created at least 154 threads on this forum since joining inApr 2017. 09-15-2017, 07:08 AM Such variety from so little code: Code:```' crop circles update.bas SmallBASIC 0.12.9 (B+=MGA) 2017-09-14 ' from: crop circle #5.bas for SmallBASIC old FTLK 11.5 2015-11-01 MGA/B+ ' 2017-09-14 mod for spacebar key SmallBASIC 0.12.9 definekey 32, cc const x0 = xmax / 2 : const y0 = ymax/2 cc sub cc  color 15, rgb(0, 128, 0) : cls  print "Crop Circles,   press spacebar for next field."  r0 = Rand(1, 5) / 10 : r1 = Rand(1, 5) / 10: r2 = Rand(1, 5) / 10  fc = Rand(1, 200) / 10 : st = Rand(10, 500) / 1000  xol = 0 : yol = 0 : mol = 0  for i = 0 to 120 step st    a0 = (i / r0) * (2 * pi)    a1 = ((i / r1) * (2 * pi)) * -1    x1 = x0 + (sin(a0) * ((r0 - r1) * fc)) * 30    y1 = y0 + (cos(a0) * ((r0 - r1) * fc)) * 30    x2 = x1 + (sin(a1) * ((r2) * fc)) * 30    y2 = y1 + (cos(a1) * ((r2) * fc)) * 30    if mol = 0 then      mol = 1: xol = x2: yol = y2    else      line xol, yol, x2, y2, rgb(0,194,0)      xol = x2 : yol = y2    end if  next  while inkey = 0 : delay 40: wend   end func Rand(low, high)   Rand = rnd * (high - low) + low end  ``` Attached Files Thumbnail(s) B += x johnno56 Registered Offline This member has written at least 261 posts and created at least 17 threads on this forum since joining inApr 2017. 09-15-2017, 08:09 AM So much variety from such little code! Back in the mid 80's, running on a 4mhz box, it could take upward of about 2 minutes to draw just one pattern. Now, by just holding down space, several patterns are drawn per second... the mind boggles... at least 'mine' does... and that's not hard to do... lol Great job! J May your journey be free of incident. Live long and prosper. « Next Oldest | Next Newest »