Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Radian Ferris Wheel
#7
(11-12-2022, 03:59 AM)james2464 Wrote:
(11-12-2022, 03:53 AM)PhilOfPerth Wrote:
(11-12-2022, 03:48 AM)james2464 Wrote: Sorry, I should have explained a bit.  Radians have been a bit confusing to me, and I found out recently that you can just take 2 * PI (6.28) and just consider that to be the same as 360 degrees.  But it can still get confusing, especially when QB64 is capable of using higher numbers like 9.50 and it works just fine.  Sort of like 1000 degrees I suppose.  Then there are negative radians as well.  So anyway I wanted to visualize the full radian circle and animate it, so this was the result.

The program uses _atan2 and _hypot to calculate the line endpoints.  But the interesting part to me is that only one line is calculated that way.  The rest are just that initial radian value + whatever the interval is.  Then it uses sin and cos to find the line endpoints, using the new radian.

No need to be sorry James. It made me look a bit closer than I may have done if you explained it all. Great job!
(I had fun  fiddling with it a bit. Couldn't find a speed setting, so I guess that's just a function of the code loops etc.)

Oh you can adjust line 27 (h1 = h1 + .002) if you want to change the speed.   Something like .050 would be pretty fast.
Thanks James.
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)?
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


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: 2 Guest(s)