Hello, I am new to this forum - and impressed with the posts. I have recently developed an addiction to astrophysics. I wish to do the following:(adsbygoogle = window.adsbygoogle || []).push({});

- define a spherical "sandbox" with a radius of let's say 1, which I think of as "universe"

- within that sphere I generate N number of points. Each point have the following attributes:

1) a coordinate: p(x, y, z)

2) a velocity: v(x, y, z)

3) a mass

- define time as t

Then, kick-off a program (that I'm hoping to write) which will represent all the points (stars) as I move to t+1, t+2 etc... Many points should collide, others turn into orbits, others will fly outside my "universe". I wish my model to be "accurate" according to gravity fields of each star.

Can anyone share with me how I could go about achieve this goal ? (let's start with 3 stars)

In advance, thank you.

Regards, Dan.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Motion of randomly generated stars

**Physics Forums | Science Articles, Homework Help, Discussion**