<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                探討誤差: 注1: 以下 歐氏距離,指誤差,且是方差,即歐氏平方距離(省去開方)。 [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} P1點: ``` [isFirsttimeEqualp1p:0][C1rad:1.06535]:C1角度:6104][c1A1:193.68][c1B1:349.983][C2rad2:0.252549]:C2角度:14470]-[c2A1:193.656][c2B1:49.9746],{此時歐式距離:615.474} [isFirsttimeEqualp1p:0][C1rad:1.06535]:C1角度:6104][c1A1:193.68][c1B1:349.983][C2rad2:0.252567]:C2角度:14471]-[c2A1:193.655][c2B1:49.978],{此時歐式距離:610.292} ``` 結果:C1:61.045 C2:14.478 P2點: [isFirsttimeEqualp1p:0][C1rad:2.07602]:C1角度:118947][c1A1:-193.6][c1B1:350.027] [C2rad2:2.88852]:C2角度:1655]-[c2A1:-193.63][c2B1:50.076],{此時歐式距離:3261.3} 結果: C1:118.955 C2:165.522 驗算: C1: 118.955-90 = 28.955 61.045-90== -28.955 C2: 90- 14.478= 75.522 90-165.522= 75.522 完全吻合了! 下面是作圖的結果: ![](https://box.kancloud.cn/a0a35f350e9e58139d49e4b4be562fda_855x732.png) 注意上圖中: 紅、藍相交的就是迭代求出的結合點了。 迭代求重合點的核心代碼: ``` //P2點//for21100 long double Shortest_euclidDistance02 = 999999999999999.9; for (int i1 = (119000 -1000); i1 <= (119000+1000); ++i1) {//for21100 //for (int i1 = 0; i1 < 3601; ++i1) {//for1100 // long double c1_rad1 = long double((long double)hPi / 900 * i1) / 1000000000000000000 / 10; // 1000000000000000000; //10^18倍的PI; long double c1_rad1 = long double((long double)Pild*i1 / 180) / 1000; //等價(但不太精確的)表達 long double c1_rad1 = Pild * i1 / 180 /10; long double c1_a001 = C1_200_R01 * cos(c1_rad1); //int c1_a001 = C1_200_R01 * cos(c1_rad1); long double c1_b001 = C1_200_R01 * sin(c1_rad1); //int c1_b001 = C1_200_R01 * sin(c1_rad1); // //2號圓(下圓) for (int j2 = (165000/100)-10; j2 <= ( 166100/100 )+10; ++j2) { //for (int j2 = (3500-500); j2 <= ( 3600+500 ); ++j2) { long double c2_rad02 = long double((long double)Pild*j2 / 180) / 10;// 00; //;// / 100; // 1000; // / 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); long double c2_a001 = C2_200_R02 * cos(c2_rad02); //int c2_a001 = C2_200_R02 * cos(c2_rad02); long double c2_b002 = C2_200_R02 * sin(c2_rad02); //int c2_b002 = C2_200_R02 * sin(c2_rad02); //兩個坐標的4個值取精度,后比較 long double intc1_a001 = c1Apianyi_A1 * 1000 + int((double)c1_a001 * 1000); long double intc1_b001 = c1Bpianyi_B1 * 1000 + c1_b001 * 1000; long double intc2_a001 = c2Apianyi_A2 * 1000 + c2_a001 * 1000; long double intc2_b002 = c2Bpianyi_B2 * 1000 + c2_b002 * 1000; 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; // // EduclidDistanceOrWhethShortest參數 (x1,y1,x2,y2); if (Shortest_euclidDistance02 > EduclidDistanceOrWhethShortest(intc1_a001, intc1_b001, intc2_a001, intc2_b002)) {//if2100 Shortest_euclidDistance02 = EduclidDistanceOrWhethShortest(intc1_a001, intc1_b001, intc2_a001, intc2_b002); outStrea0m2 << "[isFirsttimeEqualp1p:" << isFirsttimeEqualp1p2 << "]"; outStrea0m2 << "[C1rad:" << c1_rad1 << "]:"; outStrea0m2 << "C1角度:" << i1 << "]"; outStrea0m2 << "[c1A1:" << c1_a001 << "]"; outStrea0m2 << "[c1B1:" << c1_b001 << "]"; outStrea0m2 << "[C2rad2:" << c2_rad02 << "]:"; outStrea0m2 << "C2角度:" << j2 << "]"; outStrea0m2 << "-[c2A1:" << c2_a001 << "]"; outStrea0m2 << "[c2B1:" << c2_b002 << "]"; outStrea0m2 << ",{此時歐式距離:" << Shortest_euclidDistance02 << "}" << endl; }//if2100 else if ( ((intc1_a001) == (intc2_a001)) && ((intc1_b001) == (intc2_b002))) { //if2100 SetPixe02(hdc, c2Apianyi_A2 + c2_a001, c2Bpianyi_B2 + c2_b002, RGB(255, 0, 0));//紅 0, 0, 228));//暗紅 ++isFirsttimeEqualp1p2; // cout << "[isFirsttimeEqualp1p:" << isFirsttimeEqualp1p2 << "]"; cout << "[C1rad:" << c1_rad1 << "]:"; cout << "C1角度:" << i1 << "]"; cout << "[c2B1:" << c2_b002 << "]" << endl; if (1 == isFirsttimeEqualp1p2) {//if3100 p01.a1 = intc2_a001; p01.b1 = intc1_b001; }//if3100 // if (2 == isFirsttimeEqualp1p2) {//if3200 p02.a1 = intc2_a001; p02.b1 = intc1_b001; }//if3200 // }//if2100 else {//if2100else2100 SetPixe02(hdc, c2Apianyi_A2 + c2_a001, c2Bpianyi_B2 + c2_b002, RGB(255, 0, 0));//暗藍 }//if2100else2100 }//for1200 // SetPixe02(hdc, c1Apianyi_A1 + c1_a001, c1Bpianyi_B1 + c1_b001, RGB(0, 255, 0) ); //亮綠 128, 0));//暗綠 }//for21100 //P2點//for21100-End ``` 再帖一下 兩個(重合)點的求法與作圖的方法, 1、先貼結果圖: 要注意,綠色和紅色的兩個相交點…… ![](https://box.kancloud.cn/75c4618f2523ddac1f13b01ed275caab_771x541.png) 2、再帖(較完整)代碼: ``` // Project1clzz002billiard181010b2.cpp : 定義應用程序的入口點。 // #include "stdafx.h" #include "Project1clzz002billiard181010b2.h" #include <iostream> #include <iomanip> #include <fstream> using namespace std; #define MAX_LOADSTRING 100 // 全局變量: //浮點數計PI(π): long double PIld = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196; //輸出有效為: 3.141592653589793115997963468544185161590576171875 //有效位: 3.141592653589793 //等價 //PILD01=3.141592653589793; long double Pi2ld = 3.1415926535897932; // uint64_t PI_uint64t = 3141592653589793238; //31415926535897932384;//整數常量太大 uint64_t halfPI_uint64t = 15707963267948966192; // halfPI=90度; 157079632679489661923;整數常量太大 uint64_t hPi = 15707963267948966192;// halfPI=90度; // HINSTANCE hInst; // 當前實例 WCHAR szTitle[MAX_LOADSTRING]; // 標題欄文本 WCHAR szWindowClass[MAX_LOADSTRING]; // 主窗口類名 // struct Position0old1 { //定義交點位置 int a1; int b1; } p0old1, p0old2; struct Position001 { //定義交點位置 double c1angle; //角度 double c2angle; double a1; //坐標 double b2; }; Position001 P01 = { 61.045, 14.478}; Position001 P02 = { 118.955, 165.522 }; // 此代碼模塊中包含的函數的前向聲明: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); // TODO: 在此處放置代碼。 // //調用Console控制臺 AllocConsole(); #pragma warning(disable:4996) _tfreopen(TEXT("CONOUT$"), TEXT("w"), stdout); _tfreopen(TEXT("CONOUT$"), TEXT("w"), stderr); _tfreopen(TEXT("CONIN$"), TEXT("r"), stdin); #pragma warning(default:4996) _tsetlocale(LC_ALL, TEXT("chs")); // cout << setprecision(99) << PIld << endl; cout << setprecision(99) << Pi2ld << endl; // // 初始化全局字符串 LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadStringW(hInstance, IDC_PROJECT1CLZZ002BILLIARD181010B2, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // 執行應用程序初始化: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_PROJECT1CLZZ002BILLIARD181010B2)); MSG msg; // 主消息循環: while (GetMessage(&msg, nullptr, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return (int) msg.wParam; } // // 函數: MyRegisterClass() // // 目標: 注冊窗口類。 // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEXW wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_PROJECT1CLZZ002BILLIARD181010B2)); wcex.hCursor = LoadCursor(nullptr, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_PROJECT1CLZZ002BILLIARD181010B2); wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); return RegisterClassExW(&wcex); } // // 函數: InitInstance(HINSTANCE, int) // // 目標: 保存實例句柄并創建主窗口 // // 注釋: // // 在此函數中,我們在全局變量中保存實例句柄并 // 創建和顯示主程序窗口。 // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { hInst = hInstance; // 將實例句柄存儲在全局變量中 HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr); if (!hWnd) { return FALSE; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE; } // // //p01 定義:當1號圓(大圓)在上的時候,0度位置(右側)的為p01,左側為p02 // 當1號圓(大圓)在左的時候,90度位置(上方)的為p01,下方:270度位置為p02 // long double EduclidDistanceOrWhethShortest(long double x1, long double y1, long double x2, long double y2) {//33000 long double tmp_ld = (x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2); return (tmp_ld ); }//33000 // //為圖形旋轉、變形、做的封裝 int SetPixe01d(HDC hdc, double x01, double y01, COLORREF rgb1) { SetPixel(hdc, x01, 700 - y01, rgb1);// return 1; }//int SetPixe02 // //重新繪圖函數模塊: int wm01paint01(HWND hWnd, PAINTSTRUCT ps, HDC hdc) {//int wm01paint01 //1100 // int C1_200_R01 = 400;//大圓半徑(又稱1號圓半徑) int C2_200_R02 = 200;//小圓半徑又稱2號圓 int c1Bpianyi_B1 = 0; //大圓用初始值-(圓心的偏移量橫坐標-上下坐標(暫時)為0 int c1Apianyi_A1 = 400;//大圓圓心位置-坐標(左右坐標 int c2Bpianyi_B2 = 300;//小圓圓心位置-上下坐標 int c2Apianyi_A2 = 400;//小圓圓心位置-左右坐標 int c1C2_Distance = 300;//兩圓圓心間距 // //文件流操作 ofstream outStream; ofstream outStrea0m2; ofstream outStrea0m3; outStream.open("f://out18File1011.txt"); outStrea0m2.open("f://out18File1011a1.txt"); outStrea0m3.open("f://out18File1012b3.txt"); // //找交點,P1 { //找P1交點 long double Shortest_euclidDistance001 = 999999999999999.8751; //99999 99999 99999.875f是精確表達上限(小數點前15個9 //迭代、逼近找兩圓交點 // for (long i1 = 60.93*1000; i1 <= 61.95*1000; ++i1) {//for1100i1 //根據極坐標參數求笛卡爾直角坐標點: long double c1_rad1 = (long double)PIld*((long double)i1 / 180.0) /1000; long double c1_a001 = C1_200_R01 * cos(c1_rad1); //int c1_a001 = C1_200_R01 * cos(c1_rad1); long double c1_b001 = C1_200_R01 * sin(c1_rad1); // for (long j2 = 14.46*1000; j2 <= 14.49*1000; ++j2) {//for2100j2 long double c2_rad02 = (long double)PIld *((long double)j2 / 180.0)/1000; long double c2_a001 = C2_200_R02 * cos(c2_rad02); //int c2_a001 = C2_200_R02 * cos(c2_rad02); long double c2_b002 = C2_200_R02 * sin(c2_rad02); //兩個坐標的4個值取精度,后比較 long double doub_c1_a001 = (long double)c1Apianyi_A1 * 10000 + ((long double)c1_a001 * 10000); //最高不要超過15個0 long double doub_c1_b001 = c1Bpianyi_B1 * 10000 + c1_b001 * 10000; long double doub_c2_a001 = c2Apianyi_A2 * 10000 + c2_a001 * 10000; long double doub_c2_b002 = c2Bpianyi_B2 * 10000 + c2_b002 * 10000; outStream << "[C1rad:" << c1_rad1 << "]:"; outStream << "{C1角度:" << i1 << "}"; outStream << "[坐標c1A1:" << doub_c1_a001 << "]"; outStream << "[c1B1:" << doub_c1_b001 << "]"; outStream << "[C2rad2:" << c2_rad02 << "]:"; outStream << "{C2角度:" << j2 << "]"; outStream << "[c2A1:" << doub_c2_a001 << "]"; outStream << "[c2B1:" << doub_c2_b002 << "]" << endl; long double tmpEduclidDist01 = EduclidDistanceOrWhethShortest(doub_c1_a001, doub_c1_b001, doub_c2_a001, doub_c2_b002); outStream << "{歐氏距離:" << tmpEduclidDist01 << "}" << endl; // EduclidDistanceOrWhethShortest參數 (x1,y1,x2,y2); if (Shortest_euclidDistance001 > tmpEduclidDist01) {//if2100 Shortest_euclidDistance001 = tmpEduclidDist01; // outStrea0m2 << "[C1rad:" << c1_rad1 << "]:"; outStrea0m2 << "{C1角度:" << i1 << "}"; outStrea0m2 << "[坐標c1A1:" << doub_c1_a001 << "]"; outStrea0m2 << "[c1B1:" << doub_c1_b001 << "]"; outStrea0m2 << "[C2rad2:" << c2_rad02 << "]:"; outStrea0m2 << "{C2角度:" << j2 << "]"; outStrea0m2 << "[c2A1:" << doub_c2_a001 << "]"; outStrea0m2 << "[c2B1:" << doub_c2_b002 << "]" << endl; outStrea0m2 << "{歐氏距離:" << tmpEduclidDist01 << "}" << endl; SetPixe01d(hdc, c2Apianyi_A2 + c2_a001, c2Bpianyi_B2 + c2_b002, RGB(255, 200, 0)); //綠色 // }//if2100 else {//if2100else2100 SetPixe01d(hdc, c2Apianyi_A2 + c2_a001, c2Bpianyi_B2 + c2_b002, RGB(0, 200, 0)); //綠色 }//if2100else2100 }//for2100j2 //繪制大圓(或外圓) SetPixe01d(hdc, c1Apianyi_A1 + c1_a001, c1Bpianyi_B1 + c1_b001, RGB(200, 200, 0));// 228, 0));//黃 // }//for1100i1// //(階段)結果: //[C1rad:1.06535]:{C1角度:6104}[坐標c1A1:5.9368e+06][c1B1:3.49983e+06][C2rad2:0.252549]:{C2角度:14.47][c2A1:5.93656e+06][c2B1:3.49975e+06] //{歐氏距離:64181.4} //再迭代: //[C1rad:1.06544]:{C1角度:61.045}[坐標c1A1:5.93649e+06][c1B1:3.5e+06][C2rad2:0.252689] : {C2角度:14.478][c2A1:5.93649e+06][c2B1:3.50002e+06]{ 歐氏距離:253.008 } //結果,收斂和吻合得很好 //C1:61.045(角度) C2:14.478 就是答案 }//找交點P1-結束 //繼續找交點 //找交點P2: {//找交點P2代碼塊110 //找交點P2 ofstream outStrea0m02b2; outStrea0m02b2.open("f://out18File1012b2b2.txt"); long double Shortest_euclidDistance002 = 999999999999999.8751; //99999 99999 99999.875f是精確表達上限(小數點前15個9 //迭代、逼近找兩圓交點 // for (long i1 = 118.85*1000; i1 <= 119.99*1000; ++i1) {//for1100i1 //根據極坐標參數求笛卡爾直角坐標點: long double c1_rad1 = (long double)PIld*((long double)i1 / 180.0)/1000; long double c1_a001 = C1_200_R01 * cos(c1_rad1); //int c1_a001 = C1_200_R01 * cos(c1_rad1); long double c1_b001 = C1_200_R01 * sin(c1_rad1); // for (long j2 = 165.0*1000; j2 <=166.00 *1000; ++j2) {//for2100j2 long double c2_rad02 = (long double)PIld *((long double)j2 / 180.0)/1000; long double c2_a001 = C2_200_R02 * cos(c2_rad02); //int c2_a001 = C2_200_R02 * cos(c2_rad02); long double c2_b002 = C2_200_R02 * sin(c2_rad02); //兩個坐標的4個值取精度,后比較 long double doub_c1_a001 = (long double)c1Apianyi_A1 * 10000 + ((long double)c1_a001 * 10000); //最高不要超過15個0 long double doub_c1_b001 = c1Bpianyi_B1 * 10000 + c1_b001 * 10000; long double doub_c2_a001 = c2Apianyi_A2 * 10000 + c2_a001 * 10000; long double doub_c2_b002 = c2Bpianyi_B2 * 10000 + c2_b002 * 10000; outStream << "[C1rad:" << c1_rad1 << "]:"; outStream << "{C1角度:" << i1 << "}"; outStream << "[坐標c1A1:" << doub_c1_a001 << "]"; outStream << "[c1B1:" << doub_c1_b001 << "]"; outStream << "[C2rad2:" << c2_rad02 << "]:"; outStream << "{C2角度:" << j2 << "]"; outStream << "[c2A1:" << doub_c2_a001 << "]"; outStream << "[c2B1:" << doub_c2_b002 << "]" << endl; long double tmpEduclidDist01 = EduclidDistanceOrWhethShortest(doub_c1_a001, doub_c1_b001, doub_c2_a001, doub_c2_b002); outStream << "{歐氏距離:" << tmpEduclidDist01 << "}" << endl; // EduclidDistanceOrWhethShortest參數 (x1,y1,x2,y2); if (Shortest_euclidDistance002 > tmpEduclidDist01) {//if2100 Shortest_euclidDistance002 = tmpEduclidDist01; // outStrea0m02b2 << "[C1rad:" << c1_rad1 << "]:"; outStrea0m02b2 << "{C1角度:" << i1 << "}"; outStrea0m02b2 << "[坐標c1A1:" << doub_c1_a001 << "]"; outStrea0m02b2 << "[c1B1:" << doub_c1_b001 << "]"; outStrea0m02b2 << "[C2rad2:" << c2_rad02 << "]:"; outStrea0m02b2 << "{C2角度:" << j2 << "]"; outStrea0m02b2 << "[c2A1:" << doub_c2_a001 << "]"; outStrea0m02b2 << "[c2B1:" << doub_c2_b002 << "]" << endl; outStrea0m02b2 << "{歐氏距離:" << tmpEduclidDist01 << "}" << endl; SetPixe01d(hdc, c2Apianyi_A2 + c2_a001, c2Bpianyi_B2 + c2_b002, RGB(255, 200, 0)); //綠色 // }//if2100 else {//if2100else2100 SetPixe01d(hdc, c2Apianyi_A2 + c2_a001, c2Bpianyi_B2 + c2_b002, RGB(0, 200, 0)); //綠色 }//if2100else2100 }//for2100j2 //繪制大圓(或外圓) SetPixe01d(hdc, c1Apianyi_A1 + c1_a001, c1Bpianyi_B1 + c1_b001, RGB(200, 200, 0));// 228, 0));//黃 // }//for1100i1// //(階段)結果: //[C1rad:2.07624]:{C1角度:118.96}[坐標c1A1:2.0632e+06][c1B1:3.49983e+06][C2rad2:2.88904]:{C2角度:165.53][c2A1:2.06344e+06][c2B1:3.49975e+06] //{歐氏距離:64181.4} //再迭代: //[C1rad:2.07616]:{C1角度:118955}[坐標c1A1:2.06351e+06][c1B1:3.5e+06][C2rad2:2.8889]: {C2角度:165522][c2A1:2.06351e+06][c2B1:3.50002e+06]{歐氏距離:253.008} //P1點:C1:61.045(角度) C2:14.478 //P2點:C1:118.955 C2:165.522 就是答案(相交點得角度 //驗證: 90-61.045= ( 28.955)== 118.955-90=28.955 //同樣驗證: 90-14.478=(75.522)== 165.522-90=75.522 }//找交點P2代碼塊110 //找交點P2-End // return 1; }//int wm01paint01 //1100 // // 函數: WndProc(HWND, UINT, WPARAM, LPARAM) // // 目標: 處理主窗口的消息。 // // WM_COMMAND - 處理應用程序菜單 // WM_PAINT - 繪制主窗口 // WM_DESTROY - 發送退出消息并返回 // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_COMMAND: { int wmId = LOWORD(wParam); // 分析菜單選擇: switch (wmId) { case IDM_ABOUT: DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } } break; case WM_PAINT: {//case110 PAINTSTRUCT ps; HDC hdc = BeginPaint(hWnd, &ps); // TODO: 在此處添加使用 hdc 的任何繪圖代碼... // wm01paint01(hWnd, ps, hdc);//每次重建窗口,則重新繪圖 // EndPaint(hWnd, &ps); }//case110 break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } // “關于”框的消息處理程序。 INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); switch (message) { case WM_INITDIALOG: return (INT_PTR)TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return (INT_PTR)TRUE; } break; } return (INT_PTR)FALSE; } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看