Radian Ferris Wheel
#6
(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.
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: 9 Guest(s)