#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>

//#define WIDTH 70 //横幅
//#define HEIGHT 40 //縦の長さ
//#define MAXSTAR 300 //星の数

#define WIDTH 100 //横幅
#define HEIGHT 100 //縦の長さ
#define MAXSTAR 1100 //星の数

int main()
{
  srand((unsigned) time(NULL));
  
  char matrix[HEIGHT][WIDTH];
  int x,y;

  // Initialization                                                                                                                                             
  for (y=0 ; y<HEIGHT ; y++){
    for (x=0 ; x<WIDTH ; x++ ){
      // '.'で初期化
      matrix[y][x] = ' ';
    }
  }

  // Set value
  int i=0;
  while(i<MAXSTAR){
    x = rand()%WIDTH;
    y = rand()%HEIGHT;
    // printf("x=%d y=%d\n", x, y);
    if(matrix[y][x] != '*'){
      matrix[y][x] = '*';
      i++;
    }
  }


  // Print                                                                                                                                                            
printf("\\begin{picture}(%d,%d)\n", WIDTH, HEIGHT);




  for (y=0 ; y<HEIGHT ; y++ ){

    for (x=0 ; x<WIDTH ; x++ ){
      
     if(matrix[y][x] == '*')
	printf("\\put(%d,%d){\\circle*{0.8}}\n", y, x);
      
    }
    
    
  }

printf("\\end{picture}\n", WIDTH, HEIGHT);
  
  return 0;
}
