Screen Savers
#27
Here is my version. It only stays as a triangle but I think it's cool. 

Code: (Select All)
_Title "Floating Triangle - by Sierraken"
Screen _NewImage(800, 800, 32)
dirrr = .1
dirx = -1
diry = 1
cenx = 400
ceny = 400
length1 = Rnd * 50
length2 = Rnd * 50
length3 = Rnd * 50

Do
    _Limit 15
    If cenx > 600 Then dirx = -1 * Rnd * 3
    If cenx < 200 Then dirx = 1 * Rnd * 3
    If ceny > 600 Then diry = -1 * Rnd * 3
    If ceny < 200 Then diry = 1 * Rnd * 3
    t = t + .1
    If t = 2 Then
        dirr = Int(Rnd * 4) + 1
        If dirr = 1 Then dirx = -1 * Rnd * 3
        If dirr = 2 Then dirx = 1 * Rnd * 3
        If dirr = 3 Then diry = -1 * Rnd * 3
        If dirr = 4 Then diry = 1 * Rnd * 3
        length1 = Rnd * 50
        length2 = Rnd * 50
        length3 = Rnd * 50
    End If
    If t = 6 Then
        dirr2 = Int(Rnd * 2)
        If dirr2 = 1 Then dirrr = -.1
        If dirr2 = 2 Then dirrr = .1
        length1 = Rnd * 50
        length2 = Rnd * 50
        length3 = Rnd * 50
    End If
    cenx = cenx + dirx
    ceny = ceny + diry
    seconds = seconds + dirrr
    s = (60 - seconds) * 6 + 180
    x = Int(Sin(s / 180 * 3.141592) * 125) + cenx
    y = Int(Cos(s / 180 * 3.141592) * 125) + ceny
    m = 180 - seconds * 6
    xx = Int(Sin(m / 180 * 3.141592) * 120) + x
    yy = Int(Cos(m / 180 * 3.141592) * 120) + y
    c1 = c1 + 1
    c2 = c2 + 1
    c3 = c3 + 1
    If c1 > 255 Then
        c1 = Rnd * 255
        c2 = Rnd * 255
        c3 = Rnd * 255
    End If
    For b = -5 To 5 Step .1
        Line (x + b + length3, y + b + length3)-(xx + b + length1, yy + b + length1), _RGB32(c1, c2, c3)
    Next b
    h = 360 - seconds * 30 + 180
    xxx = Int(Sin(h / 180 * 3.141592) * 100) + xx
    yyy = Int(Cos(h / 180 * 3.141592) * 100) + yy
    For b = -5 To 5 Step .1
        Line (xx + b + length1, yy + b + length1)-(xxx + b + length2, yyy + b + length2), _RGB32(c1, c2, c3)
    Next b
    For b = -5 To 5 Step .1
        Line (xxx + b + length2, yyy + b + length2)-(x + b + length3, y + b + length3), _RGB32(c1, c2, c3)
    Next b
    If t > 12 Then
        t = 0
    End If
    _Display
    Line (0, 0)-(800, 800), _RGB32(0, 0, 0, 30), BF
Loop Until InKey$ = Chr$(27)
Reply


Messages In This Thread
Screen Savers - by bplus - 04-27-2022, 12:29 AM
RE: Screen Savers - by Dav - 04-27-2022, 02:26 PM
RE: Screen Savers - by bplus - 04-27-2022, 02:33 PM
RE: Screen Savers - by bplus - 04-30-2022, 11:55 PM
RE: Screen Savers - by Dav - 05-01-2022, 07:22 PM
RE: Screen Savers - by bplus - 05-01-2022, 08:26 PM
RE: Screen Savers - by bplus - 05-02-2022, 12:00 AM
RE: Screen Savers - by Coolman - 05-02-2022, 09:42 AM
RE: Screen Savers - by bplus - 05-03-2022, 02:13 AM
RE: Screen Savers - by bplus - 05-09-2022, 01:32 PM
RE: Screen Savers - by bplus - 05-19-2022, 07:22 PM
RE: Screen Savers - by bplus - 05-21-2022, 11:22 PM
RE: Screen Savers - by Pete - 05-21-2022, 11:27 PM
RE: Screen Savers - by bplus - 05-21-2022, 11:38 PM
RE: Screen Savers - by Pete - 05-22-2022, 04:39 AM
RE: Screen Savers - by bplus - 06-17-2022, 01:10 PM
RE: Screen Savers - by johnno56 - 06-18-2022, 12:23 AM
RE: Screen Savers - by Kernelpanic - 06-18-2022, 11:48 AM
RE: Screen Savers - by bplus - 06-18-2022, 01:47 AM
RE: Screen Savers - by bplus - 06-18-2022, 12:33 PM
RE: Screen Savers - by Kernelpanic - 06-18-2022, 03:21 PM
RE: Screen Savers - by RhoSigma - 06-18-2022, 03:51 PM
RE: Screen Savers - by bplus - 06-18-2022, 05:02 PM
RE: Screen Savers - by RhoSigma - 06-18-2022, 10:03 PM
RE: Screen Savers - by Kernelpanic - 06-18-2022, 08:15 PM
RE: Screen Savers - by bplus - 06-19-2022, 01:14 AM
RE: Screen Savers - by SierraKen - 06-20-2022, 09:50 PM
RE: Screen Savers - by bplus - 06-21-2022, 12:15 AM
RE: Screen Savers - by bplus - 06-29-2022, 04:52 PM
RE: Screen Savers - by SierraKen - 06-29-2022, 06:10 PM
RE: Screen Savers - by vince - 07-01-2022, 10:32 PM
RE: Screen Savers - by bplus - 07-01-2022, 11:05 PM
RE: Screen Savers - by bplus - 07-04-2022, 06:54 PM
RE: Screen Savers - by Kernelpanic - 07-04-2022, 09:11 PM
RE: Screen Savers - by bplus - 07-04-2022, 09:54 PM
RE: Screen Savers - by Kernelpanic - 07-05-2022, 02:14 PM
RE: Screen Savers - by bplus - 07-19-2022, 08:28 PM
RE: Screen Savers - by bplus - 08-28-2022, 12:55 AM
RE: Screen Savers - by TempodiBasic - 08-29-2022, 09:26 AM
RE: Screen Savers - by bplus - 09-06-2022, 12:35 AM
RE: Screen Savers - by SierraKen - 09-08-2022, 07:37 PM
RE: Screen Savers - by bplus - 09-09-2022, 02:22 AM
RE: Screen Savers - by SpriggsySpriggs - 09-15-2022, 04:38 PM
RE: Screen Savers - by bplus - 09-15-2022, 05:20 PM
RE: Screen Savers - by bplus - 01-31-2023, 04:21 PM
RE: Screen Savers - by vince - 02-01-2023, 07:27 AM
RE: Screen Savers - by bplus - 02-01-2023, 05:05 PM
RE: Screen Savers - by bplus - 03-13-2023, 10:51 PM
RE: Screen Savers - by vince - 03-31-2023, 11:09 PM
RE: Screen Savers - by bplus - 04-01-2023, 12:09 AM



Users browsing this thread: 10 Guest(s)