Computing Rotation Speed In C++ [closed]
Basically, In C++, how do I compute how long will it take for a car wheel to rotate 360 degrees while moving at a speed of 1开发者_如何学Python0 MPH? I've tried googling but nothing showed up. Any ideas?
As usual, I've searched this site for an answer but nothing showed up - unless I missed one.
Thanks.
If you know the speed of your object and the radius of the circle it moves on, then the time needed for one rotation is
rotation_time = 2*pi*radius/speed
The number of rotations per time unit is
rotation_speed = 1/rotation_time
The angular speed is
angular_speed = full_circle/rotation_time,
with the value of full_circle
depending on your angular unit, e.g. 360 or 2*pi.
精彩评论