Math's Trig Versus Basic's Trig Functions
#29
Here it is as simply stated as I can make it.

As angle increases, the points around a center point plot clockwise down from 3 o'clock to 6 o'clock and around to 9 o'clock then 12 o'clock and then back to 3 o'clock.

Code: (Select All)
_Title "... press any key to plot next point"
Screen _NewImage(800, 600, 32)
Print "Plot points around the center point according to Basic Cos(angle), Sin(angle)"
For angle = 0 To 2 * _Pi - .01 Step _Pi(2 / 36) ' <  these are 10 degree increments starting at 0
    x = 400 + 200 * Cos(angle)
    y = 300 + 200 * Sin(angle)
    _PrintString (x, y), Str$(Int(_R2D(angle) + .5)) ' <  this rounds radians to closest Degree
    Sleep
Next

I am not doing any Cartesian conversions, I am simply plotting points around a given one in a Basic graphics screen.

Notice the points go Clockwise around from the starting point 0 degrees or radians to full circle (2*Pi).
b = b + ...
Reply


Messages In This Thread
RE: Math's Trig Versus Basic's Trig Functions - by bplus - 10-04-2022, 06:48 PM



Users browsing this thread: 9 Guest(s)