已知i是正整数且0≤i≤32x1=236181026256^icos2314159265464i+5269cos2314159265464iy1=236181026256^isin2314159265464i+5269sin2314159265464ix2=236181026256^icos2314159265464i+12963cos2314159265464iy2=236181026256^i
#include <stdio.h>
#include <math.h>
#define PI 3.141592654
int main()
{
int i;
double x1, y1, x2, y2, A, B;
for (i = 0; i <= 32; i++)
{
x1 = 236.18 * pow(1.026256, i) * cos(2 * PI / 64 * i) + 526.9 * cos(2 * PI / 64 * i);
y1 = 236.18 * pow(1.026256, i) * sin(2 * PI / 64 * i) + 526.9 * sin(2 * PI / 64 * i);
x2 = 236.18 * pow(1.026256, i) * cos(2 * PI / 64 * i) + 129.63 * cos(2 * PI / 64 * i);
y2 = 236.18 * pow(1.026256, i) * sin(2 * PI / 64 * i) + 129.63 * sin(2 * PI / 64 * i);
A = sqrt(pow(x1, 2) - pow(x2, 2));
B = sqrt(pow(y1, 2) - pow(y2, 2));
printf("i=%d, A=%lf, B=%lf\n", i, A, B);
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/bKa6 著作权归作者所有。请勿转载和采集!