Advertisement
caeles-lupus

q200209049

Apr 27th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.64 KB | None | 0 0
  1. uses graphabc;
  2. var bas_x,bas_y,R:integer;
  3.  
  4. procedure OCircle(x0,y0,r0:integer);
  5. var x,y,t,step:real;
  6. begin
  7. step := (2*Pi)/36;
  8. t := 0;
  9. while t<=2*Pi do begin
  10. y := r0*cos(t);
  11. x := r0*sin(t);
  12. circle(x0+Round(x),y0-Round(y),5);
  13. t := t + step;
  14. end;
  15. end;
  16.  
  17. BEGIN
  18.   bas_x := windowwidth div 2;
  19.   bas_y := windowheight div 2;
  20.   R := 50; // радиус колец
  21.  
  22.   SetPencolor(clBlue);
  23.   OCircle(bas_x-2*R,bas_y-R,R);
  24.   SetPencolor(clOrange);
  25.   OCircle(bas_x-R,bas_y,R);
  26.   SetPencolor(clBlack);
  27.   OCircle(bas_x,bas_y-R,R);
  28.   SetPencolor(clGreen);
  29.   OCircle(bas_x+R,bas_y,R);
  30.   SetPencolor(clRed);
  31.   OCircle(bas_x+2*R,bas_y-R,R);
  32. END.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement