Esempio n. 1
0
        protected override void SetOutputs(IGH_DataAccess da)
        {
            List <Point3d> pos     = new List <Point3d>();
            List <Line>    connect = new List <Line>();
            Random         rand    = new Random(DateTime.Now.Millisecond);

            foreach (Amoeba amo in p.population)
            {
                List <Point3d> nei = env.findNeighborParticle(amo, radius);
                foreach (Point3d pt_nei in nei)
                {
                    if (pt_nei.X > amo.Location.X && rand.NextDouble() < possib)
                    {
                        connect.Add(new Line(pt_nei, amo.Location));
                    }
                }
            }
            da.SetDataList(0, connect);
        }