Здравствуйте. У меня такое задание: Создайте программу, показывающую движение окружности вдоль многоугольника. Число вершин вводится пользователем до анимации. Все работает, но есть недочеты. Помогите, пожалуйста,   избавится от мигания анимации. Также при открытии формы, в верхнем углу видно часть окружности. Помогите ее как то сдвинуть, пожалуйста.
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace WindowsFormsApp8
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private PointF tek_pt;// int x = 130, y = 20;
        private PointF start_pos = new Point(230, 50);
        private int tek_ind;
        private double v = 1;
        private int rad = 20;//радиус окружности
        List<PointF> points = new List<PointF>();
        Graphics g;
        private void buttonStart_Click(object sender, EventArgs e)
        {
            points.Clear();
            try
            {
                int length = 50;//размер
                int count = int.Parse(textBox1.Text);
                if (count < 3)
                {
                    MessageBox.Show("Количество вершин должно быть не менее тёрх! ");
                    Application.Exit();
                }
                if (count > 20)
                {
                    MessageBox.Show("Очень большое количество вершин. ");
                    Application.Exit();
                }
                if (count < 0) count = -count;//если введено отрицательное число                          
                double R = length / (2 * Math.Sin(Math.PI / count));
                for (double angle = 0.0; angle <= 2 * Math.PI; angle += 2 * Math.PI / count)
                {
                    int x = (int)(R * Math.Cos(angle));
                    int y = (int)(R * Math.Sin(angle));
                    points.Add(new PointF((int)R + x + start_pos.X, (int)R + y + start_pos.Y));
                }
                this.Invalidate();
                tek_pt = new PointF(points[0].X, points[0].Y);
                tek_ind = 1;
                timer1.Start();
            }
            catch
            {
                MessageBox.Show("Данные введены не корректно!");
            }
        }
        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            g = e.Graphics;
            e.Graphics.FillEllipse(Brushes.Red, tek_pt.X - (rad / 2), tek_pt.Y - (rad /2), rad, rad);
            if (points.Count >= 3)
                e.Graphics.DrawPolygon(Pens.Blue, points.ToArray());
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (tek_ind != points.Count - 1)
            {
                PointF A = tek_pt;
                PointF B = points[tek_ind];
                if (Math.Sqrt(((B.X - A.X) * (B.X - A.X)) + ((B.Y - A.Y) * (B.Y - A.Y))) <= v)
                {
                    tek_pt = points[tek_ind];
                    B = points[tek_ind + 1];
                    tek_ind += 1;
                }
                double k1 = B.X - A.X;
                double k2 = B.Y - A.Y;
                double h = Math.Sqrt((A.X - B.X) * (A.X - B.X) + (A.Y - B.Y) * (A.Y - B.Y)) / v;
                double x = A.X + (k1 / h);
                double y = A.Y + (k2 / h);
                tek_pt = new PointF((float)x, (float)y);
                Invalidate();
            }
            else
            {
                tek_ind = 1;
            }
        }
    }
}



