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
using Animations | |
using Javis | |
using Luxor | |
function ground(args...) | |
sethue("black") | |
background("white") | |
end | |
function boxes(p::Point,w,h,action,color) |
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
using Animations | |
using Javis | |
using NBodySimulator | |
using StaticArrays | |
# Define the bodies | |
body1 = MassBody(SVector(0.0, 1.0, 0.0), SVector( 5.775e-6, 0.0, 0.0), 2.0) | |
body2 = MassBody(SVector(0.0,-1.0, 0.0), SVector(-5.775e-6, 0.0, 0.0), 2.0) | |
G = 6.673e-11 |