Spirala - grafika
Zaproszenie

Witamy na stronach edukacyjnych

dla nauczycieli, studentów i uczniów szkół średnich w zakresie

informatyki i systemów mikroprocesorowych

Home Turbo Pascal Rozszerzenie Spirala - grafika
malastandardduza
Spirala - grafika
Program Spirala;

Uses
  Crt, Graph;
Const
  Delta = 10;         
Var
  x,                  
  y,                 
  dl : Integer;     

Procedure Inicjuj_Grafike;
Var
  Sterownik, Tryb : Integer;
Begin
  DetectGraph(Sterownik, Tryb);
  InitGraph(Sterownik, Tryb, 'c:\tp\bgi')
End;

Procedure Spirala(x,y,dl,del : Integer);
Begin
  If dl > 0
    Then Begin
           LineTo(x+dl,y);
           LineTo(x+dl,y+dl);
           LineTo(x+del, y+dl);
           LineTo(x+del, y+del);
           Spirala(x+del, y+del, dl-2*del, del)
         End;
End;

Begin
  Inicjuj_Grafike;
  MoveTo(90,50);
  Spirala(GetX, GetY, GetMaxX div 2, Delta);
  Repeat Until KeyPressed;
  CloseGraph;
End.

 

Statystyka

Użytkowników : 1
Artykułów : 65
Odsłon : 2282403

Online

Naszą witrynę przegląda teraz 6 gości 
Design: ZS Zychlin