public class bird { System.Drawing.Graphics zona_des; int x, y, x0, y0, w; public void set_zbor(Color culoare_aripi, Color culoare_stergere, int alfa_gr) { zona_des.FillEllipse(new SolidBrush(culoare_stergere), x0 - 1, y0 - 1, w + 2, w + 2); double alfa_r = 2 * System.Math.PI * (alfa_gr) / 360;// unghiul in radiani x = System.Convert.ToInt16(x0 + w / 2 * (1 + System.Math.Cos(alfa_r))); y = System.Convert.ToInt16(y0 + w / 2 * (1 - System.Math.Sin(alfa_r))); zona_des.DrawLine(new Pen(culoare_aripi), x0 + w / 2, y0 + w / 2, x, y); alfa_r = 2 * System.Math.PI * (180 - alfa_gr) / 360;// unghiul in radiani x = System.Convert.ToInt16(x0 + w / 2 * (1 + System.Math.Cos(alfa_r))); y = System.Convert.ToInt16(y0 + w / 2 * (1 - System.Math.Sin(alfa_r))); zona_des.DrawLine(new Pen(culoare_aripi), x0 + w / 2, y0 + w / 2, x, y); } public bird(System.Drawing.Graphics desen, int pozx, int pozy, int lat) { zona_des = desen; x0 = pozx; y0 = pozy; w = lat; } }