- for (m = 0; m < size; m++) {
- printf ("%lf: ", theta_vec[m] + PI/2. + theta_base);
- double step = d * cos(theta_vec[m]);
- for (int id = 0; id < size; id++) {
- printf ("%lf ", id * step);
+ for (m = 0; m < size; m++) {
+ double step = d * cos(theta_vec[m]);
+ for (int id = min; id <= max; id++) {
+ double r = id * step;
+ double x = r * cos(theta_vec[m] + PI/2 + theta_base);
+ double y = r * sin(theta_vec[m] + PI/2 + theta_base);
+ printf ("%lf,%lf ", x, y);
+ }
+ printf ("\n");
+ }
+ } else {
+ int m;
+ for (m = 0; m < size; m++) {
+ if (! opt_polar_rt)
+ printf ("%lf: ", theta_vec[m] + theta_base);
+ double step = d * cos(theta_vec[m]);
+ for (int id = min; id <= max; id++) {
+ if (opt_polar_rt)
+ printf ("%lf,", theta_vec[m] + theta_base);
+ printf ("%lf ", id * step);
+ }
+ printf ("\n");
+ }
+
+ for (m = 0; m < size; m++) {
+ if (! opt_polar_rt)
+ printf ("%lf: ", theta_vec[m] + PI/2 + theta_base);
+ double step = d * cos(theta_vec[m]);
+ for (int id = min; id <= max; id++) {
+ if (opt_polar_rt)
+ printf ("%lf,", theta_vec[m] + PI/2 + theta_base);
+ printf ("%lf ", id * step);
+ }
+ printf ("\n");