Radian Ferris Wheel
#1
I was messing around with radians and ended up making this.   Cheers.

Code: (Select All)
'radian ferris wheel
'james2464 - Nov 11 2022 - Radian Ferris Wheel

Screen _NewImage(800, 600, 32)
Const PI = 3.141592654#

Dim c(2) As Long
c(1) = _RGB(50, 255, 100)
c(2) = _RGB(0, 100, 0)

'origin
xx = 400
yy = 300
w = 120 'wheel radius
p = 10 'number of positions
'=====================================================
h = _Hypot(w, 0)
h1 = _Atan2(0, w)
'=====================================================
Do
    _Limit 30
    Cls
    Circle (xx, yy), w, c(2)
    Line (xx, yy)-(xx - 50, yy + w + 40), c(1)
    Line (xx, yy)-(xx + 50, yy + w + 40), c(1)
    Line (xx - 50, yy + w + 40)-(xx + 50, yy + w + 40), c(1)
    h1 = h1 + .002
    If h1 >= PI * 2 Then h1 = 0
    '-------------------------------------------------
    For t = 1 To p
        h2 = h1 + ((PI * 2) / p) * t
        x = Cos(h2) * h: y = Sin(h2) * h
        x2 = Cos(h2) * (h * 1.5): y2 = Sin(h2) * (h * 1.5)
        Line (xx, yy)-(xx + x, yy + y), c(2)
        Line (xx + x - 7, yy + y)-(xx + x + 7, yy + y), c(1)
        Line (xx + x, yy + y)-(xx + x, yy + y + 15), c(1)
        Line (xx + x - 7, yy + y + 15)-(xx + x + 7, yy + y + 25), c(1), B
        Locate 35 * ((yy + y2 + 50) / 600), 99 * ((xx + x2) / 800)
        If h2 >= PI * 2 Then h2 = h2 - PI * 2
        Print Using "#.##"; h2
    Next t
    _Display
Loop
Reply


Messages In This Thread
Radian Ferris Wheel - by james2464 - 11-11-2022, 11:58 PM
RE: Radian Ferris Wheel - by bplus - 11-12-2022, 01:12 AM
RE: Radian Ferris Wheel - by PhilOfPerth - 11-12-2022, 03:03 AM
RE: Radian Ferris Wheel - by james2464 - 11-12-2022, 03:48 AM
RE: Radian Ferris Wheel - by PhilOfPerth - 11-12-2022, 03:53 AM
RE: Radian Ferris Wheel - by james2464 - 11-12-2022, 03:59 AM
RE: Radian Ferris Wheel - by PhilOfPerth - 11-12-2022, 04:07 AM
RE: Radian Ferris Wheel - by bplus - 11-12-2022, 04:20 PM
RE: Radian Ferris Wheel - by PhilOfPerth - 11-13-2022, 01:29 AM
RE: Radian Ferris Wheel - by james2464 - 11-12-2022, 08:57 PM
RE: Radian Ferris Wheel - by bplus - 11-12-2022, 10:39 PM
RE: Radian Ferris Wheel - by james2464 - 11-12-2022, 11:36 PM
RE: Radian Ferris Wheel - by johannhowitzer - 11-16-2022, 03:49 AM
RE: Radian Ferris Wheel - by bplus - 11-16-2022, 05:33 AM
RE: Radian Ferris Wheel - by johannhowitzer - 11-16-2022, 08:25 AM



Users browsing this thread: 6 Guest(s)