The online racing simulator
Multi-body simulation
(7 posts, started )
Multi-body simulation
I imagine Bob Smith would be the best to ask, but I've thrown it open to the forum instead of a PM.

I've decided to try and teach myself multi-body simulation. I know my c++ skills are up to scratch and my vector algebra too, but I'm having real trouble finding any resources to get me started. Pretty much everything I find is just tutorials on basic vector addition and substraction.

The problem that I'm trying to work out is how to model several moving parts that are joined and so apply contsraints to the other parts' movements, for example (but by no means limited to) a car's suspension.

I imagine each part is modelled as a vector, simply representing the distance and direction between pivots. I can't work out how to describe the position of one part given the position of one or more other parts it's joined to. I've spent all day trying to derive it from scratch but can't *quite* get my head round it - I know for sure that if I see it all derived for me I'll understand it and be able to go from there.


Are there any online papers or a good book (not neccesarily aimed at coders, but this would be ideal) I could get?
#2 - Vain
Are you struggling with the implementation of the kinematic equations of your problem or are you having troubles getting the equations together properly?
And just in case you never looked at it like above here's a bit of advice that took me about 3 years to work out: Always try to seperate the mathematics/physics problem from the programming problem. Never open your IDE before you know exactly which equations you want to implement.

Vain
Quote from Vain :
And just in case you never looked at it like above here's a bit of advice that took me about 3 years to work out: Always try to seperate the mathematics/physics problem from the programming problem. Never open your IDE before you know exactly which equations you want to implement.

Vain

Oh yes, this is all doodles and equations on a bit of paper at the moment, I've not touched any kind of implementaion. It's getting the equations together in the first place I'm having trouble with.

This is what I've been trying today. Think of a 2D representation of a car's suspension.It can be described by 4 vectors:




When the suspension moves up, you know A as it's the fixed side of the car and say you know B, you then get a 5th vector, E for which you know the magnitude and direction.

What I've been trying and failing to work out is how to work out the positions of C and D given their fixed lengths and fixed pivot positions.



There's two possible positions they could be in (although only one makes any sense) so I'm guessing it involves solving a quadratic at some point.
I have a load of equations that I can derive, involving the components, but I always end up with two unknowns, no matter how I substitute things about.
#4 - w126
Quote from Crashgate3 :I know my c++ skills are up to scratch and my vector algebra too

im not sure i agree

anyway just set up circle equations for every point thats constrained by several vectors put them all into each other shake the mix vigorously and you should get a closed form solution
Quote from w126 :maybe you should consider playing with existing libraries like Bullet, ODE, PhysX or Havok first.

No, I want to do things myself, otherwise it just ends up as 'magic tricks' instead of finding out how it does what it does.
Quote from Shotglass :im not sure i agree

Any particular one, or both?

Quote from Shotglass :anyway just set up circle euqations for every point thats contrained by several vectors

That's got it, I was trying to mess about with components before. Now I can see it's just seeing where two circles on a line intersect.

Multi-body simulation
(7 posts, started )
FGED GREDG RDFGDR GSFDG