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?
#1
Anyone want to try recreating this in QB64PE code? 

Time Tunnel loop
Reply
#2
Something much less boring:
Code: (Select All)
_Title " Eye Candy #9C Closer" ' b+ 2022-03-09
DefDbl A-Z
xmax = _DesktopWidth: ymax = _DesktopHeight
Screen _NewImage(xmax, ymax, 32)
_ScreenMove 0, 0
xc = xmax / 2
yc = ymax / 2
diag = Sqr(xc * xc + yc * yc)
p2 = _Pi * 2
Dim colr(-100 To diag + 1000) As _Unsigned Long
Dim Shared cN, pR, pG, pB
While 1
    resetPlasma
    For i = -100 To diag + 1000
        colr(i) = Plasma~&
    Next

    ro = 950: s = 0
    While ro > -50 And _KeyDown(27) = 0
        k$ = InKey$
        If Len(k$) Then Exit While
        Cls
        For a = 0 To p2 / 64 Step p2 / (16 * 360)
            i = 50 * Sin(s) ' 2 * s or just s
            For r = 0 To diag
                PSet (xc + r * Cos(a), yc + r * Sin(a)), colr(r + i + ro)
            Next
            s = s + p2 / 180
        Next
        sx1 = xc: sy1 = yc: sx2 = xc + diag * Cos(.002): sy2 = yc + diag * Sin(.002): sx3 = xc + diag * Cos(p2 / 64 - .002): sy3 = yc + diag * Sin(p2 / 64 - .002)
        For a = p2 / 64 To p2 - p2 / 64 Step p2 / 64
            dx1 = xc: dy1 = yc: dx2 = xc + diag * Cos(a): dy2 = yc + diag * Sin(a): dx3 = xc + diag * Cos(a + p2 / 64): dy3 = yc + diag * Sin(a + p2 / 64)
            _MapTriangle (sx1, sy1)-(sx2, sy2)-(sx3, sy3), source& To(dx1 + Rnd * .02, dy1 + Rnd * .02)-(dx2 + Rnd * .02, dy2 + Rnd * .02)-(dx3 + Rnd * .02, dy3 + Rnd * .02), 0
        Next
        Line (0, 0)-(xc - 1.5 * yc, _Height), &HFF000000, BF
        Line (xc + 1.5 * yc, 0)-(_Width, _Height), &HFF000000, BF
        toggle = 1 - toggle
        If toggle Then _Display
        '_Limit 80
        ro = ro - 1
    Wend
    If _KeyDown(27) Then System
Wend

Function Plasma~& ()
    cN = cN + .2
    Plasma~& = _RGB32(127 + 127 * Sin(pR * cN), 127 + 127 * Sin(pG * cN), 127 + 127 * Sin(pB * cN))
End Function

Sub resetPlasma ()
    pR = Rnd ^ 2: pG = Rnd ^ 2: pB = Rnd ^ 2
End Sub

press any for another color pattern
b = b + ...
Reply
#3
(09-14-2024, 10:16 PM)madscijr Wrote: Anyone want to try recreating this in QB64PE code? 

Time Tunnel loop

Reproduced 100% perfectly below:

Code: (Select All)
Screen _NewImage(640, 480, 32)
Cls , -1
Color &HFF000000, &HFFCCCCCC
Print "Please enable JS and disable any ad blocker"


[Image: image.png]
Reply
#4
(09-14-2024, 11:13 PM)SMcNeill Wrote:
(09-14-2024, 10:16 PM)madscijr Wrote: Anyone want to try recreating this in QB64PE code? 

Time Tunnel loop

Reproduced 100% perfectly below:

Code: (Select All)
Screen _NewImage(640, 480, 32)
Cls , -1
Color &HFF000000, &HFFCCCCCC
Print "Please enable JS and disable any ad blocker"


[Image: image.png]
Ha ha ha! 

Perfectly executed, LOL
Reply
#5
(09-14-2024, 10:16 PM)madscijr Wrote: Anyone want to try recreating this in QB64PE code? 

Time Tunnel loop

Link sends me to a white screen. Steve nailed it!
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply
#6
(09-14-2024, 11:18 PM)TerryRitchie Wrote:
(09-14-2024, 10:16 PM)madscijr Wrote: Anyone want to try recreating this in QB64PE code? 

Time Tunnel loop

Link sends me to a white screen. Steve nailed it!

Hardest challenge that I've faced in a while, but I managed to finally sit down and bang out a solution for it, after seconds and seconds and at least three more seconds of coding.
Reply
#7
(09-14-2024, 10:23 PM)bplus Wrote: Something much less boring:
...
press any for another color pattern

That's quite nice! Some of the color variations get pretty wild.

The reason i thought of this is Halloween's coming up and it would be fun to display Twilight Zone style black & white optical illusions.

Sure, we could just play youtube videos, but it's more fun to see QB64PE do it (and no ads!)

Some examples (that hopefully won't give Steve any JavaScript errors...)

Black & white party visuals

Black and White Op Art Visual Background Video

Amazing Animated Optical Illusions! #7

optical illusion created with black and white square. 3d animation.

Abstract Tunnel Circles _ Black and White _ HD

this one is making me dizzy!
Inside 3D Black and White Checkerboard Optical Illusion Endless Room 4K UHD 60fps 1 Hour Video Loop

Trippy Psychedelic Optical Illusion - 4K Black and White Animation

or how about realistic TV static?

TV STATIC (4K 60FPS)

TV Static HD Video
Reply
#8
Some of those are pretty cool: 3D checkered rooms, yes, for an hour, ? Smile

One looked like Eye Candy in B&W!
b = b + ...
Reply
#9
Edit: Sun glasses for this one, epileptics do not watch!

Code: (Select All)
Screen 12
1 Cls: Color , (_BackgroundColor = 0) * -15: GoTo 1
b = b + ...
Reply
#10
Code: (Select All)
Screen _NewImage(640, 480, 32)
Dim m As _MEM: m = _MemImage(0)
Dim o As _Offset
Do
o = 0
Do
r = Int(Rnd * 2)
Select Case r
Case 0: _MemPut m, m.OFFSET + o, &HFFFFFFFF As _UNSIGNED LONG
Case 1: _MemPut m, m.OFFSET + o, &HFF000000 As _UNSIGNED LONG
End Select
o = o + 4
Loop Until o = m.SIZE
Loop Until _KeyHit

There's your TV static without the sound. I tend to keep my tv muted when it's got static on it, so this is what mine looks like. Big Grin
Reply




Users browsing this thread: 15 Guest(s)