Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Radian Ferris Wheel
#11
Thanks. I was reading the game tutorial, this part specifically: https://www.qb64tutorial.com/lesson19
Reply
#12
(11-12-2022, 04:20 PM)bplus Wrote:
Quote:I had a go a while back at explaining what pi was, using a "circular" shape with increasing numbers of arcs, from 3 to 1000, and summing the lengths of the arcs until they reached 6.28... but I eventually gave up (temporarily?).

Maybe someone cleverer than me will do this (hint, hint)?


Pi is a ratio of the diameter of a circle to the circumference of a circle: d * Pi = circumference
since radius is 1/2 diameter 2 * r * Pi = circumference

If radius is 1, a unit circle they call it, the radian measure = the circumference of the arc
A unit circle (360 degrees) has  2 *Pi circumference ( 2 * 1 * Pi)
Half a unit circle (180 degrees) has Pi circumference (2 * Pi * 1/2)
1/4 unit circle (90 degrees) has Pi/2 circumference as is Pi/2 radians ( 2 * Pi * 1/4)

so 1/n unit circle is 2 * Pi * 1/n radians.
Thanks bplus. You've encouraged me to "have another go".
I sorta knew most of that, but hadn't quite worked out how to apply which bits for my prog. You cleared the cloud a little.  Smile
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#13
You can put this function around any angle in radians, and it will simplify it to be at least zero, and less than 2pi.

function simplify_angle(a)
threesixty = 8 * atn(1)
x = -a / threesixty
if x <> int(x) then x = x + 1
simplify_angle = a + (int(x) * threesixty)
end function
Reply
#14
Welcome @johannhowitzer

Weren't you at old forum?
b = b + ...
Reply
#15
Yes, I'm the same person. I lurk quietly, checking out programs here and there, mostly grinding away at my own big project and frequently referring to the wiki.
Reply




Users browsing this thread: 6 Guest(s)