Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sin cos using SUB SumLocate (x,y,l)
#3
Code: (Select All)
_Title "orbit demo 2 spiral out" ' bplus  2024-05-08
Screen _NewImage(800, 600, 32)

time = 3 ' due East degrees = 0
radius = 200
xo = _Width / 2
yo = _Height / 2
angle = 0
radius = 30
While radius < 400
    orbit xo, yo, radius, angle, x, y
    _PrintString (x, y), Str$(time)
    time = time + 1
    If time = 13 Then time = 1
    radius = radius + 5
    angle = angle + 30
    _Limit 5
Wend

Sub orbit (x0rigin, yOrigin, radius, degrees, xOut, yOut) ' all default single  should be ok
    xOut = x0rigin + radius * Cos(_D2R(degrees))
    yOut = yOrigin + radius * Sin(_D2R(degrees))
End Sub
b = b + ...
Reply


Messages In This Thread
sin cos using SUB SumLocate (x,y,l) - by pmackay - 05-08-2024, 06:53 AM
RE: sin cos using SUB SumLocate (x,y,l) - by bplus - 05-08-2024, 10:38 AM



Users browsing this thread: 16 Guest(s)