✨ rudimentary simulation of the three-body problem

Overview

✨ three_body

a very rudimentary simulation of the three-body problem. i was curious how far we could get with just euler's method and a small time step, and it turns out we can get something pretty visually interesting!

three body problem gif

three body problem image

i was also curious about what would happen if the polar coordinates of the bodies over time were translated into rgb values and animated; the results are below.

warning: some of the transitions from this orbit are pretty abrupt, so there may be flashing colors.

three body problem color gif

sources

the starting positions for the graphics above are for periodic orbit F10 from this paper: https://arxiv.org/abs/1805.07980

This is what F10 looks like when solved with ODE solver dop853 (according to the paper):

F10 from the paper

as you can see, although the overall shape is similar/recognizeable, the error in the calculations above grow fairly noticeable after just 2 periods.

You might also like...
Help Skelly to find bones, combine them to build his body back
Help Skelly to find bones, combine them to build his body back

Bones Collector Help Skelly to find bones, combine them to build his body back! Game made for the bevy Jam#2. Play it here in your browser: itch.io! R

Dancing Links (“dlx”) solver for the exact cover problem, written in Rust. Can be used to create a sudoku solver.

Dancing Links “dlx” Dancing Links solver for “algorithm X” by Knuth This solver solves the exact cover problem using “algorithm X”, implemented using

Implementation of Yao's Millionare problem in Rust
Implementation of Yao's Millionare problem in Rust

Yao's Millionaire Problem Two millionaires wish to know who is richer; however, they do not want to find out inadvertently any additional information

A patch to fix tracing LocalTime problem.

tracing-local-time A patch to fix tracing LocalTime problem. Tracing-subscriber now has a bug in LocalTime, so build ourselves' to fix it. In this pat

Red-blue graph problem solver - Rust implementation
Red-blue graph problem solver - Rust implementation

Red-blue graph problem solver - Rust implementation The problem is the following: In a directed graph, each node is colored either red or blue. Furthe

The solutions for Leetcode's problem

Leetcode The solutions for Leetcode's problem # Ttitle Solution Diffculty 1 Two Sum Rust, TypeScript Easy 5 Longest Palindromic Substring Rust, TypeSc

Proof-of-concept on how to solve Bitcoin's light node sync problem with zkSNARKs
Proof-of-concept on how to solve Bitcoin's light node sync problem with zkSNARKs

BTC Warp Prove and verify the longest Bitcoin PoW chain BTC Warp is a proof-of-concept system that aims to solve the client-syncing problem for Bitcoi

Benchmarking C, Python, and Rust on the "sp" problem

Fast SP Various implementations of the problem in this blog post. Requirements To run this, you will need Rust Nightly and Python 3.8+ with numpy. Rus

A work-in-progress, open-source, multi-player city simulation game.
A work-in-progress, open-source, multi-player city simulation game.

Citybound is a city building game with a focus on realism, collaborative planning and simulation of microscopic details. It is independently developed

Network simulation in Rust

netsim - A Rust library for network simulation and testing (currently linux-only). netsim is a crate for simulating networks for the sake of testing n

A traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers.
A traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers.

A/B Street Ever been stuck in traffic on a bus, wondering why is there legal street parking instead of a dedicated bus lane? A/B Street is a game expl

Simulation tools for animating interacting soft objects

Softy Simulation tools and libraries for animating rigid and soft objects (including cloth) subject to frictional contacts against smooth implicit sur

This is a Rust implementation of a boid flocking simulation using the ggez graphics crate.
This is a Rust implementation of a boid flocking simulation using the ggez graphics crate.

Boidflock This is a Rust implementation of a boid flocking simulation using the ggez graphics crate. The CLI for this program is built using the struc

Source code for our paper
Source code for our paper "Higher-order finite elements for embedded simulation"

Higher-order Finite Elements for Embedded Simulation This repository contains the source code used to produce the results for our paper: Longva, A., L

