1 // int A =-2; 2 // This. bringtofront (); 3 // For (INT I = 0; I <20; I ++) 4 // {5 // A =-A; 6 // This. location = new point (this. location. X + 6 * a, this. location. Y + 8 * A); 7 8 // thread. sleep (100); 9 10 //} 11 // 2.12 // int x = This. top; int y = This. left; 13 14 // For (INT I = 0; I <100; I ++) 15 // {16 17 // This. top = This. top + 10; 18 19 // This. left = This. left + 10; 20 21 // This. top = This. top-10; 22 23 // This. left = This. left-10; 24 25 //} 26 27 /// return to the original position 28 29 // This. top = x; 30 // This. left = y; 31 32 // 3.33 point pold = This. location; // original position 34 int radius = 3; // radius 35 for (INT n = 0; n <3; n ++) // Number of rotated circles 36 {37 // the right half circle counter-clockwise 38 for (INT I =-radius; I <= radius; I ++) 39 {40 int x = convert. toint32 (math. SQRT (radius * radius-I * I); 41 42 int y =-I; 43 44 This. location = new point (pold. X + X, pold. Y + Y); 45 46 system. threading. thread. sleep (10); 47 48 49} 50 51 // left semi-circle counter-clockwise 52 for (Int J = radius; j >=- radius; j --) 53 {54 int x =-convert. toint32 (math. SQRT (radius * radius-J * j); 55 int y =-J; 56 this. location = new point (pold. X + X, pold. Y + Y); 57 system. threading. thread. sleep (10); 58} 59} 60 61 This. location = pold;