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

int main(int argc, char **argv) {

 int theta_steps = 20;
 int phi_steps = 20;
 double theta_min = 0.0;
 double theta_max = M_PI;
 double phi_min = 0.0;
 double phi_max = 2*M_PI;
 double theta_step;
 double phi_step;
 double theta, phi, x, y, z;

 for (phi_step = 0; phi_step < phi_steps; phi_step ++) {
 for (theta_step = 0; theta_step < theta_steps; theta_step ++) {
 
  theta = theta_min + theta_step*(theta_max-theta_min)/theta_steps;
  phi = phi_min + phi_step*(phi_max - phi_min)/phi_steps;

    x = (phi/M_PI)*sin(theta)*cos(phi);
    y = (phi/M_PI)*sin(theta)*sin(phi);
    z = (phi/M_PI)*cos(theta) + phi;

    printf("%0.5lf %0.5lf %0.5lf\n",x,y,z);
  }
 }
}
