Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Two Body Planetary Motion SDL
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
tristanbryce7




PostPosted: Wed Dec 18, 2013 10:21 am   Post subject: Two Body Planetary Motion SDL

I use a GNU GCC Compiler.
Ok so, I'm using SDL 1.2 as the graphics library.
What a basic idea in my mind is that I have a Star in the middle (the user can change the mass), and then the user can produce a planet anywhere on the screen, and the
project. I know there are probably many projects of this online, but I wanted to start fresh. Also most of them are in Allegro, and I have to have to use SDL.

Assuming there are only the 2 bodies I mentioned, and I use SDL. I just wanted a basic idea of the mathematics behind the code. I looked online and I Found a lot of formulas.
I also looked at a few different codes but couldn't really tell what either did due to lack of commenting.

Can anyone guide me in the right direction of the mathematics of this and how to get it into SDL. I just need to know where to get started and then I think i can finsish it off on my own.

For what I have in mind, what Formulas would I need in order to create a decent two body simulation.

I was told by my teacher that if I wanted to do a 3 body, I would need to implement Kunge Rutta method. Is there any way to do this planetary simultion w/o using differential equations?

Any help would be really appreciated
Sponsor
Sponsor
Sponsor
sponsor
apython1992




PostPosted: Wed Feb 12, 2014 10:37 pm   Post subject: RE:Two Body Planetary Motion SDL

So yeah, this is a few months late, but in case you're still interested you *need* to use differential equations to simulate the 3 body problem. If you'd like and are still interested, I can guide you through the math and how to tie it in with SDL.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: