Specifically, the stationary stars, and massless asteriods whooshing around the stars and leaving trails behind.
Thanks
Specifically, the stationary stars, and massless asteriods whooshing around the stars and leaving trails behind.
Thanks
Gravity equations aren’t that difficult, but I doubt Grasshopper is the right platform for you. It’s not designed as a simulation/animation package. Even with Kangaroo you’ll have issues I think since Kangaroo was designed for finding static solutions to problems, not evolving states over time.
So, which software do you recommend if not grasshopper?
Why not just use that gravity simulator you posted?
Cause it’s 2D and I want a 3D one. I also need to work further on the data and not just generate it. So, I need to make it myself.
This made by game engine Unity, you can use Blender or any other software and you must know scripting
Well seems the source code is available there, Unity is written in C#, so is Grasshopper, so shouldn’t be too bad to write your own.
This can be easily achieved with scripting (e.g. Python, C#). The main difficulty might be how to fine tune the particle system.
Imagine a system of particles that each have a certain velocity (vector), position (point) and mass (number). Each particle can thus represent a star, a planet, a comet, debris or whatever.
While running, the system iteratively evaluates separation, cohesion, gravity, etc. of each particle in relation to the other particles, and thus determines its movement (updates its velocity), which is nothing different than the sum of its previous position and its updated velocity.
David is right about Kangaroo 2 being mainly designed for finding static solutions.
The solver method in the old version was actually better at strict energy preservation like you need for calculating orbits.
I chose to go with a different solver in k2 because for the vast majority of applications I had in mind, stability and convergence to the minimal energy state was more important, so the solver reducing energy was actually a good thing, and even for dynamic simulations, some drag was usually wanted.
I’ll try and dig out some old gravity examples made with the old version, but I’m also going to have another look at whether there would be a way to include an option in the new version for an energy preserving integrator (even if it is less stable).
Omg, that video is amazing and is the closest thing I’ve come across to what I need. Could you tell me how you did that? Which force objects did you use, if any?
3body_k1.gh (11.0 KB)
another look at whether there would be a way to include an option in the new version for an energy preserving integrator (even if it is less stable).
Preserved Solver