Saving at every time step

What did you draw?
Post Reply
lucias
Posts: 2
Joined: Sat Mar 02, 2019 4:27 am

Saving at every time step

Post by lucias » Sat Mar 02, 2019 6:09 am

I recently found Gravity Simulator and immediately shared it with my friends. What a great app! I love this kind of fusion of art and science.

Can I save the position of each planet at every time step?
I've been interested in producing art from science, and now I'm interested in the chaotic behavior of an N-body system. If I can save the position of each planet at every time step, I can convert the data into chaotic music and soundtrack the motion of the planets with it, for example.
Of course, there are MATLAB and other softwares for such calculations, but I'm not familiar with them. After all, I like the simplicity of Gravity Simulator.

User avatar
testtubegames
Site Admin
Posts: 1072
Joined: Mon Nov 19, 2012 7:54 pm

Re: Saving at every time step

Post by testtubegames » Mon Mar 11, 2019 3:59 pm

I love the idea -- I can't pull the name of the project, but I remember seeing some cool toys online for building music out of moving particles. Forget whether it had gravity wells, or the motion was different.

But, yes, the frequencies with all the objects orbiting can make for some interesting stuff.

I'm trying to think if there's an easy way to export the positions of the objects. I'm not sure if I'd have time to implement it at the moment, but just in case I have time, what type of data were you looking for? Since, this could be quite the barrage of numbers you'd be getting.

lucias
Posts: 2
Joined: Sat Mar 02, 2019 4:27 am

Re: Saving at every time step

Post by lucias » Thu Mar 14, 2019 9:59 pm

Thank you for loving the idea!
CSV is the best data format for me. I just need the position and velocity of each planet. (Still, the data will be huge....)

Actually, I already acquired the necessary data. With MurGaa recorder for Mac, I recorded the motion of the cursor which advances time a little bit and saves the current planets, and then repeated the motion five hundred times. However, the repeating often failed and I had much trouble fixing the errors, so it would be great if you implement the feature.
I sent the data to my colleague who is good at sound programming (but not at physics), and before long he will convert the data into music. I'll post here when the music is available somewhere online!

User avatar
testtubegames
Site Admin
Posts: 1072
Joined: Mon Nov 19, 2012 7:54 pm

Re: Saving at every time step

Post by testtubegames » Mon Mar 25, 2019 11:17 am

lucias wrote:
Thu Mar 14, 2019 9:59 pm
I'll post here when the music is available somewhere online!
Excellent! I look forward to hearing it!

Post Reply