top of page

Simulate Three-Body problem with Expressions

This is a fun little project I worked on a while ago, With given Startframe, mass and velocity for the objects. this can simulate a 2d version of the Three-Body problem in a proximation fashion.

I didn't even know it would work before I start.

First, I made an "Orbit" tool with simple expressions that using the information from the last frame to calculate the next frame, the limitation is the subject that gets surrounded by won't more. (available in Nukepedia)

Then I combined 3 of the Orbit tool together to make this Three-Body tool, the limitation is still pretty obvious but it gets most of the job done and it looks interesting!

The limitations:

  1. The calculation base on the information from the last frame, so there is no subframe calculation. When the objects get really close, the error within that subframe is big enough that it breaks the simulation and slingshot the object out.

  2. There is no cache button. When every u change something, its gonna try to simulate the whole frame range. So expect some freezing but it won't crash. My suggestion is to imaging it and changes with no viewer in the comp. and then view it.

  3. it breaks in the middle of the frame range sometime. my workaround is when I get something I like but it breaks, I change the frame range in the project setting to be longer and it will stop breaking or break in a later frame :D

This project shows that u can do a lot of fun stuff with just expressions and no hardcore coding :DD

install: copy and paste into nuke




bottom of page