#include <stdio.h>
#include <math.h>
#include <plot_ps.h>

int main(void)
{
  int i,j,k;
  
  ps_iniplot("cubes.ps",30);
  ps_cms() ;
  ps_origin(7.,7.,0.,0.) ;
  ps_3Dsetup(10.,10.,10.,0.,10.,0.,10.,0.,10.,3.14/4.,3.14/3.,15.,10.) ;
  
  /* draw some cubes */
  for (k = 0 ; k < 3 ;k++) {
    for (j = 0 ; j < 3 ;j++) {
      for ( i=0;i < 3;i++) {
	ps_3Dbar(2.*(float)(i)+1.,2.*(float)(j)+1.,2.*(float)(k)+1.,1.,1.,1.,1) ;
      }
    }
  }
  
  ps_endplot("cubes.ps",'f');
  
  return 0;
}


syntax highlighted by Code2HTML, v. 0.9