Skip to content

ybillchen/Tree-Gravity-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tree-Gravity-Python

Description

Simulating 2D n-body gravitational force with quad-tree Method in Python 3.

-Bill in Beijing

Tutorial

The program is used to calculate 2D n-body gravitational force with the primary application of Python 3. I use quad-tree method to deal with this task. The tree method in cosmological n-body problem is proposed by Barnes & Hut (1986); the paper is included in this repository.

Before running the program, you should add all the files into the same path. You'd better run the program in main.py unless you want to improve my code.

You can adjust paramaters in main.py simply by changing the default values.

Enjoy your time with Quad-tree and Python! Suggestions and adjustments (as well as STARs) are welcomed.

A detailed introduction of Simulating 2D Ising Model is uploaded on ZHIHU. It is a Chinese version, click here to view.

Note: You'll probably need numpy and matplotlib.

Created Nov. 5, 2019 by Bill in Beijing

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages