Skip to content

Instantly share code, notes, and snippets.

View FilipDominec's full-sized avatar
🙂
Happy. Basically whenever I code, I am working on something I love

Filip Dominec FilipDominec

🙂
Happy. Basically whenever I code, I am working on something I love
View GitHub Profile
@FilipDominec
FilipDominec / Lagrangian points - force plot
Created January 25, 2015 05:15
there are 5 points in the Sun-Earth system where gravitational and centrifugal forces cancel
#!/usr/bin/env python
#coding:utf8
import numpy as np
#Mearth, Msun = 5.97e24, 1.98e30 ## <-- these are realistic
Mearth, Msun = 1.97e29, 1.98e30 ## <-- unrealistic, but better for visualisation
earth_sun_dist = 149e9
Xsun = - earth_sun_dist * (Mearth/Msun) ## Sun center distance to the center-of-mass
Xearth = earth_sun_dist * (1 - Mearth/Msun) ## Earth center distance to the center-of-mass
kappa = 6.67e-11 ## Gravitational constant
@FilipDominec
FilipDominec / continuous arccosine notes
Created August 21, 2014 08:37
continuous arccosine
TODO: copy from my codes and add a test:
http://comments.gmane.org/gmane.comp.python.scientific.devel/17439