Skip to content

Instantly share code, notes, and snippets.

View grampabacon's full-sized avatar
💭
Typing Furiously

Adam Goodman grampabacon

💭
Typing Furiously
View GitHub Profile
@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
@pckujawa
pckujawa / comparison of integrators for SHO sim.py
Last active December 11, 2018 16:05
Runge-Kutta, Euler-Richardson midpoint, and Euler methods compared for a simple harmonic oscillator simulation.
#-------------------------------------------------------------------------------
# Purpose:
# Author: Pat
#-------------------------------------------------------------------------------
#!/usr/bin/env python
from __future__ import division
import math
import numpy as np
import pylab as pl