Orbital Movements (Updated)

Hello,

I saw this animation online and wanted to try and replicate the movement in GH - (at least get close).
It appears a point emitter is used but then the circles transitions to orbital movements.

I have attempted it (attached below) but could do with some help on:

  1. Randomness of the orbits size
  2. Randomness of the plane orientation
  3. Points moving along the orbital path, preferably at different speeds; but I think the size of the orbital path will dictate speed.
    3a. Is it possible to have the point emit and transition to an orbital trajectory?

Any help in improving this would be greatly appreciated and I look forward to studying the solutions.

many thanks.

orbits.gh (19.0 KB)

Interesting! :star_struck:

So, thinking of a virtual sun-like “central mass”, the initial idea is to build up ellipses (orbits) already in the correct place!
Instead of creating random ellipses and then aligning it to the sun (a mess), with the focus-focus-point method we are sure the orbit to be exact!
Rhino’s “Ellipse: from foci” is missing on grasshopper, so i made it with c#, it retrieve also Plane, R1, R2 and e (eccentricity).


orbits_re.gh (123.2 KB)

Correct! Kepler’s laws help us there.

Then, the “usual problem” (saying so after 15 min research on the www) is foreseeing correctly the position of an elliptically orbiting object given a starting position and a time interval.
It would require complex math (for me) and maybe heavy calculations that would slow down the animation. Maybe i’m totally wrong here.

So, i’ve mapped every possible ellipse in a 3d surface, internalized it weight about 100kB (inside the method used to build that up, disabled).
Making a fast intersection on a 3d-data is surely fast enough to let us appreciate a realtime smooth animation.

Long story short:
orbits

And this is what is happening behind the scenes:
orbits_WTF

6 Likes

Wow! This is fantastic, thank you Riccardo.

This is great. I like how it is in constant motion, but how would you go about animating a slider to export as a short movie clip?

Instead of the “Timer + counter” block , use a simple slider, set proper values (let it have enough decimals), and right-click > animate.

1 Like

Thank you! There is a lot to learn from this definition, and I am grateful for your time.

Hello @FordEarl,

You can also simulate this Kangaroo. I’m actually struggling to recreate this using K2 for some reason - I’ve never modelled particle systems using K2 before, but Kangaroo1 still works fine and quicker than writing my own code! Essentially it’s just an inverse square law attraction with an initial velocity.

particles3D.gh (19.3 KB)

Obviously a different way of going about things, not sure if it’s any better but fun to try.

John.

5 Likes

Very nice! Thank you for sharing this John, this is another definition with a lot to learn from. Very much appreciated.

Thanks John.
You’re right that this is one thing that is still easier with the old solver. I wrote a bit about this here:

Also - I made a small modification to your definition - the exponent for the attraction needs to be negative 2. With this changed it gives closed elliptical orbits:
particles3D_2.gh (17.3 KB)

10 Likes

oops, good spot Daniel thanks!

Indeed, simulating dynamics in Grasshopper seems a bit too niche compared the many advantages of finding fast ways to minimise energy!

In a strange twisted way, I do miss the blow ups though - it reminded me that the universe has a very small timestep… maybe even Planck time :wink:

@FordEarl you should consider changing the solution to the kangaroo’s one. It’s definitively simpler.
I made my solution thinking it was strictly needed to work with elliptical curves as input, though you never actually said it. Sometime i have subconscious “horse blinders”…

I like them both :smile: different approaches to solving the problem provide opportunities for deeper learning and understanding.

1 Like