int i = 0, j = 0, size = 10;

struct point_or_shape {
  point pt;
  shape shp;
};

int add_point_or_shape(int  x, int y, struct point_or_shape pos){
  if(x == y || x == size - y - 1)
    add_shape(pos.shp);
  else
    add_point(pos.pt);
  return 0;
}

int main(){
  struct point_or_shape pos;
  point pt;
  shape shp;

  for(i = 0; i < size; i=i++){
    for(j = 0; j < size; j=j++){
      pt.x=0.2*j+0.1-1.0;
      pt.y=-0.2*i-0.1+1.0;
      pt.vx=pt.y+pt.x;
      pt.vy=pt.x-pt.y;
      pt.r=pt.x/2.0+0.5;
      pt.g=pt.y/2.0+0.5;
      pt.b=0.0;
      shp.size=0.2;
      shp.x=0.2*j+0.1-1.0;
      shp.y=-0.2*i-0.1+1.0;
      shp.vy=shp.x/2.0+shp.y;
      shp.vx=shp.y/2.0-shp.x;
      shp.r=shp.x/2.0+0.5;
      shp.g=shp.y/2.0+0.5;
      shp.b=1.0;
      shp.omega=1.0;
      pos.pt = pt;
      pos.shp = shp;
	  wait(0.05);
      add_point_or_shape(j, i, pos);
    }
  }
  for(i=0;i<size*size;i=i++){
	  wait(0.05);
  	pop_shape();
	pop_point();
  }
 
  return 0;
}
