- #1
walter
- 4
- 0
I would like to start a fun project to create a vb6 program to create a orbit simulator.
Is there anybody that's done this that could give me some tips?
Is there anybody that's done this that could give me some tips?
walter said:I would like to start a fun project to create a vb6 program to create a orbit simulator.
Is there anybody that's done this that could give me some tips?
enigma said:Unless you go with either an extremely small timeslice or only a few orbits, there is a chance that using the Euler method (described by marcus) will not give you a closed orbit. Errors in the timestep cause the orbits to fall outwards. You may need to implement a runge-kutta method for long duration simulations.
walter said:I'm willing to start with a 2d model, but I was thinking about planetary orbits.
I guess I can start with the Sun & Earth.
Sorry for pulling up such an old thread, but I've only been a member of this facinating forum for about 2 weeks. But I did exactly what you described. I wrote an orbit simulator in VB 6.0. You can download it here: www.gravitysimulator.comwalter said:I would like to start a fun project to create a vb6 program to create a orbit simulator.
Is there anybody that's done this that could give me some tips?
Actually, the first order Euler method works remarkably well. With a timestep as large as 16767 seconds per time step, the solar system holds together for over a million years. Probably more, as I ended the simulation at 1 million years because it took my computer a month to do. I can speed this up to 65536 if I remove moons from the solar system. Faster than that causes Mercury to deviate from its orbit.enigma said:Unless you go with either an extremely small timeslice or only a few orbits, there is a chance that using the Euler method (described by marcus) will not give you a closed orbit. Errors in the timestep cause the orbits to fall outwards. You may need to implement a runge-kutta method for long duration simulations.