Might need some help with the physics. I might be wrong with the formulas I used. So far it does exactly what my turntables do in real life. If I'm wrong, let me know. The formulas are located in my Game_Loop sub where it says this:
VB Code:
If Turntable_State > Turntable_On Then
If Turntable_State = Turntable_On + Turntable_Start Then
I = I + (VINYL_MASS * VINYL_RADIUS ^ 2)
If I >= Pitch Then I = Pitch
ElseIf Turntable_State = Turntable_On + Turntable_Stop Then
I = I - (VINYL_MASS * VINYL_RADIUS ^ 2)
If I <= 0 Then I = 0
End If
Else
If I > 0 Then I = I - VINYL_DIAMETER
If I <= 0 Then I = 0
End If
And in this line is where I add the time based rotation:
VB Code:
Rotation = Rotation + (Time * I)
Here's the project. If there are any problems with the physics, please let me know. Here are the controls:
Space: Turns the Power On
Enter: Turns the Power Off
A: Starts the Turntable when the Power is On
Z: Stops the Turntable when the Power is On
Numpad: Controls Camera
Up/Down Arrow Keys: Controls RPM
Last edited by NoteMe; May 10th, 2005 at 06:32 AM.
I have a little problem with your Physics
You have
Code:
Rotation = Rotation + (Time * I)
Code:
I = I + (VINYL_MASS * VINYL_RADIUS ^ 2)
where is your torque?
Equation of motion should be
Code:
Rotation = Rotation + V*time+.5*A*t^2
where Rotation is in radians not degrees
V is your current angular velocity in radians per second
A is your angular acceleration in radians/second/second
Code:
V = V + A*Time
Code:
A = 2*torque/((PLATTER_MASS+VINYL_MASS)*VINYL_RADIUS^2)
Put your mass in Kg
torque will be in units of Newton*meter = (Kg m^2 / s^2)
It's converted to radians in the area where it rotates. If you can, you could modify my physics and reupload my project. The torque by the way on my turntables is more than 1 kgf-cm (10 newtons). I already modified my prog with this but had trouble.
Last edited by Jacob Roman; May 11th, 2005 at 09:07 PM.
It's converted to radians in the area where it rotates
I saw that, it's wrong.
The equations already give the answer in radians so you shouldn't convert it again.
One assumption you'll have to make is how the motor is going to operate.
If the motor just supplies a constant torque, then the platter will continue to accelerate forever until it spins off into space.
What you can assume is that the motor supplies its maximum torque until it reaches the desired speed, then supplies just enough to equal to frictional torque which is in the opposite direction so that when at operational speed, no net torque is being supplied.
If the motor is turned off, then the platter is slowed by the frictional torque.