SKColor DrawLowerWings(SKCanvas canvas, List <SKColor> palette, string lines, List <int> range_lower_angles)
        {
            SKPoint     origin       = new SKPoint(0, 0);
            List <byte> random2Bytes = new List <byte>()
            {
                0, 60
            };
            SKColor p = SKColors.Transparent;

            for (int i = 0; i < 11; i++)
            {
                switch (lines)
                {
                case "none":
                    // noStroke()
                    ProcessingSkiaSharp.noStroke(paint);
                    break;

                case "all":
                    // stroke(0, 0, 0, 60)
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, 60);
                    break;

                case "outer":
                    // stroke(0, 0, 0, 60)
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, 60);
                    break;

                case "some":
                    // stroke(0, 0, 0, helper.random_list_value([0, 60]))
                    byte randomByte = RandomUtility.GetRandomElement(random2Bytes);
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, randomByte);
                    break;
                }
                //p = palette[int(random(0, len(palette)))]
                p = RandomUtility.GetRandomElement <SKColor>(palette);
                if (i == 3 || i == 6)
                {
                    // fill(0, 0, 100, 100)
                    ProcessingSkiaSharp.fill(paint, 0, 0, 100, 100);
                }
                else
                {
                    //fill(p[0], p[1], p[2], 20)
                    ProcessingSkiaSharp.fill(paint, p.Red, p.Green, p.Blue, 20);
                }

                List <SKPoint> wing = new List <SKPoint>()
                {
                    origin
                };
                foreach (int angle in range_lower_angles)
                {
                    // circle_points_list(random(0, width * 0.01), random(0, height * 0.01), random( width * 0.15, width * 0.3 ), radians( random( angle - 7, angle ) )))
                    float randomAngle = RandomUtility.CreateRandom(angle - 7, angle);
                    var   cp          = circle_points_list(RandomUtility.CreateRandom(0, w * 0.01f),
                                                           RandomUtility.CreateRandom(0, h * 0.01f),
                                                           RandomUtility.CreateRandom(w * 0.15f, w * 0.3f),
                                                           (float)ProcessingSkiaSharp.radians(randomAngle));
                    wing.Add(cp);
                }
                float tmpRangle = RandomUtility.CreateRandom(73, 87);
                var   tmpCp     = circle_points_list(RandomUtility.CreateRandom(0, w * 0.01f),
                                                     RandomUtility.CreateRandom(0, h * 0.01f),
                                                     RandomUtility.CreateRandom(w * 0.15f, w * 0.3f),
                                                     (float)ProcessingSkiaSharp.radians(tmpRangle));
                wing.Add(tmpCp);

                draw_wings(canvas, wing);
            } // for (int i = 0; i< 11

            for (int i = 0; i < 11; i++)
            {
                switch (lines)
                {
                case "none":
                    // noStroke()
                    ProcessingSkiaSharp.noStroke(paint);
                    break;

                case "all":
                    // stroke(0, 0, 0, 60)
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, 60);
                    break;

                case "outer":
                    // noStroke()
                    ProcessingSkiaSharp.noStroke(paint);
                    break;

                case "some":
                    // stroke(0, 0, 0, helper.random_list_value([0, 60]))
                    byte randomByte = RandomUtility.GetRandomElement(random2Bytes);
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, randomByte);
                    break;
                }
                //p = palette[int(random(0, len(palette)))]
                p = RandomUtility.GetRandomElement <SKColor>(palette);
                if (i == 3 || i == 6)
                {
                    // fill(0, 0, 100, 100)
                    ProcessingSkiaSharp.fill(paint, 0, 0, 100, 100);
                }
                else
                {
                    //fill(p[0], p[1], p[2], 20)
                    ProcessingSkiaSharp.fill(paint, p.Red, p.Green, p.Blue, 20);
                }

                List <SKPoint> wing = new List <SKPoint>()
                {
                    origin
                };
                foreach (int angle in range_lower_angles)
                {
                    // circle_points_list(random(0, width * 0.01), random(0, height * 0.01), random( width * 0.05, width * 0.2 ), radians( random( angle - 7, angle ) )))
                    float randomAngle = RandomUtility.CreateRandom(angle - 7, angle);
                    var   cp          = circle_points_list(RandomUtility.CreateRandom(0, w * 0.01f),
                                                           RandomUtility.CreateRandom(0, h * 0.01f),
                                                           RandomUtility.CreateRandom(w * 0.05f, w * 0.2f),
                                                           (float)ProcessingSkiaSharp.radians(randomAngle));
                    wing.Add(cp);
                }
                float tmpRangle = RandomUtility.CreateRandom(73, 87);
                var   tmpCp     = circle_points_list(RandomUtility.CreateRandom(0, w * 0.01f),
                                                     RandomUtility.CreateRandom(0, h * 0.01f),
                                                     RandomUtility.CreateRandom(w * 0.05f, w * 0.2f),
                                                     (float)ProcessingSkiaSharp.radians(tmpRangle));
                wing.Add(tmpCp);

                draw_wings(canvas, wing);
            } // for (int i = 0; i< 11

            return(p);
        }
        void DrawAntennaeAndBody(SKCanvas canvas, int lastUpperAngle, SKColor palette)
        {
            paint.StrokeWidth = w * 0.002f;

            var body = get_16_points(-w * 0.015f, -h * 0.15f,
                                     w * 0.03f, h * 0.5f);

            //curveTightness(0)

            // Body
            // x: Clear, DstATop, DstOver
            paint.BlendMode = SKBlendMode.SrcOver;
            //fill( 0, 0, 100 )
            //noStroke()
            //ProcessingSkiaSharp.fill( paint, SKColor.FromHsv( 0, 0, 100 ) );
            ProcessingSkiaSharp.strokeAndFill(paint, new SKColor(255, 255, 255, 255));
            draw_16_points(canvas, body);

            // Antennae
            paint.BlendMode = SKBlendMode.Multiply;
            List <SKPoint> antennae = new List <SKPoint>();
            int            max      = RandomUtility.CreateRandom(3, 8);

            for (int i = 0; i < max; i++)
            {
                float x = body[0].X;
                float y = body[0].Y;
                float r = RandomUtility.CreateRandom(h * 0.1f, h * 0.3f);
                //a = random(range_upper_angles[-1] * 1.2, 80)
                float  a       = RandomUtility.CreateRandom(lastUpperAngle * 1.2f, 80);
                double radians = ProcessingSkiaSharp.radians(a);
                var    pt      = circle_points(x, y, r, (float)radians);
                antennae.Add(pt);
            }
            //antennae.Add( antennae[0] );

            List <float> curve_tightness = new List <float>();

            foreach (var a in antennae)
            {
                curve_tightness.Add(RandomUtility.CreateRandom(-2, 0.8f));
            }

            //pushStyle()
            //pushMatrix()
            //canvas.ResetMatrix();
            int canvasCacheTag = canvas.Save();

            float randomDY = RandomUtility.CreateRandom(h * 0.24f, h * 0.26f);

            canvas.Translate(0, -randomDY);
            ProcessingSkiaSharp.noFill(paint);
            //strokeWeight(width * 0.001)
            //paint.StrokeWidth = w * 0.001f;
            //stroke( p[0], p[1], 25 )palette
            //ProcessingSkiaSharp.stroke( paint, palette.Red, palette.Green, 25 );
            ProcessingSkiaSharp.stroke(paint, new SKColor(palette.Red, palette.Green, 25));
            //int alpha = RandomUtility.CreateRandom( 80, 230 );
            //ProcessingSkiaSharp.stroke( paint, palette.Red, palette.Green, palette.Blue, (byte)alpha );

            canvas.Scale(1, -1);
            drawAntennae(canvas, body, antennae);

            canvas.Scale(-1, 1);
            drawAntennae(canvas, body, antennae);

            //canvas.ResetMatrix();
            canvas.RestoreToCount(canvasCacheTag);
        }
        void DrawUpperWings(SKCanvas canvas, List <SKColor> palette, int num_layers, string lines, List <int> range_upper_angles)
        {
            SKPoint     origin       = new SKPoint(0, 0);
            List <byte> random2Bytes = new List <byte>()
            {
                0, 60
            };

            //List<List<SKPoint>> upper_wing = new List<List<SKPoint>>();
            //for (int i = 0; i < num_layers; i++) {
            //  //List<SKPoint> points
            //  //upper_wing.Add
            //} // for (int i = 0; i < num_layers

            for (int i = 0; i < 7; i++)
            {
                switch (lines)
                {
                case "none":
                    // noStroke()
                    ProcessingSkiaSharp.noStroke(paint);
                    break;

                case "all":
                    // stroke(0, 0, 0, 60)
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, 60);
                    break;

                case "outer":
                    // stroke(0, 0, 0, 60)
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, 60);
                    break;

                case "some":
                    // stroke(0, 0, 0, helper.random_list_value([0, 60]))
                    byte randomByte = RandomUtility.GetRandomElement(random2Bytes);
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, randomByte);
                    break;
                }
                //p = palette[int(random(0, len(palette)))]
                if (i == 3 || i == 6)
                {
                    // fill(0, 0, 100, 100)
                    ProcessingSkiaSharp.fill(paint, 0, 0, 100, 100);
                }
                else
                {
                    var p = RandomUtility.GetRandomElement <SKColor>(palette);
                    //fill(p[0], p[1], p[2], 20)
                    ProcessingSkiaSharp.fill(paint, p.Red, p.Green, p.Blue, 20);
                }

                List <SKPoint> wing = new List <SKPoint>()
                {
                    origin
                };
                foreach (int angle in range_upper_angles)
                {
                    // circle_points_list(random(0, width * 0.01), random(0, height * 0.01), random( width * 0.2, width * 0.4 ), radians( random( angle - 7, angle ) )
                    float randomAngle = RandomUtility.CreateRandom(angle - 7, angle);
                    var   cp          = circle_points_list(RandomUtility.CreateRandom(0, w * 0.01f),
                                                           RandomUtility.CreateRandom(0, h * 0.01f),
                                                           RandomUtility.CreateRandom(w * 0.2f, w * 0.4f),
                                                           (float)ProcessingSkiaSharp.radians(randomAngle));
                    wing.Add(cp);
                }
                draw_wings(canvas, wing, true);
            } // for (int i = 0; i< 7

            for (int i = 0; i < 7; i++)
            {
                switch (lines)
                {
                case "none":
                    // noStroke()
                    ProcessingSkiaSharp.noStroke(paint);
                    break;

                case "all":
                    // stroke(0, 0, 0, 60)
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, 60);
                    break;

                case "outer":
                    // noStroke()
                    ProcessingSkiaSharp.noStroke(paint);
                    break;

                case "some":
                    // stroke(0, 0, 0, helper.random_list_value([0, 60]))
                    byte randomByte = RandomUtility.GetRandomElement(random2Bytes);
                    ProcessingSkiaSharp.stroke(paint, 0, 0, 0, randomByte);
                    break;
                }
                //p = palette[int(random(0, len(palette)))]
                if (i == 3 || i == 6)
                {
                    // fill(0, 0, 100, 100)
                    ProcessingSkiaSharp.fill(paint, 0, 0, 100, 100);
                }
                else
                {
                    var p = RandomUtility.GetRandomElement <SKColor>(palette);
                    //fill(p[0], p[1], p[2], 20)
                    ProcessingSkiaSharp.fill(paint, p.Red, p.Green, p.Blue, 20);
                }

                List <SKPoint> wing = new List <SKPoint>()
                {
                    origin
                };
                foreach (int angle in range_upper_angles)
                {
                    // circle_points_list(random(0, width * 0.01), random(0, height * 0.01), random( width * 0.2, width * 0.4 ), radians( random( angle - 7, angle ) )
                    float randomAngle = RandomUtility.CreateRandom(angle - 7, angle);
                    var   cp          = circle_points_list(RandomUtility.CreateRandom(0, w * 0.01f),
                                                           RandomUtility.CreateRandom(0, h * 0.01f),
                                                           RandomUtility.CreateRandom(w * 0.1f, w * 0.2f),
                                                           (float)ProcessingSkiaSharp.radians(randomAngle));
                    wing.Add(cp);
                }
                draw_wings(canvas, wing, true);
            } // for (int i = 0; i< 7
        }