I try to simulate a solar system with planets (with random mass) placed randomly around a sun with a mass $X \times \text{solar mass}$.
The simulation is going well when I use real data (sun,earth,moon for instance), but now I'd like to simulate randomly generated system.
My problem is that I didn't succeed in calculating linear velocity of planet.
On internet, I only found formulas to calculate linear velocity when we know the angular velocity, this mean knowing the time the planet make to do a revolution , which I don't want to determine.
I want, knowing only the distance and the two mass (and direction of velocity vector), be able to calculate the linear velocity vector.
I don't really have more information to provide, if you need something, just ask for it.