Skip to content

Instantly share code, notes, and snippets.

@benrules2
benrules2 / Gravity.py
Last active November 14, 2023 16:39
Python N-Body Orbit Simulation
import math
import random
import matplotlib.pyplot as plot
from mpl_toolkits.mplot3d import Axes3D
class point:
def __init__(self, x,y,z):
self.x = x
self.y = y