Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small 25 line program
#2
What happens if we tweak numbers a bit and give pi a non zero value?
Code: (Select All)
Screen 12
pi = 3.1415
n = 200
r = (2 * pi) / 100
x = 0
v = 0
t = 0
sz = 200
s = 0
scrw = 640: scrh = 480
sw = scrw / sz: sh = scrh / sz
offset = scrh / 4.5
Do
    Cls
    For i = 50 To n
        c~& = _RGB32(Int(Rnd * 200) + 55, Int(Rnd * 200) + 55, Int(Rnd * 200) + 55)
        For j = 50 To n
            u = Sin(i + v) + Sin(r * i + x)
            v = Cos(i + v) + Cos(r * i + x)
            x = u + t
            q = scrw / 2 + u * offset
            a = scrh / 2 + v * offset
            Circle (q, a), 1, c~&
            lastq = q: lasta = a
        Next j
    Next i
    t = t + .001
    _Display
    _Limit 30
Loop

EDIT: more dramatic color change
b = b + ...
Reply


Messages In This Thread
Small 25 line program - by Gadgetjack - 11-15-2022, 06:40 PM
RE: Small 25 line program - by bplus - 11-15-2022, 07:15 PM
RE: Small 25 line program - by Gadgetjack - 11-15-2022, 07:19 PM
RE: Small 25 line program - by bplus - 11-15-2022, 07:20 PM
RE: Small 25 line program - by CharlieJV - 11-15-2022, 07:30 PM
RE: Small 25 line program - by bplus - 11-15-2022, 08:06 PM
RE: Small 25 line program - by CharlieJV - 11-15-2022, 08:10 PM
RE: Small 25 line program - by Gadgetjack - 11-15-2022, 08:20 PM
RE: Small 25 line program - by mnrvovrfc - 11-15-2022, 08:56 PM
RE: Small 25 line program - by mnrvovrfc - 11-15-2022, 09:07 PM
RE: Small 25 line program - by dbox - 11-15-2022, 11:24 PM
RE: Small 25 line program - by bplus - 11-15-2022, 11:33 PM
RE: Small 25 line program - by CharlieJV - 11-16-2022, 12:09 AM
RE: Small 25 line program - by SMcNeill - 11-15-2022, 11:58 PM
RE: Small 25 line program - by bplus - 11-20-2022, 09:49 AM
RE: Small 25 line program - by CharlieJV - 11-20-2022, 05:09 PM
RE: Small 25 line program - by Pete - 11-20-2022, 11:22 AM
RE: Small 25 line program - by bplus - 11-20-2022, 04:33 PM
RE: Small 25 line program - by bplus - 11-20-2022, 06:05 PM
RE: Small 25 line program - by CharlieJV - 11-20-2022, 06:20 PM
RE: Small 25 line program - by bplus - 11-20-2022, 07:05 PM
RE: Small 25 line program - by CharlieJV - 11-20-2022, 07:41 PM
RE: Small 25 line program - by bplus - 11-21-2022, 10:10 AM



Users browsing this thread: 4 Guest(s)