Beispiel #1
0
        public static void Main(String[] args)
        {
            int n = 50000000;

            NBodySystem bodies = new NBodySystem();

            Console.WriteLine(bodies.Energy());
            for (int i = 0; i < n; i++)
                bodies.Advance(0.01);
            Console.WriteLine(bodies.Energy());
        }
Beispiel #2
0
        public static void Main()
        {
            int n = 50000000;            

            NBodySystem bodies = new NBodySystem();

            Console.WriteLine(bodies.Energy());
            for (int i = 0; i < n; i++)
                bodies.Advance(0.01);
            Console.WriteLine(bodies.Energy());
        }