desktop automation, screen capture, input listen/simulation, asar compress, color picker for nodejs and electron based on rust
desktop automation, screen capture, input listen/simulation, asar compress, color picker for nodejs and electron based on rust

desktop automation, screen capture, input listen/simulation, asar compress, color picker for nodejs and electron based on rust. 基于 Rust / WASM 提供截图、取色、键鼠事件监听模拟、压缩解压、图像处理、获取已安装应用等跨平台功能的现代异步 Nodejs 模块,占用空间小, 安装便捷, 使用简单, 高性能, 资源占用极小, 可取代 iohook 和 robotjs

A Monte Carlo simulation of getting all possible outcomes of loot boxes opening

lootboxes_monte_carlo A monte-carlo simulation of the number of "lootboxes" to open to get at least one of each possible outcome I wondered how many l

Life simulation written in rust

Life simulation written in Rust, inspired by this very old screensaver: https://sourceforge.net/projects/primlife/ Demo: https://joelthelion.github.io

A sci-fi battle simulation implemented in the bevy engine.
A sci-fi battle simulation implemented in the bevy engine.

Bevy Combat It's a bevy port of my ECS Combat Unity demo. Check out the web demo in your browser. You can use the - and = keys to speed up and slow do

Owner
carl
`never open your mouth until you know what ${theShot} is`
carl
AMCOS - A high-peformance parallel monte-carlo simulation for estimating the fair value of options in finance

antoons-monte-carlo-options-sim A high-peformance parallel monte-carlo simulation for estimating the fair value of options in finance. Written in Rust

null 4 Jun 18, 2022
Prototype risk modeling simulation for Portfolio using Arbiter.

proto-sim Prototype simulation using Arbiter as the simulation & agent engine. Build & Run build.sh cargo run Arbiter config The arbiter.toml config

Primitive 13 Aug 14, 2023
Three-body Problem with rust

Briefing In physics and classical mechanics, the three-body problem is the problem of taking the initial positions and velocities (or momenta) of thre

Alvaro Alves 1 Feb 3, 2022
Very rudimentary library shim to read the Swinsian db in Rust.

Swinsian Rust Library Shim My favorite OSX music player is by far Swinsian. The API however ranges from non-existant to absolute trash (AppleScript).

coral 1 Sep 30, 2022
This is a Rust implementation for HashiCorp's golang-lru. This crate contains three LRU based cache, LRUCache, TwoQueueCache and AdaptiveCache.

This is a Rust implementation for HashiCorp's golang-lru. This crate contains three LRU based cache, LRUCache, TwoQueueCache and AdaptiveCache.

Al Liu 84 Jan 3, 2023
a Vietnamese gambling game using three dice

Near Cetificate Devoloper - Demo Vietnamese gambling game: Gourd-Fish-Shrimp-Crab On NEAR How to play Instead of showing one to six pips, the sides of

null 3 Dec 20, 2021
SPICE-integrated n-body trajectory propagation tool

traj-propagate A command line utility that reads from and writes to SPICE SPK files to propagate trajectories of specified bodies. The user must provi

Moritz 2 May 22, 2022
2 and 3-dimensional rigid body physics engine for Rust.

Users guide | 2D Documentation | 3D Documentation | Forum ⚠️ **This crate is now passively-maintained. It is being superseded by the Rapier project.**

dimforge 1.6k Jan 6, 2023
`wasm-snip` replaces a WebAssembly function's body with an `unreachable`

wasm-snip wasm-snip replaces a Wasm function's body with an unreachable instruction. API Docs | Contributing | Chat Built with ?? ?? by The Rust and W

Rust and WebAssembly 177 Dec 28, 2022
command line tools for coprolite research (paleontology and archaeology): estimate the producer's body mass based on coprolite diameter by the use of regression models

OVERVIEW OF COPROSIZE coprosize employs power, exponential and cubic regression models allowing to estimate the producer's body mass based on coprolit

Piotr Bajdek 7 Nov 25, 2022