예제 #1
0
        static List <int> DoReaction(IShape shape, int particlesCount, double lambda)
        {
            var particles = GenerateInternalParticles(shape, particlesCount);
            var reaction  = new NuclearReaction(shape, particles, lambda);

            return(reaction.Run());
        }
예제 #2
0
        static void BallWithInteractionProbabilities(double absorption, double scattering, double fission)
        {
            var ball      = new Ball(10);
            var particles = GenerateInternalParticles(ball, 1000);
            var reaction  = new NuclearReaction(ball, particles, 0.9);

            reaction.RandomInteractions = new InteractionWithProbabilities(absorption, scattering, fission);
            var counts = reaction.Run();
        }