I'm trying to find out what equation to use in the x and y point finder for this program. I need it to find the 15 points on the circle that is divided into 16 separate pieces. You of course input the center point and the first one. I made an array to store the points that are found, but as to how to get the points is at a loss for me at the moment. Any help would be appreciated.
You need variables for the circles center location.
This code won't work because x and y are names of arrays.
1 2 3 4 5
cout << "Enter the coordinates of the center point: \n";
cout << "X Coordinate: ";
cin >> x;
cout << "Y Coordinate: ";
cin >> y;
I'll use xc and yc for the center coords. Appropriate equations for lines 37 and 42 could be: x[i] = xc + radius*cos(2*PI*(double)i/14.0);
and y[i] = yc + radius*sin(2*PI*(double)i/14.0);
You will need to define PI.