search for: star1center

Displaying 1 result from an estimated 1 matches for "star1center".

2008 Oct 20
2
R Newbie Question
...ner lagrange point L1 which is the point where the gravitational potentials of the stars "cancel out", e.g. an object would not be attracted to any star. Well, enough background information, here's my rookie code - please feel free to comment on anything :-) Kind regards, Johannes star1center = vector("numeric", 2) star1center[1] = -0.5 star1center[2] = 0 star1mass = 30 star2center = vector("numeric", 2) star2center[1] = 0.5 star2center[2] = 0 star2mass = 1 sqr = function(x) { return(x * x) } distance = function(a, b) { return(sqrt(sqr(a[1] - b[1]) + sqr(a[2] -...