private void Form1_Load(object sender, System.EventArgs e)
{
Graphics g=this.CreateGraphics();
Pen pen1=new Pen(Color.Red,2);
g.Clear(this.BackColor);
int a,n,cx,cy,gy,gx,flag,k;
double r,p,th,x,y,pi;
x=p1.X;y=p1.Y;
x=p2.X;y=p2.Y;
a=120;n=2;pi=3.141592;
cx=140;
cy=140;
flag=0;k=200;
for(p=1;p>=0.2;p-=0.2)
{
for(th=0;th<=2*pi+0.1;th+=pi/k)
{
r=Math.Abs(a*Math.Cos(n*th)*p);
x=(int)((r*Math.Cos(th)));
y=(int)((r*Math.Sin(th))); gx=(int)(cx+x);
gy=(int)(cy+y);
if(flag==0)
{
p1.X=gx;p1.Y=gy;flag=1; }
else 
{p2.X=gx;p2.X =gy;
g.DrawLine(pen1,p1,p2);
p1=p2;
} }flag=0;
}

}
}
}