Procedure ArtLine;
CONST
{rechtecklaenge}
rectLength = 2;
VAR
numbOfRect : INTEGER;
deltaX, p1x, p1y, p2x, p2y, rowEndPoint, distBetweenRects : REAL;
{zaehlervariablen}
i : INTEGER;
rowEndPointX,rowEndPointY : REAL;
BEGIN
numbOfRect := IntDialog('Wie viele Linien sollen gezeichnet werden (ab 5000 wirds so richtig geil!)?','100');
REPEAT
message('Bitte klicke um zu beginnen!');
UNTIL MouseDown(rowEndPointX,rowEndPointY);
message('rowEndPointX',rowEndPointX , 'rowEndPointY' , rowEndPointY);
distBetweenRects := (rowEndPointX - (numbOfRect* rectLength))/numbOfRect;
FOR i:= 1 TO numbOfRect DO BEGIN
deltaX := rectLength + distBetweenRects;
p1x := i * deltaX;
p1y := random * 100;
p2x := p1x + rectLength;
p2y := p1y + rectLength;
FillBack(random * 65535, random * 65535, random * 65535);
rect(p1x, p1y, p2x, p2y);
END;
{Kopiräit: Gruppe Chrisa}
END;
RUN(ArtLine);