Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Smooothness
#2
That looks smooth, I see or imagine a slight spiral effect when I change pset to circle which magnifies the view.

Hey have you seen my Particle Fountain?
Code: (Select All)
_Title "Particle Fountain" 'b+ 2020-08-27
' 2023-08-17 tweaked a number for improved more consistent performance
Const nP = 50000
Type particle
    x As Single
    y As Single
    dx As Single
    dy As Single
    r As Single
    c As _Unsigned Long
End Type
Dim Shared p(1 To nP) As particle
Screen _NewImage(800, 600, 32)
_Delay .25
_ScreenMove _Middle
For i = 1 To nP
    new i
Next
Color , &HFF002200
Do
    Cls
    If lp < nP Then lp = lp + 10
    For i = 1 To lp
        p(i).dy = p(i).dy + .1
        p(i).x = p(i).x + p(i).dx
        p(i).y = p(i).y + p(i).dy
        If p(i).x < 0 Or p(i).x > _Width Then new i
        If p(i).y > _Height And p(i).dy > 0 Then
            p(i).dy = -.75 * p(i).dy: p(i).y = _Height - 5
        End If
        Circle (p(i).x, p(i).y), p(i).r, p(i).c
    Next
    _Display
    _Limit 60
Loop Until _KeyDown(27)
Sub new (i)
    p(i).x = _Width / 2 + Rnd * 20 - 10
    p(i).y = _Height + Rnd * 5
    p(i).dx = Rnd * 1 - .5
    p(i).dy = -10
    p(i).r = Rnd * 3
    p(i).c = _RGB32(50 * Rnd + 165, 50 * Rnd + 165, 255)
End Sub
b = b + ...
Reply


Messages In This Thread
Smooothness - by NakedApe - 10-10-2024, 10:31 PM
RE: Smooothness - by bplus - 10-10-2024, 10:38 PM
RE: Smooothness - by NakedApe - 10-11-2024, 01:22 AM
RE: Smooothness - by SMcNeill - 10-11-2024, 01:54 AM
RE: Smooothness - by NakedApe - 10-11-2024, 05:26 AM
RE: Smooothness - by DSMan195276 - 10-11-2024, 05:29 AM
RE: Smooothness - by NakedApe - 10-13-2024, 03:57 PM
RE: Smooothness - by SMcNeill - 10-13-2024, 05:42 PM
RE: Smooothness - by bplus - 10-13-2024, 07:02 AM
RE: Smooothness - by NakedApe - 10-13-2024, 07:37 PM



Users browsing this thread: 1 Guest(s)