🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` int isFirsttimeEqualp1p2 = 0; for (int i1 = (609.4-10); i1 <= (611.5+10); ++i1) {//for1100 //for (int i1 = 0; i1 < 3601; ++i1) {//for1100 long double c1_rad1 = long double((long double)Pild*i1 / 180) /10; double c1_a001 = C1_200_R01 * cos(c1_rad1); //int c1_a001 = C1_200_R01 * cos(c1_rad1); double c1_b001 = C1_200_R01 * sin(c1_rad1); //int c1_b001 = C1_200_R01 * sin(c1_rad1); // //2号圆(下圆) for (int j2 = (143.5-10); j2 <=(145.5+10); ++j2) {//for1200 //for (int j2 = 144.50; j2 <= 145.00; ++j2) {//for1200 long double c2_rad02 = long double((long double)Pild*j2 / 180)/10; uint64_t uint64_c2_a001= long double((long double)hPi / 9000 * j2) * cos(c2_rad02); //必须:全部化为 uint64的大长整数运算 uint64_t uint64_c2_b002= long double((long double)hPi / 9000 * j2) *sin(c2_rad02); double c2_a001 = C2_200_R02 * cos(c2_rad02); //int c2_a001 = C2_200_R02 * cos(c2_rad02); double c2_b002 = C2_200_R02 * sin(c2_rad02); //int c2_b002 = C2_200_R02 * sin(c2_rad02); //两个坐标的4个值取精度,后比较 int intc1_a001 = c1Apianyi_A1 * 100 + int((double)c1_a001 * 100); int intc1_b001 = c1Bpianyi_B1 * 100 + c1_b001 *100; int intc2_a001 = c2Apianyi_A2 * 100 + c2_a001 *100; int intc2_b002 = c2Bpianyi_B2 * 100 + c2_b002 *100; outStream << "[C1rad:" << c1_rad1 << "]:"; outStream << "C1角度:" << i1 << "]"; outStream << "[c1A1:" << intc1_a001 << "]"; outStream << "[c1B1:" << intc1_b001 << "]"; outStream << "[C2rad2:" << c2_rad02 << "]:"; outStream << "C2角度:" << j2 << "]"; outStream << "-[c2A1:" << intc2_a001 << "]"; outStream << "[c2B1:" << intc2_b002 << "]" << endl; ``` ![](https://box.kancloud.cn/6bdb96c6eedf1ab0d477bc3dd93466a5_637x431.png) 二、 再次逼近: 1、 [isFirsttimeEqualp1p:0][C1rad:1.064650873343149672933805049979127943515777587890625]:C1角度:610][c1A1:193.9238377337284191526123322546482086181640625][c1B1:349.847888601064141766983084380626678466796875][C2rad2:0.249582089980443344590099741253652609884738922119140625]:C2角度:143]-[c2A1:193.8031459382797265789122320711612701416015625][c2B1:49.39980389056069753905831021256744861602783203125] [isFirsttimeEqualp1p:0][C1rad:1.064650873343149672933805049979127943515777587890625]:C1角度:610][c1A1:193.9238377337284191526123322546482086181640625][c1B1:349.847888601064141766983084380626678466796875][C2rad2:0.25132741928100588157946049250313080847263336181640625]:C2角度:144]-[c2A1:193.716631877867627054001786746084690093994140625][c2B1:49.7379787877906807125327759422361850738525390625] 2、 ``` [isFirsttimeEqualp1p:0][C1rad:1.064650873343149672933805049979127943515777587890625]:C1角度:610][c1A1:193.9238377337284191526123322546482086181640625][c1B1:349.847888601064141766983084380626678466796875][C2rad2:0.251501952211062140829511690753861330449581146240234375]:C2角度:1441]-[c2A1:193.70794801226560366558260284364223480224609375][c2B1:49.7717879614285294564979267306625843048095703125] [isFirsttimeEqualp1p:0][C1rad:1.064650873343149672933805049979127943515777587890625]:C1角度:610][c1A1:193.9238377337284191526123322546482086181640625][c1B1:349.847888601064141766983084380626678466796875][C2rad2:0.251676485141118344568411657746764831244945526123046875]:C2角度:1442]-[c2A1:193.69925824598175267965416423976421356201171875][c2B1:49.80559561893091569118041661567986011505126953125] ``` 3、再逼: ``` [isFirsttimeEqualp1p:0][C1rad:1.0653490050633747099340098429820500314235687255859375]:C1角度:6104][c1A1:193.67955058721821615108638070523738861083984375][c1B1:349.9831877166861886507831513881683349609375][C2rad2:0.252374616861343381568616450749686919152736663818359375]:C2角度:1446]-[c2A1:193.664440179324657265169662423431873321533203125][c2B1:49.9408110669899798494952847249805927276611328125] [isFirsttimeEqualp1p:0][C1rad:1.0653490050633747099340098429820500314235687255859375]:C1角度:6104][c1A1:193.67955058721821615108638070523738861083984375][c1B1:349.9831877166861886507831513881683349609375][C2rad2:0.2525491497913996408186676490004174411296844482421875]:C2角度:1447]-[c2A1:193.655720913605733812801190651953220367431640625][c2B1:49.97461112836848684537471854127943515777587890625] ``` 4、逼Again: ``` [isFirsttimeEqualp1p:0][C1rad:1.0653490050633747099340098429820500314235687255859375]:C1角度:6104][c1A1:193.67955058721821615108638070523738861083984375][c1B1:349.9831877166861886507831513881683349609375][C2rad2:0.2525491497913996408186676490004174411296844482421875]:C2角度:14470]-[c2A1:193.655720913605733812801190651953220367431640625][c2B1:49.97461112836848684537471854127943515777587890625] [isFirsttimeEqualp1p:0][C1rad:1.0653490050633747099340098429820500314235687255859375]:C1角度:6104][c1A1:193.67955058721821615108638070523738861083984375][c1B1:349.9831877166861886507831513881683349609375][C2rad2:0.25256660308440526119255764569970779120922088623046875]:C2角度:14471]-[c2A1:193.654848662579439633191213943064212799072265625][c2B1:49.9779910507960636323332437314093112945556640625] ``` 5、5次逼近: [isFirsttimeEqualp1p:0][C1rad:1.0654362715284031448703672140254639089107513427734375]:C1角度:61045][c1A1:193.64900805416846196749247610569000244140625][c1B1:350.000088113755509766633622348308563232421875][C2rad2:0.252671322842439038947048857153276912868022918701171875]:C2角度:14477]-[c2A1:193.649613917627590353731648065149784088134765625][c2B1:49.99827026561799669934771372936666011810302734375] [isFirsttimeEqualp1p:0][C1rad:1.0654362715284031448703672140254639089107513427734375]:C1角度:61045][c1A1:193.64900805416846196749247610569000244140625][c1B1:350.000088113755509766633622348308563232421875][C2rad2:0.252688776135444659320938853852567262947559356689453125]:C2角度:14478]-[c2A1:193.648741253672369566629640758037567138671875][c2B1:50.00165008145478395817917771637439727783203125] 结论: 最近的相交点在: 大圆:61.045度 交小圆于:144.78度 (14.478度?) (相对)交点坐标为:(相对交点坐标即绘图 前,相对于各自圆心的偏移坐标……) X(A):193.648741253672369566629640758037567138671875 Y(B):50.00165008145478395817917771637439727783203125 ``` 日志: [C1rad:1.06544]:C1角度:61045][c1A1:593649][c1B1:350000][C2rad2:0.252671]:C2角度:14477]-[c2A1:593650][c2B1:349998] [C1rad:1.06544]:C1角度:61045][c1A1:593649][c1B1:350000][C2rad2:0.252689]:C2角度:14478]-[c2A1:593649][c2B1:350002] [C1rad:1.06544]:C1角度:61045][c1A1:593649][c1B1:350000][C2rad2:0.252706]:C2角度:14479]-[c2A1:593648][c2B1:350005] ``` ``` …… [isFirsttimeEqualp1p:0][C1rad:1.0654362715284031448703672140254639089107513427734375]:C1角度:61045][c1A1:193.64900805416846196749247610569000244140625][c1B1:350.000088113755509766633622348308563232421875][C2rad2:0.252671322842439038947048857153276912868022918701171875]:C2角度:14477]-[c2A1:193.649613917627590353731648065149784088134765625][c2B1:49.99827026561799669934771372936666011810302734375],{此时欧式距离:3.6814667045746904960878964629955589771270751953125} [isFirsttimeEqualp1p:0][C1rad:1.0654362715284031448703672140254639089107513427734375]:C1角度:61045][c1A1:193.64900805416846196749247610569000244140625][c1B1:350.000088113755509766633622348308563232421875][C2rad2:0.252688776135444659320938853852567262947559356689453125]:C2角度:14478]-[c2A1:193.648741253672369566629640758037567138671875][c2B1:50.00165008145478395817917771637439727783203125],{此时欧式距离:2.5066927555923115278346813283860683441162109375} ``` [isFirsttimeEqualp1p:0][C1rad:1.0654362715284031448703672140254639089107513427734375]:C1角度:61045][c1A1:193.64900805416846196749247610569000244140625][c1B1:350.000088113755509766633622348308563232421875][C2rad2:0.252688776135444659320938853852567262947559356689453125]:C2角度:14478]-[c2A1:193.648741253672369566629640758037567138671875][c2B1:50.00165008145478395817917771637439727783203125],{此时欧式距离:2.5066927555923115278346813283860683441162109375} 61.045 和 14.478 就是 两圆角度的答案。