This file contains hidden or 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
#!/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 |
This file contains hidden or 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
TODO: copy from my codes and add a test: | |
http://comments.gmane.org/gmane.comp.python.scientific.devel/17439 |
NewerOlder