Answered by:
How do i get this angle??
Question

hi.
i have just coded a 360° spring with litdevs formula. QSV762
the only problem i have now is: How do i get the angle, so i you can rotate the spring to "look" thowards the axis??
i hope someone can help me here...
Live for nothing, OR CODE FOR SOMETHING!
Answers

Not absolutely certain what you want, but try:
Shapes.Rotate(Spring,theta*180/Math.Pi90)
Note that we have to convert from radians to degrees and there is a 90deg offset between the calculated theta (X axis is theta = 0) and that used by Rotate (Y axis is 0 degrees). Marked as answer by Dudeson Friday, November 27, 2009 8:27 PM
All replies

Not absolutely certain what you want, but try:
Shapes.Rotate(Spring,theta*180/Math.Pi90)
Note that we have to convert from radians to degrees and there is a 90deg offset between the calculated theta (X axis is theta = 0) and that used by Rotate (Y axis is 0 degrees). Marked as answer by Dudeson Friday, November 27, 2009 8:27 PM

exactly! thx so much!
updated code: RBL234
btw, is this actually the way you code springs? i mean: speed = relative to distance like i did here?
could you maybe also help with this thread: http://social.msdn.microsoft.com/Forums/enUS/smallbasic/thread/b8b52fe3d0ae4aed905b9970094d638f ?
Live for nothing, OR CODE FOR SOMETHING! 
A spring uses Hooke's law: restoring force (acceleration) is proportional to extension (distance from equilibrium position).
You have:
Spring_Speed = (Spring_Speed*0.8)(200  Spring_Distance_To_Axis)*0.2
So the change in spring speed (acceleration) is proportional to extension (distance from spring centre '200').
Your spring moves like a spring because the equations are reasonable  also the car looks good  the vertical window size was a bit big for my display so I had to raise the ground to see the action. 