Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
time tunnel animation - can this be done as high res and smooth as the video?
#35
Probably better! Full Screen on my screen flattens the images as Dav requested, mouse moves don't quite reach screen corners but...
Code: (Select All)
_Title "Time Tunnel 2" ' bplus 2024-09-21
Screen _NewImage(600, 600, 32)
'_ScreenMove 250, 60
_FullScreen
c& = _NewImage(1200, 1200, 32)
_Dest c&
FC3 600, 600, 550, &HFFFFFFFF
FC3 600, 600, 500, &HFF000000
_Dest 0
max = 1000
Do
    w = max: w2 = w / 2
    While _MouseInput: Wend
    While w > 30
        _PutImage (_MouseX - w2, _MouseY - w2)-Step(w, w), c&, 0
        w = w * .81: w2 = w * .5
    Wend
    FC3 _MouseX, _MouseY, 13, &HFFFFFFFF
    FC3 _MouseX, _MouseY, 12, &HFF000000
    _Display
    max = max + 4
    If max >= 1230 Then max = 1000
Loop Until _KeyDown(27)

Sub FC3 (cx As Long, cy As Long, r As Long, clr~&) ' all types integer due to float errors
    Dim As Long r2, x, y ' for Option _Explicit
    If r < 1 Then Exit Sub
    Line (cx - r, cy)-(cx + r, cy), clr~&, BF
    r2 = r * r
    Do
        y = y + 1
        x = Sqr(r2 - y * y)
        Line (cx - x, cy + y)-(cx + x, cy + y), clr~&, BF
        Line (cx - x, cy - y)-(cx + x, cy - y), clr~&, BF
    Loop Until y = r
End Sub

One would have to draw the circle image different for tunnels as they would need transparent centers I think.
b = b + ...
Reply


Messages In This Thread
RE: time tunnel animation - can this be done as high res and smooth as the video? - by bplus - 09-21-2024, 11:44 AM



Users browsing this thread: 14 Guest(s)