public void DrawTeam()
        {
            //XyDataSeries<double, double> lidarPts = new XyDataSeries<double, double>();
            ObjectsPolygonSeries.Clear();

            foreach (var r in TeamMatesDisplayDictionary)
            {
                //Affichage des robots
                RobotGhostSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Ghost, TeamMatesDisplayDictionary[r.Key].GetRobotGhostPolygon());
                PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Speed, TeamMatesDisplayDictionary[r.Key].GetRobotSpeedArrow());
                PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Destination, TeamMatesDisplayDictionary[r.Key].GetRobotDestinationArrow());
                PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.WayPoint, TeamMatesDisplayDictionary[r.Key].GetRobotWaypointArrow());

                //On trace le robot en dernier pour l'avoir en couche de dessus
                RobotShapesSeries.AddOrUpdatePolygonExtended(r.Key, TeamMatesDisplayDictionary[r.Key].GetRobotPolygon());

                AddOrUpdateTextAnnotation(r.Key.ToString(), r.Value.robotName, TeamMatesDisplayDictionary[r.Key].GetRobotLocation().X, TeamMatesDisplayDictionary[r.Key].GetRobotLocation().Y);
                AddOrUpdateTextAnnotation(r.Key.ToString() + "Role", r.Value.robotRole.ToString(), TeamMatesDisplayDictionary[r.Key].GetRobotLocation().X, TeamMatesDisplayDictionary[r.Key].GetRobotLocation().Y - 1.4);
                AddOrUpdateTextAnnotation(r.Key.ToString() + "Console", r.Value.DisplayMessage.ToString(), TeamMatesDisplayDictionary[r.Key].GetRobotLocation().X, TeamMatesDisplayDictionary[r.Key].GetRobotLocation().Y - 1.9);

                ////Rendering des objets Lidar
                //foreach (var polygonObject in TeamMatesDisplayDictionary[r.Key].GetRobotLidarObjects())
                //    ObjectsPolygonSeries.AddOrUpdatePolygonExtended(ObjectsPolygonSeries.Count(), polygonObject);
            }

            foreach (var r in OpponentDisplayDictionary)
            {
                //Affichage des robots adverses
                PolygonSeries.AddOrUpdatePolygonExtended(r.Key, OpponentDisplayDictionary[r.Key].GetRobotPolygon());
            }
        }
Exemple #2
0
        public void DrawTeam()
        {
            XyDataSeries <double, double> lidarPts = new XyDataSeries <double, double>();

            foreach (var r in TeamMatesDisplayDictionary)
            {
                if (TeamMatesDisplayDictionary.Count > 1)
                {
                    int toto = 0;
                }
                //Affichage des robots
                PolygonSeries.AddOrUpdatePolygonExtended(r.Key, TeamMatesDisplayDictionary[r.Key].GetRobotPolygon());
                PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Speed, TeamMatesDisplayDictionary[r.Key].GetRobotSpeedArrow());
                PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Destination, TeamMatesDisplayDictionary[r.Key].GetRobotDestinationArrow());
                PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.WayPoint, TeamMatesDisplayDictionary[r.Key].GetRobotWaypointArrow());

                //Rendering des points Lidar
                lidarPts.AcceptsUnsortedData = true;
                var lidarData = TeamMatesDisplayDictionary[r.Key].GetRobotLidarPoints();
                lidarPts.Append(lidarData.XValues, lidarData.YValues);
            }

            foreach (var r in OpponentDisplayDictionary)
            {
                //Affichage des robots
                PolygonSeries.AddOrUpdatePolygonExtended(r.Key, OpponentDisplayDictionary[r.Key].GetRobotPolygon());
                //PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Speed, OpponentDisplayDictionary[r.Key].GetRobotSpeedArrow());
                //PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.Destination, TeamMatesDictionary[r.Key].GetRobotDestinationArrow());
                //PolygonSeries.AddOrUpdatePolygonExtended(r.Key + (int)Caracteristique.WayPoint, TeamMatesDictionary[r.Key].GetRobotWaypointArrow());
            }
            //Affichage des points lidar
            LidarPoints.DataSeries = lidarPts;
        }
