Jump to content
  • Advertisement
Sign in to follow this  

My Grav sim is ready for you to test... if you want :)

This topic is 4748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This program calculates the force of gravity between a user defined number of bodies with user defined: mass, radius, position, and inital velocity. There is a config file to define these things with a relatively clear instruction file. There is still some bugs in the zoom function. I have made a default sim config file for your viewing pleasure, feel free to change it and play around all you want. If you get an error creating the direct 3d device, make sure that the resolution is set to something your monitor can handle. That can be done through the config file. This is my first graphics program so be gentle on me. and be sure to read the instructions file before running it. and dont be scared to move the screen aroung with the arrow keys or zoom in or out with page up and down. well thats it give it a try if you would like and give feedback. I am gonig to make a good gui and convert to 3d eventually. click me to download thanks

Share this post


Link to post
Share on other sites
Advertisement
Awesome! I love it :)
I think it would be cool if when a body collides with another it should be absorbed by the larger mass and the resulting momentum of the larger mass gets recalculated.
Good work.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sailorstick
Awesome! I love it :)
I think it would be cool if when a body collides with another it should be absorbed by the larger mass and the resulting momentum of the larger mass gets recalculated.
Good work.


That will happen after the one bodie is at rest on another bodie. Like when a smaller one is bouncing around the larger one, after a while when it has lost enuogh kinetic energy it gets merged into the large mass bodie. right now I take out like .5% of the total momentum transferd for any given collision.

maybe Ill make a choice in the gui for the type of collisions, elastic perfectly inelastic or just inelastic. I will make it user defined for how much energy is lost in a collision as well. because even though it is not realistic to see gigantic superballs bouncing around in space, it looks pretty cool.

Share this post


Link to post
Share on other sites
Yeh cool... maybe have it so that you can move the large body mass independantly and so the properties or the other particles will change?

Also your gravSimOut.txt file is dumping mass amounts of info.... after just a minute of watching the sim its up to 200mb :o:o

Share this post


Link to post
Share on other sites
when i ran it, i got Error creating direct3d device... :(

Edit: nevermind i just read the post up above :P ill edit again after i run it

Edit: nice :D i tryed making somthing like this once, but it didnt work out. good job! :D (somthing id like to see, is have like lots of tiny planets everywere and have them all form into one big one :P but im to lazy to change the file :) haha )

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!