back to the text
/*--------------------------------------------------
 *
 *  CUBICVOLUME.h
 *
 *--------------------------------------------------*/
	
void gridx(void)
{	/* x grid line coords */
	static float xvert0[3] = { -5.0,  0.0,  0.0};
	static float xvert1[3] = {  5.0,  0.0,  0.0};		
										
	cpack(0x000000);
	bgnline();
	v3f(xvert0); v3f(xvert1);				
	endline();
}

/*--------------------------------------------------*/
	
void gridz(void)
{	/* z grid line coords */
	static float zvert0[3] = {  0.0,  0.0, -5.0};
	static float zvert1[3] = {  0.0,  0.0,  5.0};		
															
	cpack(0x000000);	
	bgnline();
	v3f(zvert0); v3f(zvert1);				
	endline();
}

/*--------------------------------------------------*/

void gridy(void)
{	/* y grid line coords */
	static float yvert0[3] = {  0.0, -5.0, 0.0};
	static float yvert1[3] = {  0.0,  5.0, 0.0};		
															
	cpack(0x000000);	
	bgnline();
	v3f(yvert0); v3f(yvert1);				
	endline();
}

/*--------------------------------------------------*/

void cubicx(void)
{
	gridx();
		pushmatrix();
		translate(0.0, 0.0, 1.0);
		 gridx();
		translate(0.0, 0.0, 1.0);
		 gridx();
		translate(0.0, 0.0, 1.0);
		 gridx();
		translate(0.0, 0.0, 1.0);
		 gridx();			 
		translate(0.0, 0.0, 1.0);
		 gridx();			 
		
		popmatrix();
		
		pushmatrix();
		translate(0.0, 0.0, -1.0);
		 gridx();
		translate(0.0, 0.0, -1.0);
		 gridx();
		translate(0.0, 0.0, -1.0);
		 gridx();
		translate(0.0, 0.0, -1.0);
		 gridx();			 
		translate(0.0, 0.0, -1.0);
		 gridx();			 
		
		popmatrix();
}

/*--------------------------------------------------*/

void cubicz(void)
{
	gridz();
		pushmatrix();
		translate(1.0, 0.0, 0.0);
		 gridz();
		translate(1.0, 0.0, 0.0);
		 gridz();
		translate(1.0, 0.0, 0.0);
		 gridz();
		translate(1.0, 0.0, 0.0);
		 gridz();
		translate(1.0, 0.0, 0.0);
		 gridz();
		
		popmatrix();

		pushmatrix();
		translate(-1.0, 0.0, 0.0);
		 gridz();
		translate(-1.0, 0.0, 0.0);
		 gridz();
		translate(-1.0, 0.0, 0.0);
		 gridz();
		translate(-1.0, 0.0, 0.0);
		 gridz();
		translate(-1.0, 0.0, 0.0);
		 gridz();
		
		popmatrix();
}

/*--------------------------------------------------*/

void cubicy(void)
{
	gridy();
		pushmatrix();
		translate(1.0, 0.0, 0.0);
		 gridy();
		translate(1.0, 0.0, 0.0);
		 gridy();
		translate(1.0, 0.0, 0.0);
		 gridy();
		translate(1.0, 0.0, 0.0);
		 gridy();
		translate(1.0, 0.0, 0.0);
		 gridy();
		
		popmatrix();

		pushmatrix();
		translate(-1.0, 0.0, 0.0);
		 gridy();
		translate(-1.0, 0.0, 0.0);
		 gridy();
		translate(-1.0, 0.0, 0.0);
		 gridy();
		translate(-1.0, 0.0, 0.0);
		 gridy();
		translate(-1.0, 0.0, 0.0);
		 gridy();
		
		popmatrix();
}

/*--------------------------------------------------*/
		
void cubicvolume(void)
{
	pushmatrix();
		translate(0.0, -5.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();
		translate(0.0, 1.0, 0.0);
		 cubicx();
		 cubicz();		
	popmatrix();

	pushmatrix();
		translate(0.0, 0.0, -5.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();
		translate(0.0, 0.0, 1.0);
		 cubicy();		
	popmatrix();
}

/*--------------------------------------------------*/