Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / physics....

Author
Message
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 12th Nov 2002 07:22
hi all, i have a ball that rolls only left and right, 3 units in diameter, and i have the distance traveled stored in distance#, how do i find how much to rotate it with the info given. Thanks
Marc Fleury
21
Years of Service
User Offline
Joined: 1st Oct 2002
Location:
Posted: 12th Nov 2002 08:05
The circumference of the ball would be pi*r^2. r is half the diameter, which gives us a circumference of (3.14)*(1.5)*(1.5) = 7.065 units. If distance# equals that number, than the ball has rotated 360 degrees. If you're doing frequent checks of distance#, it will presumably be less than 7 most of the time, so just divide distance# by 7.065, and multiply the answer by 360 to get the degrees of rotation.

Learn DB here -- http://www.dbheaven.com/ -- Learn DB here
Marc Fleury
21
Years of Service
User Offline
Joined: 1st Oct 2002
Location:
Posted: 12th Nov 2002 08:05
I should also mention that I'm tired, so I advise that you check my math!

Learn DB here -- http://www.dbheaven.com/ -- Learn DB here
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 12th Nov 2002 09:27
math seems sound to me

Anata aru kowagaru no watashi!
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 12th Nov 2002 11:03
thanx
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 12th Nov 2002 12:07
worked beautifully
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 12th Nov 2002 23:21
Interesting that it worked, seeing as the circumference of a circle is 2*pi*r. Pi*r^2 is the area of a circle. Either that or I just failed A-level maths big time.
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 13th Nov 2002 08:33
ah u r right, it seems to rotate a little more accurately, its kinda hard to tell, but i think u r right

Login to post a reply

Server time is: 2024-03-29 07:39:40
Your offset time is: 2024-03-29 07:39:40