Regarding vectors: this guy 'Phyces' made a few tutorials and he included a really useful 2D vector class. vec2d class - you could use it to define your position and velocity of each element, and use its rotate() method. Bear in mind that when you blit the image you'll need to convert the position back to a tuple using the inttup() method. If you do use it, it can't hurt to do Phyces video tutorials, they're dead short and really clear - they helped me loads. He also shows you how to do rotated images.
Hope that Helps.
Also... with the two tracks: your velocity at each track is v = w/r (where w is the rotational velocity, r is the distance to the centre of the body) and the rotational velocity of the whole body will be w1 + w2 = wT.
Bear in mind that if they are both facing forward, w1 will be opposite to w2 and if they are equal magnitude wT = 0. So:
- Calculate the rotational velocity at each track
- Add them together
- Increment your body angle (rotation) by the total rotational velocity
- Reset you track velocities so that they stay tangential
Something like this:
rotational_velocity = (v1.length/r - v2.length/r)*(180/pi) //to get into degrees from radians,
also this will only work if the tracks can't go backwards, otherwise you'll need to use a sine function.
current_angle = current_angle + rotational_velocity // this is the tanks angle
v1.rotate(current_angle) // make it all tangential again
When you press the button to make a track go you may do something like this:
v1.length = 10
v1.angle = current_angle // assuming you use the vec2d class
Again, I hope that helps.