Exemple #3
0
        public void DrawGhost()
        {
            XyDataSeries <double, double> lidarPts = new XyDataSeries <double, double>();

            ObjectsPolygonSeries.Clear();

            //Affichage du robot
            PolygonSeries.AddOrUpdatePolygonExtended(4, GhostDisplay.GetRobotPolygon());
            PolygonSeries.AddOrUpdatePolygonExtended(5, GhostDisplay.GetRobotSpeedArrow());
            PolygonSeries.AddOrUpdatePolygonExtended(6, GhostDisplay.GetRobotDestinationArrow());
            PolygonSeries.AddOrUpdatePolygonExtended(7, GhostDisplay.GetRobotWaypointArrow());

            //Rendering des points Lidar
            lidarPts.AcceptsUnsortedData = true;
            var lidarData = GhostDisplay.GetRobotLidarPoints();

            lidarPts.Append(lidarData.XValues, lidarData.YValues);

            //Rendering des objets Lidar
            foreach (var polygonObject in GhostDisplay.GetRobotLidarObjects())
            {
                ObjectsPolygonSeries.AddOrUpdatePolygonExtended(ObjectsPolygonSeries.Count(), polygonObject);
            }

            //Affichage des points lidar
            LidarPoints.DataSeries = lidarPts;
        }
 private void DispatcherTimer_Tick(object sender, EventArgs e)
 {
     //Routine de mise à jour de l'affichage en fonction de ce qui a été reçu
     PolygonSeries.AddOrUpdatePolygonExtended((int)PolygonId.GhostPolygonId, GetRobotGhostPolygon());
     PolygonSeries.AddOrUpdatePolygonExtended((int)PolygonId.RobotPolygonId, GetRobotPolygon());
     PolygonSeries.RedrawAll();
 }
