Ejemplo n.º 1
0
        /*
         * public static void LoadFiveBodiesScenario(GravitySim sim)
         * {
         *  sim.ClearSim();
         *  sim.AddBody(1.0, 3.0, 3, GravitySim.bodyStartPosition.stageLeft);
         *  sim.AddBody(1.0, 3.0, 2, GravitySim.bodyStartPosition.stageTop);
         *  sim.AddBody(1.0, 3.0, 1, GravitySim.bodyStartPosition.stageRight);
         *  sim.AddBody(1.0, 3.0, 7, GravitySim.bodyStartPosition.stageBottom);
         *  sim.AddBody(1.0, 5.0, 6, GravitySim.bodyStartPosition.centerOfTheUniverse);
         *  sim.SetMonitoredBody(0);
         *  sim.SetMonitoredValues();
         * }
         * */

        public static void LoadFourBodiesScenario(GravitySim sim)
        {
            sim.ClearSim();
            sim.AddBody(1.0, 4.0, 3, GravitySim.bodyStartPosition.stageLeft);
            sim.AddBody(1.0, 4.0, 2, GravitySim.bodyStartPosition.stageTop);
            sim.AddBody(1.0, 4.0, 1, GravitySim.bodyStartPosition.stageRight);
            sim.AddBody(1.0, 4.0, 7, GravitySim.bodyStartPosition.stageBottom);
            sim.SetMonitoredBody(0);
            sim.SetMonitoredValues();
            // sim.SetCheckSim(true);
            sim.SetSimRounding(3);
        }
Ejemplo n.º 2
0
        public static void LoadNineBodiesScenario(GravitySim sim)
        {
            const double baseSize = 3.0d;

            sim.ClearSim();
            sim.AddBody(1.0, baseSize, 3, GravitySim.bodyStartPosition.stageLeft);
            sim.AddBody(1.0, baseSize, 2, GravitySim.bodyStartPosition.stageTop);
            sim.AddBody(1.0, baseSize, 1, GravitySim.bodyStartPosition.stageRight);
            sim.AddBody(9.0, baseSize * 3.0, 7, GravitySim.bodyStartPosition.stageBottom);
            sim.AddBody(1.0, baseSize, 4, GravitySim.bodyStartPosition.stageTopLeft);
            sim.AddBody(1.0, baseSize, 5, GravitySim.bodyStartPosition.stageTopRight);
            sim.AddBody(1.0, baseSize, 6, GravitySim.bodyStartPosition.stageBottomRight);
            sim.AddBody(1.0, baseSize, 8, GravitySim.bodyStartPosition.stageBottomLeft);
            sim.AddBody(4.0, baseSize * 2.0, 9, GravitySim.bodyStartPosition.centerOfTheUniverse);
            sim.SetMonitoredBody(0);
            sim.SetMonitoredValues();
            // sim.SetCheckSim(true);
            sim.SetSimRounding(2);
        }