stw7651

04-30-2010, 11:38 PM

The code I am trying to write is simple but complex. I have a beam on a surface on the left and the right side extends out where the top is held by a spring.

I have all the formulas down, there just one problem that i can't find any other method to do. You need the spring equilibrium and the spring distance from equilibrium. I have the beam rotating on the correct pivot point, but if I just use glRotatef, I don't know the coordinates when it is rotating, which I need to know where the spring is at on the right side.

I figure theres a way where I can adjust the coordinates of the beam myself without using glRotatef, but I have no idea how.

Any help or suggestions would be greatly appreciated.

I have all the formulas down, there just one problem that i can't find any other method to do. You need the spring equilibrium and the spring distance from equilibrium. I have the beam rotating on the correct pivot point, but if I just use glRotatef, I don't know the coordinates when it is rotating, which I need to know where the spring is at on the right side.

I figure theres a way where I can adjust the coordinates of the beam myself without using glRotatef, but I have no idea how.

Any help or suggestions would be greatly appreciated.