PROCEDURE falten1;

VAR

	pageWidth: REAL;
	pageHeight: REAL;
	pageFoldY: REAL;
	X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,X13,X14:REAL;
	Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,Y10,Y11,Y12,Y13,Y14,Y15,Y16:REAL;
	width: REAL;
	depth: REAL;
	height: REAL;
	
BEGIN

	pageWidth:=210;
	pageHeight:=297;
	pageFoldY:=pageHeight/2;

	height:=140;
	width:=14;
	depth:=height;

	X1:=width; X2:=X1+width; X3:=X2+width; X4:=X3+width; X5:=X4+width; X6:=X5+width; X7:=X6+width; X8:=X7+width; X9:=X8+width; X10:=X9+width; X11:=X10+width; X12:=X11+width; X13:=X12+width; X14:=X13+width; 
	Y1:=(pageHeight+height)/2; Y2:=Y1-10; Y3:=Y2-10; Y4:=Y3-10; Y5:=Y4-10; Y6:=Y5-10; Y7:=Y6-10; Y8:=Y7-10; Y16:=(pageHeight-height)/2; Y15:=Y16+10; Y14:=Y15+10; Y13:=Y14+10; Y12:=Y13+10; Y11:=Y12+10; Y10:=Y11+10; Y9:=Y10+10;

	{*schneiden blatt*}

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

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

	{*schneiden kanten*}

	moveto(X1,Y1);lineto(X1,Y16); moveto(X2,Y2);lineto(X2,Y15); moveto(X3,Y3);lineto(X3,Y14); moveto(X4,Y4);lineto(X4,Y13); moveto(X5,Y5);lineto(X5,Y12); moveto(X6,Y6);lineto(X6,Y11); moveto(X7,Y7);lineto(X7,Y10);
	moveto(X14,Y1);lineto(X14,Y16); moveto(X13,Y2);lineto(X13,Y15); moveto(X12,Y3);lineto(X12,Y14); moveto(X11,Y4);lineto(X11,Y13); moveto(X10,Y5);lineto(X10,Y12); moveto(X9,Y6);lineto(X9,Y11); moveto(X8,Y7);lineto(X8,Y10);

	{*falten oben*}

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

	moveto(0,Y1); lineto(X1,Y1); moveto(X1,Y2); lineto(X2,Y2); moveto(X2,Y3); lineto(X3,Y3); moveto(X3,Y4); lineto(X4,Y4); moveto(X4,Y5); lineto(X5,Y5); moveto(X5,Y6); lineto(X6,Y6); moveto(X6,Y7); lineto(X7,Y7); moveto(X7,Y8); lineto(X8,Y8); 	
	moveto(X8,Y7); lineto(X9,Y7); moveto(X9,Y6); lineto(X10,Y6); moveto(X10,Y5); lineto(X11,Y5); moveto(X11,Y4); lineto(X12,Y4); moveto(X12,Y3); lineto(X13,Y3); moveto(X13,Y2); lineto(X14,Y2);moveto(X14,Y1);lineto(pageWidth,Y1);

	{*falten mitte*}

	moveto(0,pageFoldY); lineto(X1,pageFoldY); lineto(X2,pageFoldY); lineto(X3,pageFoldY); lineto(X4,pageFoldY); lineto(X5,pageFoldY); lineto(X6,pageFoldY); lineto(X7,pageFoldY); lineto(X8,pageFoldY);
	lineto(X9,pageFoldY); lineto(X10,pageFoldY); lineto(X11,pageFoldY); lineto(X12,pageFoldY); lineto(X13,pageFoldY); lineto(X14,pageFoldY); lineto(pageWidth,pageFoldY); 

	{*falten unten*}

	moveto(0,Y16); lineto(X1,Y16); moveto(X1,Y15); lineto(X2,Y15); moveto(X2,Y14); lineto(X3,Y14); moveto(X3,Y13); lineto(X4,Y13); moveto(X4,Y12); lineto(X5,Y12); moveto(X5,Y11); lineto(X6,Y11); moveto(X6,Y10); lineto(X7,Y10); moveto(X7,Y9); lineto(X8,Y9); 	
	moveto(X8,Y10); lineto(X9,Y10); moveto(X9,Y11); lineto(X10,Y11); moveto(X10,Y12); lineto(X11,Y12); moveto(X11,Y13); lineto(X12,Y13); moveto(X12,Y14); lineto(X13,Y14); moveto(X13,Y15); lineto(X14,Y15);moveto(X14,Y16);lineto(pageWidth,Y16);

END;
RUN(falten1);