//Elliptic cone:
        private void AddEllipticCone()
        {
            ss = new SurfaceShading();

            Material material = new DiffuseMaterial(Brushes.Green);

            ss.MaterialGroup.Children.Add(material);
            material = new SpecularMaterial(Brushes.LightGreen, 60);
            ss.MaterialGroup.Children.Add(material);
            material        = new DiffuseMaterial(Brushes.SteelBlue);
            ss.BackMaterial = material;

            ss.Viewport3d = viewport;
            ss.Center     = new Point3D(0, 0, 0);
            ss.Umin       = 0;
            ss.Umax       = 2 * Math.PI;
            ss.Vmin       = -1;
            ss.Vmax       = 1;
            ss.Nu         = 30;
            ss.Nv         = 30;
            ss.CreateSurface(EllipticCone);
        }
        //Elliptic cylinder:
        private void AddEllipticCylinder()
        {
            ss = new SurfaceShading();

            Material material = new DiffuseMaterial(Brushes.Goldenrod);

            ss.MaterialGroup.Children.Add(material);
            material = new SpecularMaterial(Brushes.LightGoldenrodYellow, 60);
            ss.MaterialGroup.Children.Add(material);
            material        = new DiffuseMaterial(Brushes.SteelBlue);
            ss.BackMaterial = material;

            ss.Viewport3d = viewport;
            ss.Center     = new Point3D(0, 1, -2);
            ss.Umin       = 0;
            ss.Umax       = 2 * Math.PI;
            ss.Vmin       = -0.5;
            ss.Vmax       = 0.5;
            ss.Nu         = 40;
            ss.Nv         = 10;
            ss.CreateSurface(EllipticCylinder);
        }
        // Hyperboloid surface:
        private void AddHyperboloid()
        {
            ss = new SurfaceShading();

            Material material = new DiffuseMaterial(Brushes.Red);

            ss.MaterialGroup.Children.Add(material);
            material = new SpecularMaterial(Brushes.Yellow, 60);
            ss.MaterialGroup.Children.Add(material);
            material        = new DiffuseMaterial(Brushes.SteelBlue);
            ss.BackMaterial = material;

            ss.Viewport3d = viewport;
            ss.Center     = new Point3D(0, 0, 2);
            ss.Umin       = 0;
            ss.Umax       = 2 * Math.PI;
            ss.Vmin       = -1;
            ss.Vmax       = 1;
            ss.Nu         = 30;
            ss.Nv         = 30;
            ss.CreateSurface(Hyperboloid);
        }