Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

modeling a cylinder rolling down a ramp

This topic is 5190 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey all... im very new to physics so i apologize in advance if i sound like a complete idiot. this is a 2d physics problem (i think) so im trying to model a cylinder rolling down a ramp in opengl. i want the cylinder to spin on its z axis and depending on the rate at which it is spinning ( i guess this is called angular velocity??) it should affect the rate at which it rolls down the ramp (the x axis)...as in real life i guess anyways i checked out this book call Physics for Game Developers by o''reiliy and it states some equations for this kinda problem: equation for acceleration: acceleration on x axis = m*g*sin(theta) - us*sin(theta) where m is mass of cylinder, g is gravity, theta is the angle of the ramp, and us is the friction constant. equation for angular velocity: w2 = (Ff*r/I)*t + w1 where w2 is new angular velocity, w1 is old angular velocity, t is time, Ff is the force of friction, r is radius, I is inertia. so if i plug both of these equations in....my opengl simulation looks okay...as in the distance the cylinder rolls down the ramp is consistant to the rate at which it spins..as far as my eyes can tell. but now that im thinking that the acceleration equation is a equation for an object "sliding" down a ramp..not rolling...for example, say a box. am i wrong...? any help would be much appreciated! also, the acceleration of on x axis was derived as follows: total sum of force = friction force - force of moving cylinder total sum of force = m*accleraion on x friction force = m*g*sin(theta)*us force of cylinder = m*g*sin(theta) plugging everything in will result in the equation above. thanks

Share this post

Link to post
Share on other sites
Well, you have two types of acceleration for rigid bodies: linear acceleration and angular acceleration (just like you have linear velocity and angular velocity)...

If you assumed that the cylinder does not slip at all while sliding down the ramp you would only have to consider the angular acceleration (to calculate that all you need is the moment of inertia of your cylinder, radius of the cylinder, the ramp angle and the gravity constant).

If you want to let your cylinder slip a little but also rotate then you'd also have to consider linear acceleration (you'll need the coefficient of friction, mass of the cylinder, ramp angle and gravity constant for that).

If you where just modelling a box that only slips and doesn't rotate then you can forget about angular acceleration and just worry about linear acceleration.

[edited by - SpaceDude on March 5, 2004 1:53:34 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!