public static PointF Random(PointF P, PointF Center)
{
float R = (float)Math.Sqrt((P.X - Center.X) * (P.X - Center.X) + (P.Y - Center.Y) * (P.Y - Center.Y));
float RandB = Rand.Next(360); /*/ 10.0F*/;
double var = 3;
float Y = P.Y + (float)Math.Pow(Math.Sin(RandB), var) * R * 0.5F;
float X = P.X + (float)Math.Pow(Math.Cos(RandB), var) * R * 0.5F;
return new PointF(X, Y);
}
float[] Aarr = new float[] { 10, 11, 12, 13, 14, 15, 16, 17 };
int AIndex = 0;
private void timer1_Tick(object sender, EventArgs e)
{
if (AIndex == Aarr.Length - 1)
{
AIndex = 0;
}
else
{
AIndex++;
}
this.Invalidate();
}