Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spring Toy
#4
Nice, this reminds me of this B+ mod from a while ago

Code: (Select All)
DEFINT A-Z

CONST z0 = 2500
CONST y0 = -200
CONST d = 700

CONST sw = 640
CONST sh = 480

DIM SHARED pi AS DOUBLE
pi = 4 * ATN(1)

SCREEN _NEWIMAGE(sw, sh, 32)


DIM a AS DOUBLE
DIM t AS DOUBLE
t = 0
DO
    t = t + 0.1
    h = 120 + 100 * SIN(t)

    LINE (0, 0)-(sw, sh), _RGB(0, 0, 0), BF

    ox = 500 * COS(0)
    oz = 500 * SIN(0)
    oy = -500 + 0 * h / (2 * pi)
    'PSET (sw / 2 + ox * d / (oz + z0), sh / 2 - (oy + y0) * d / (oz + z0))

    FOR a = 0.1 TO 15 * 2 * pi STEP 0.01
        x = 500 * COS(a)
        z = 500 * SIN(a)
        y = -500 + a * h / (2 * pi)

        DIM dy AS SINGLE
        FOR dy = 6 TO 0 STEP -.5
            LINE (sw / 2 + ox * d / (oz + z0), sh / 2 - (oy + y0) * d / (oz + z0) + dy)-(sw / 2 + x * d / (z + z0) + 6, sh / 2 - (y + y0) * d / (z + z0) + dy), _RGB32(185 - dy * 17), BF
        NEXT

        ox = x
        oy = y
        oz = z
    NEXT

    _DISPLAY
    _LIMIT 20
LOOP UNTIL _KEYHIT = 27
SYSTEM
Reply


Messages In This Thread
Spring Toy - by SierraKen - 06-03-2022, 01:24 AM
RE: Spring Toy - by bplus - 06-03-2022, 01:35 AM
RE: Spring Toy - by SierraKen - 06-03-2022, 03:19 AM
RE: Spring Toy - by vince - 06-07-2022, 10:16 AM
RE: Spring Toy - by bplus - 06-07-2022, 10:48 AM
RE: Spring Toy - by Coolman - 06-07-2022, 11:15 AM
RE: Spring Toy - by SierraKen - 06-07-2022, 08:08 PM



Users browsing this thread: 3 Guest(s)