Exemple #5
0
        public void DrawLidar()
        {
            ObjectsPolygonSeries = new PolygonRenderableSeries();
            int i = 0;

            foreach (var r in ObjectDisplayList)
            {
                //Affichage des objets détectés par le Lidar
                PolygonSeries.AddOrUpdatePolygonExtended(i++, r);
            }
        }
        void InitRoboCupSoccerField()
        {
            double TerrainLowerX = -11;
            double TerrainUpperX = 11;
            double TerrainLowerY = -7;
            double TerrainUpperY = 7;

            int             fieldLineWidth = 2;
            PolygonExtended p = new PolygonExtended();

            p.polygon.Points.Add(new System.Windows.Point(-12, -8));
            p.polygon.Points.Add(new System.Windows.Point(12, -8));
            p.polygon.Points.Add(new System.Windows.Point(12, 8));
            p.polygon.Points.Add(new System.Windows.Point(-12, 8));
            p.polygon.Points.Add(new System.Windows.Point(-12, -8));
            p.borderWidth     = fieldLineWidth;
            p.borderColor     = System.Drawing.Color.FromArgb(0x00, 0x00, 0x00, 0x00);
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 0x22, 0x22, 0x22);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.ZoneProtegee, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(11, -7));
            p.polygon.Points.Add(new System.Windows.Point(0, -7));
            p.polygon.Points.Add(new System.Windows.Point(0, 7));
            p.polygon.Points.Add(new System.Windows.Point(11, 7));
            p.polygon.Points.Add(new System.Windows.Point(11, -7));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x66, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.DemiTerrainDroit, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(-11, -7));
            p.polygon.Points.Add(new System.Windows.Point(0, -7));
            p.polygon.Points.Add(new System.Windows.Point(0, 7));
            p.polygon.Points.Add(new System.Windows.Point(-11, 7));
            p.polygon.Points.Add(new System.Windows.Point(-11, -7));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x66, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.DemiTerrainGauche, p);


            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(-11, -1.95));
            p.polygon.Points.Add(new System.Windows.Point(-10.25, -1.95));
            p.polygon.Points.Add(new System.Windows.Point(-10.25, 1.95));
            p.polygon.Points.Add(new System.Windows.Point(-11.00, 1.95));
            p.polygon.Points.Add(new System.Windows.Point(-11.00, -1.95));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.SurfaceButGauche, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(11.00, -1.95));
            p.polygon.Points.Add(new System.Windows.Point(10.25, -1.95));
            p.polygon.Points.Add(new System.Windows.Point(10.25, 1.95));
            p.polygon.Points.Add(new System.Windows.Point(11.00, 1.95));
            p.polygon.Points.Add(new System.Windows.Point(11.00, -1.95));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.SurfaceButDroit, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(11.00, -3.45));
            p.polygon.Points.Add(new System.Windows.Point(8.75, -3.45));
            p.polygon.Points.Add(new System.Windows.Point(8.75, 3.45));
            p.polygon.Points.Add(new System.Windows.Point(11.00, 3.45));
            p.polygon.Points.Add(new System.Windows.Point(11.00, -3.45));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.SurfaceReparationDroit, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(-11.00, -3.45));
            p.polygon.Points.Add(new System.Windows.Point(-8.75, -3.45));
            p.polygon.Points.Add(new System.Windows.Point(-8.75, 3.45));
            p.polygon.Points.Add(new System.Windows.Point(-11.00, 3.45));
            p.polygon.Points.Add(new System.Windows.Point(-11.00, -3.45));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.SurfaceReparationGauche, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(-11.00, -1.20));
            p.polygon.Points.Add(new System.Windows.Point(-11.00, 1.20));
            p.polygon.Points.Add(new System.Windows.Point(-11.50, 1.20));
            p.polygon.Points.Add(new System.Windows.Point(-11.50, -1.20));
            p.polygon.Points.Add(new System.Windows.Point(-11.00, -1.20));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.ButGauche, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(11.00, -1.20));
            p.polygon.Points.Add(new System.Windows.Point(11.00, 1.20));
            p.polygon.Points.Add(new System.Windows.Point(11.50, 1.20));
            p.polygon.Points.Add(new System.Windows.Point(11.50, -1.20));
            p.polygon.Points.Add(new System.Windows.Point(11.00, -1.20));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.ButDroit, p);


            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(-12.00, -8.00));
            p.polygon.Points.Add(new System.Windows.Point(-12.00, -9.00));
            p.polygon.Points.Add(new System.Windows.Point(-4.00, -9.00));
            p.polygon.Points.Add(new System.Windows.Point(-4.00, -8.00));
            p.polygon.Points.Add(new System.Windows.Point(-12.00, -8.00));
            p.borderWidth     = fieldLineWidth;
            p.borderColor     = System.Drawing.Color.FromArgb(0x00, 0x00, 0x00, 0x00);
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x00, 0xFF);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.ZoneTechniqueGauche, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new System.Windows.Point(+12.00, -8.00));
            p.polygon.Points.Add(new System.Windows.Point(+12.00, -9.00));
            p.polygon.Points.Add(new System.Windows.Point(+4.00, -9.00));
            p.polygon.Points.Add(new System.Windows.Point(+4.00, -8.00));
            p.polygon.Points.Add(new System.Windows.Point(+12.00, -8.00));
            p.borderWidth     = fieldLineWidth;
            p.borderColor     = System.Drawing.Color.FromArgb(0x00, 0x00, 0x00, 0x00);
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 0x00, 0x00, 0xFF);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.ZoneTechniqueDroite, p);

            p = new PolygonExtended();
            int nbSteps = 30;

            for (int i = 0; i < nbSteps + 1; i++)
            {
                p.polygon.Points.Add(new System.Windows.Point(1.0f * Math.Cos((double)i * (2 * Math.PI / nbSteps)), 1.0f * Math.Sin((double)i * (2 * Math.PI / nbSteps))));
            }
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.RondCentral, p);

            p = new PolygonExtended();
            for (int i = 0; i < (int)(nbSteps / 4) + 1; i++)
            {
                p.polygon.Points.Add(new System.Windows.Point(-11.00 + 0.75 * Math.Cos((double)i * (2 * Math.PI / nbSteps)), -7.0 + 0.75 * Math.Sin((double)i * (2 * Math.PI / nbSteps))));
            }
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CornerBasGauche, p);

            p = new PolygonExtended();
            for (int i = (int)(nbSteps / 4) + 1; i < (int)(2 * nbSteps / 4) + 1; i++)
            {
                p.polygon.Points.Add(new System.Windows.Point(11 + 0.75 * Math.Cos((double)i * (2 * Math.PI / nbSteps)), -7 + 0.75 * Math.Sin((double)i * (2 * Math.PI / nbSteps))));
            }
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CornerBasDroite, p);

            p = new PolygonExtended();
            for (int i = (int)(2 * nbSteps / 4); i < (int)(3 * nbSteps / 4) + 1; i++)
            {
                p.polygon.Points.Add(new System.Windows.Point(11 + 0.75 * Math.Cos((double)i * (2 * Math.PI / nbSteps)), 7 + 0.75 * Math.Sin((double)i * (2 * Math.PI / nbSteps))));
            }
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CornerHautDroite, p);

            p = new PolygonExtended();
            for (int i = (int)(3 * nbSteps / 4) + 1; i < (int)(nbSteps) + 1; i++)
            {
                p.polygon.Points.Add(new System.Windows.Point(-11 + 0.75 * Math.Cos((double)i * (2 * Math.PI / nbSteps)), 7 + 0.75 * Math.Sin((double)i * (2 * Math.PI / nbSteps))));
            }
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CornerHautGauche, p);

            p = new PolygonExtended();
            for (int i = 0; i < (int)(nbSteps) + 1; i++)
            {
                p.polygon.Points.Add(new System.Windows.Point(-7.4 + 0.075 * Math.Cos((double)i * (2 * Math.PI / nbSteps)), 0.075 * Math.Sin((double)i * (2 * Math.PI / nbSteps))));
            }
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.PtAvantSurfaceGauche, p);

            p = new PolygonExtended();
            for (int i = 0; i < (int)(nbSteps) + 1; i++)
            {
                p.polygon.Points.Add(new System.Windows.Point(7.4 + 0.075 * Math.Cos((double)i * (2 * Math.PI / nbSteps)), 0.075 * Math.Sin((double)i * (2 * Math.PI / nbSteps))));
            }
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0x00, 0x00, 0xFF, 0x00);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.PtAvantSurfaceDroit, p);
        }
