Anemometer Wind Gauge
#4
I just spiffed it up by using the exact radians needed to make each one exactly even with each other rather than guessing like I was before. I like to Google "radians photos" to get a good chart to look at. Smile 

[Image: Ken-s-Anemometer-App.jpg]



Code: (Select All)
_Title "Anemometer Wind Gauge by SierraKen - Use Mouse Wheel"
Screen _NewImage(800, 600, 32)
start:
t = (_Pi / 2) * 100
t2 = ((11 * _Pi) / 6) * 100
t3 = ((7 * _Pi) / 6) * 100
cc = 200

Do
    _Limit 30
    While _MouseInput: wheel = wheel + _MouseWheel: Wend
    If wheel > 10 Then wheel = 10
    If wheel < -10 Then wheel = -10
    If t2 < 0 Then GoTo start:
    x = (Sin(t) * 20) * (_Pi * 2) + 400
    y = (Cos(t) * 10) * (_Pi / 2) + 200
    r = (Cos(t) * 180) / _Pi / 1.5 + 50
    t = t - (.25 + wheel / 10)
    x2 = (Sin(t2) * 20) * (_Pi * 2) + 400
    y2 = (Cos(t2) * 10) * (_Pi / 2) + 200
    r2 = (Cos(t2) * 180) / _Pi / 1.5 + 50
    t2 = t2 - (.25 + wheel / 10)
    x3 = (Sin(t3) * 20) * (_Pi * 2) + 400
    y3 = (Cos(t3) * 10) * (_Pi / 2) + 200
    r3 = (Cos(t3) * 180) / _Pi / 1.5 + 50
    t3 = t3 - (.25 + wheel / 10)
    For S = .25 To r Step .1
        cc = cc - .25
        Circle (x, y), S, _RGB32(cc, cc, 100 + cc)
    Next S
    cc = 200
    For S = .25 To r2 Step .1
        cc = cc - .25
        Circle (x2, y2), S, _RGB32(cc, 100 + cc, cc)
    Next S
    cc = 200
    For S = .25 To r3 Step .1
        cc = cc - .25
        Circle (x3, y3), S, _RGB32(100 + cc, cc, cc)
    Next S
    cc = 200
    Line (400, 200)-(x, y), _RGB32(255, 255, 255)
    Line (400, 200)-(x2, y2), _RGB32(255, 255, 255)
    Line (400, 200)-(x3, y3), _RGB32(255, 255, 255)
    cc2 = 100
    For sz = .1 To 100 Step .25
        cc2 = cc2 - .25
        Circle (400, 450), sz, _RGB32(100 + cc2, 100 + cc2, cc2), , , .5
    Next sz
    Line (400, 200)-(400, 450), _RGB32(255, 255, 255)
    _Display
    Cls
Loop Until InKey$ = Chr$(27)
Reply


Messages In This Thread
Anemometer Wind Gauge - by SierraKen - 08-20-2022, 06:28 PM
RE: Anemometer Wind Gauge - by SierraKen - 08-20-2022, 06:37 PM
RE: Anemometer Wind Gauge - by SierraKen - 08-20-2022, 06:53 PM
RE: Anemometer Wind Gauge - by SierraKen - 08-20-2022, 09:25 PM



Users browsing this thread: 5 Guest(s)