Share via

N-body simulation

Anonymous
2018-03-10T23:39:40+00:00

Hi

I'm an very experienced programmer, and I ave build several n-body simulations in the past few years in Delphi, C# - working on GPU implementation

For a friend I am trying to setup an easy n-body simulation in Excel

I have a sun and several planets and I want to simulate them in timesteps of appr a week.

First I would like a numerical solution, with numerical output

Pressing F9 for each time step can get boring but is no real issue

Second I would like a neat visual result - but is by no means mandatory

Can you help me? Thanks!

Camiel

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

9 additional answers

Sort by: Most helpful
  1. Anonymous
    2018-03-11T17:04:21+00:00

    This is great. My job is almost done already.

    Thanks a lot.

    Do you also have a SPH sample - specifically, of star formation

    So I can play before I'm gonna build this into my c# solution?

    Camiel

    Was this answer helpful?

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2018-03-11T15:28:26+00:00

    Can you give me a small code sample? To get me up to speed?

    Thanks, Camiel

    Was this answer helpful?

    0 comments No comments
  4. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2018-03-11T13:39:31+00:00

    Hey, that's interesting, astrophysics is my hobby. :-)

    In high-level languages, you can create resp. output the graphic yourself, but in Excel you have to use what the application supports.

    If suggest to use 3D Bubble chart (and/or combined with an XY-Chart), sample:

    All you have to do is to write the new XY positions into the cells, then call DoEvents and let the chart update, the animation is done.

    Instead of a fixed color we can also use a picture an show the shape of a planet, see Earth.

    You can scale the axis to implement a zoom/move feature.

    BTW, do you have source code to calculate when a Jupiter moon casts a shadow on its surface?

    As shown here: http://www.shallowsky.com/jupiter/

    Andreas.

    Was this answer helpful?

    0 comments No comments