Exemple #7
0
        //void InitTeam()
        //{
        //    //Team1
        //    for (int i = 0; i < 1; i++)
        //    {
        //        PolygonExtended robotShape = new PolygonExtended();
        //        robotShape.polygon.Points.Add(new Point(-0.25, -0.25));
        //        robotShape.polygon.Points.Add(new Point(0.25, -0.25));
        //        robotShape.polygon.Points.Add(new Point(0.2, 0));
        //        robotShape.polygon.Points.Add(new Point(0.25, 0.25));
        //        robotShape.polygon.Points.Add(new Point(-0.25, 0.25));
        //        robotShape.polygon.Points.Add(new Point(-0.25, -0.25));
        //        RobotDisplay rd = new RobotDisplay(robotShape);
        //        rd.SetPosition((float)(i * 0.50), (float)(Math.Pow(i, 1.3) * 0.50), (float)Math.PI / 4 * i);
        //        robotDictionary.Add((int)TeamId.Team1+i, rd);
        //    }
        //}

        void InitSoccerField()
        {
            int             fieldLineWidth = 2;
            PolygonExtended p = new PolygonExtended();

            //p.polygon.Points.Add(new Point(-8, -4));
            //p.polygon.Points.Add(new Point(8, -4));
            ////p.polygon.Points.Add(new Point(12, 8));
            ////p.polygon.Points.Add(new Point(-12, 8));
            ////p.polygon.Points.Add(new Point(-12, -8));
            //p.borderWidth = fieldLineWidth;
            //p.borderColor = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF);
            //p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 0x22, 0x22, 0x22);
            //PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.ZoneProtegee, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(-0.335, 0));
            p.polygon.Points.Add(new Point(-0.335, 1.5));
            p.polygon.Points.Add(new Point(-1.815, 1.5));
            p.polygon.Points.Add(new Point(-1.815, 0));
            p.polygon.Points.Add(new Point(-0.335, 0));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CarreServiceHautGauche, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(-0.335, 0));
            p.polygon.Points.Add(new Point(-0.335, -1.5));
            p.polygon.Points.Add(new Point(-1.815, -1.5));
            p.polygon.Points.Add(new Point(-1.815, 0));
            p.polygon.Points.Add(new Point(-0.335, 0));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CarreServiceBasGauche, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(0.335, 0));
            p.polygon.Points.Add(new Point(0.335, 1.5));
            p.polygon.Points.Add(new Point(1.815, 1.5));
            p.polygon.Points.Add(new Point(1.815, 0));
            p.polygon.Points.Add(new Point(0.335, 0));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CarreServiceHautDroit, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(0.335, 0));
            p.polygon.Points.Add(new Point(0.335, -1.5));
            p.polygon.Points.Add(new Point(1.815, -1.5));
            p.polygon.Points.Add(new Point(1.815, 0));
            p.polygon.Points.Add(new Point(0.335, 0));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CarreServiceBasDroit, p);


            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(-0.335, -2));
            p.polygon.Points.Add(new Point(0.335, -2));
            p.polygon.Points.Add(new Point(0.335, 2));
            p.polygon.Points.Add(new Point(-0.335, 2));
            p.polygon.Points.Add(new Point(-0.335, -2));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.LigneMediane, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(0.019, -2));
            p.polygon.Points.Add(new Point(0.019, 2));
            p.polygon.Points.Add(new Point(-0.019, 2));
            p.polygon.Points.Add(new Point(-0.019, -2));
            p.polygon.Points.Add(new Point(0.019, -2));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.Black;
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.LigneNoirCentrale, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(-0.335, -1.5));
            p.polygon.Points.Add(new Point(-4, -1.5));
            p.polygon.Points.Add(new Point(-4, -2));
            p.polygon.Points.Add(new Point(-0.335, -2));
            p.polygon.Points.Add(new Point(-0.335, -1.5));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CouloirBasGauche, p);


            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(-0.335, 1.5));
            p.polygon.Points.Add(new Point(-4, 1.5));
            p.polygon.Points.Add(new Point(-4, 2));
            p.polygon.Points.Add(new Point(-0.335, 2));
            p.polygon.Points.Add(new Point(-0.335, 1.5));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CouloirHautGauche, p);


            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(0.335, 1.5));
            p.polygon.Points.Add(new Point(4, 1.5));
            p.polygon.Points.Add(new Point(4, 2));
            p.polygon.Points.Add(new Point(0.335, 2));
            p.polygon.Points.Add(new Point(0.335, 1.5));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CouloirHautDroit, p);


            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(0.335, -1.5));
            p.polygon.Points.Add(new Point(4, -1.5));
            p.polygon.Points.Add(new Point(4, -2));
            p.polygon.Points.Add(new Point(0.335, -2));
            p.polygon.Points.Add(new Point(0.335, -1.5));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.CouloirBasDroit, p);


            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(-1.815, 1.5));
            p.polygon.Points.Add(new Point(-4, 1.5));
            p.polygon.Points.Add(new Point(-4, -1.5));
            p.polygon.Points.Add(new Point(-1.815, -1.5));
            p.polygon.Points.Add(new Point(-1.815, 1.5));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.FontDeCourtGauche, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(1.815, 1.5));
            p.polygon.Points.Add(new Point(4, 1.5));
            p.polygon.Points.Add(new Point(4, -1.5));
            p.polygon.Points.Add(new Point(1.815, -1.5));
            p.polygon.Points.Add(new Point(1.815, 1.5));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.FromArgb(0xFF, 46, 49, 146);
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.FontDeCourtDroit, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(-4, -0.1));
            p.polygon.Points.Add(new Point(-4.2, -0.1));
            p.polygon.Points.Add(new Point(-4.2, 0.1));
            p.polygon.Points.Add(new Point(-4, 0.1));
            p.polygon.Points.Add(new Point(-4, -0.1));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.Brown;
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.BaliseGaucheFontDeCourt, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(-0.9, -2));
            p.polygon.Points.Add(new Point(-0.9, -2.2));
            p.polygon.Points.Add(new Point(-1.1, -2.2));
            p.polygon.Points.Add(new Point(-1.1, -2));
            p.polygon.Points.Add(new Point(-0.9, -2));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.Brown;
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.BaliseGaucheBas, p);


            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(-0.9, 2));
            p.polygon.Points.Add(new Point(-0.9, 2.2));
            p.polygon.Points.Add(new Point(-1.1, 2.2));
            p.polygon.Points.Add(new Point(-1.1, 2));
            p.polygon.Points.Add(new Point(-0.9, 2));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.Brown;
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.BaliseGaucheHaut, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(4, -0.1));
            p.polygon.Points.Add(new Point(4.2, -0.1));
            p.polygon.Points.Add(new Point(4.2, 0.1));
            p.polygon.Points.Add(new Point(4, 0.1));
            p.polygon.Points.Add(new Point(4, -0.1));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.Brown;
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.BaliseDroitFontDeCourt, p);

            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(0.9, -2));
            p.polygon.Points.Add(new Point(0.9, -2.2));
            p.polygon.Points.Add(new Point(1.1, -2.2));
            p.polygon.Points.Add(new Point(1.1, -2));
            p.polygon.Points.Add(new Point(0.9, -2));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.Brown;
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.BaliseDroitBas, p);


            p = new PolygonExtended();
            p.polygon.Points.Add(new Point(0.9, 2));
            p.polygon.Points.Add(new Point(0.9, 2.2));
            p.polygon.Points.Add(new Point(1.1, 2.2));
            p.polygon.Points.Add(new Point(1.1, 2));
            p.polygon.Points.Add(new Point(0.9, 2));
            p.borderWidth     = fieldLineWidth;
            p.backgroundColor = System.Drawing.Color.Brown;
            PolygonSeries.AddOrUpdatePolygonExtended((int)Terrain.BaliseDroitHaut, p);
        }