Last active
March 12, 2020 14:31
-
-
Save benrules2/d56af486108ce43d6026189816b5851d to your computer and use it in GitHub Desktop.
Python N-Body Orbital Simulation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
self.z = z | |
class body: | |
def __init__(self, location, mass, velocity, name = ""): | |
self.location = location | |
self.mass = mass | |
self.velocity = velocity | |
self.name = name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment