Skip to content

mlesniak/three-body-zig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a playground project to demonstrate the effects of gravity using Newton's laws of motion. The project is written in Zig and uses Raylib for visualization.

It serves as a learning project for me to get more familiar with Zig and Raylib, and is very far away from being a complete, polished or somehow tested project.

Demo

Demo

Foundation

The equation for universal gravitation takes the form:

Gravitational force equation

where F is the gravitational force acting between two objects, m1 and m2 are the masses of the objects, r is the distance between the centers of their masses, and G is the gravitational constant.

Building

A simple

zig build run

should be sufficient to build and run the project. On the first run it will also try to compile Raylib and might complain about missing dependencies. Install them as needed.

About

Three body simulation with Zig and Raylib

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages