PROCEDURE DasDigitaleStreifenhoernchen;

VAR

	pageWidth:	REAL;
	pageHeight:	REAL;
	pageFoldY: REAL;
	objectX1,objectX2:REAL;
	objectY1,objectY2,objectY0:REAL;
	width:	REAL;
	depth:	REAL;
	height:	REAL;
	widthRand:	REAL;
	n,x:		INTEGER;

BEGIN	
	n:=30;
	x:=2;
	pageWidth:=210;
	pageHeight:=297;
	pageFoldY:= pageHeight/2;
	widthRand:=20;

	penPat(2);
	penFore(0,0,65535);

	moveto(0,0);
	lineto(pageWidth,0);
	lineto(pageWidth,pageHeight);
	lineto(0,pageHeight);
	lineto(0,0);

	{*ersterStreifen*}

	height:=pageHeight-2*widthRand;
	width:=(pageWidth-2*widthRand)/n;

	objectX1:=widthRand;
	objectX2:=objectX1+width;

	objectY1:=pageFoldY-0.5*height;
	objectY2:=objectY1+height;

	{*ersten Streifen zeichnen und duplizieren*}
	penPat(2);
	penFore(0,0,65535);

	WHILE (objectX1)<=pageWidth-widthRand DO BEGIN
		moveto(objectX1,objectY1);
		lineto(objectX1,objectY2);
		objectX1:= objectX1+width;
	END;

	penPat(-2);
	penFore(65535,0,0);
	
	objectX1:=widthRand;
	
	WHILE (objectX1)<=pageWidth-widthRand-width DO BEGIN	

		WHILE	objectY1<=height+widthRand DO BEGIN
				moveto(objectX1,objectY1);
				lineto(objectX2,objectY1);
				objectY1:=objectY1+(height/x);
			
		END;

		objectY1:=pageFoldY-0.5*height;

		moveto(objectX1,objectY1);
		lineto(objectX2,objectY1);
		objectX1:= objectX1+width;
		objectX2:=objectX1+width;
		
	END;
	
	moveto(0,pageFoldY);
	lineto(widthRand,pageFoldY);
	
	moveto(pageWidth-widthRand,pageFoldY);
	lineto(pageWidth,pageFoldY);
END;
RUN(DasDigitaleStreifenhoernchen);