joerghuelsermann.de Winkelfunktionen in PHP

Winkelfunktionen in PHP

Warum veröffentliche ich diese Seite. Zum einen hat es damit zu tun das sie mir als Unterstützung gedient hat Kreisbögen und reguläre Polygone in SVG aufzubauen. Zum anderen kann es nicht schaden eine passende Tabelle parat zu haben. Um den Umfang eines Kreises mit dem Radius 1 zu berechnen hat man drei Möglichkeiten unter PHP.

  1. deg2rad(360) 6.2831853071796
  2. M_PI*2 6.2831853071796
  3. pi()*2 6.2831853071796

Im Grunde wird die ganze Tabelle mit vier Zeilen für die Berechnungen erzeugt.

for ($i=0;$i<=360;$i++) {
$w = deg2rad($i);
$s = round(sin($w),14);
$c = round(cos($w),14);
$t = round(tan($w),14);}

Verwenden wir mal bei der Ausgabe sechs Nachkommastellen. number_format($w,6,',','')

Werte für die Winkel

Nun folgen die berechneten Werte für Gradmaß, Bogenmaß, Sinus, Kosinus und Tangens für die einzelnen Winkel.

Sinus, Kosinus Tangens im Bezug zum Bogenmaß und Gradmaß
Bogenmaß in Grad °Bogenmaß in RadiantSinusKosinusTangens
00,0000000,0000001,0000000,000000
10,0174530,0174520,9998480,017455
20,0349070,0348990,9993910,034921
30,0523600,0523360,9986300,052408
40,0698130,0697560,9975640,069927
50,0872660,0871560,9961950,087489
60,1047200,1045280,9945220,105104
70,1221730,1218690,9925460,122785
80,1396260,1391730,9902680,140541
90,1570800,1564340,9876880,158384
100,1745330,1736480,9848080,176327
110,1919860,1908090,9816270,194380
120,2094400,2079120,9781480,212557
130,2268930,2249510,9743700,230868
140,2443460,2419220,9702960,249328
150,2617990,2588190,9659260,267949
160,2792530,2756370,9612620,286745
170,2967060,2923720,9563050,305731
180,3141590,3090170,9510570,324920
190,3316130,3255680,9455190,344328
200,3490660,3420200,9396930,363970
210,3665190,3583680,9335800,383864
220,3839720,3746070,9271840,404026
230,4014260,3907310,9205050,424475
240,4188790,4067370,9135450,445229
250,4363320,4226180,9063080,466308
260,4537860,4383710,8987940,487733
270,4712390,4539900,8910070,509525
280,4886920,4694720,8829480,531709
290,5061450,4848100,8746200,554309
300,5235990,5000000,8660250,577350
310,5410520,5150380,8571670,600861
320,5585050,5299190,8480480,624869
330,5759590,5446390,8386710,649408
340,5934120,5591930,8290380,674509
350,6108650,5735760,8191520,700208
360,6283190,5877850,8090170,726543
370,6457720,6018150,7986360,753554
380,6632250,6156610,7880110,781286
390,6806780,6293200,7771460,809784
400,6981320,6427880,7660440,839100
410,7155850,6560590,7547100,869287
420,7330380,6691310,7431450,900404
430,7504920,6819980,7313540,932515
440,7679450,6946580,7193400,965689
450,7853980,7071070,7071071,000000
460,8028510,7193400,6946581,035530
470,8203050,7313540,6819981,072369
480,8377580,7431450,6691311,110613
490,8552110,7547100,6560591,150368
500,8726650,7660440,6427881,191754
510,8901180,7771460,6293201,234897
520,9075710,7880110,6156611,279942
530,9250250,7986360,6018151,327045
540,9424780,8090170,5877851,376382
550,9599310,8191520,5735761,428148
560,9773840,8290380,5591931,482561
570,9948380,8386710,5446391,539865
581,0122910,8480480,5299191,600335
591,0297440,8571670,5150381,664279
601,0471980,8660250,5000001,732051
611,0646510,8746200,4848101,804048
621,0821040,8829480,4694721,880726
631,0995570,8910070,4539901,962611
641,1170110,8987940,4383712,050304
651,1344640,9063080,4226182,144507
661,1519170,9135450,4067372,246037
671,1693710,9205050,3907312,355852
681,1868240,9271840,3746072,475087
691,2042770,9335800,3583682,605089
701,2217300,9396930,3420202,747477
711,2391840,9455190,3255682,904211
721,2566370,9510570,3090173,077684
731,2740900,9563050,2923723,270853
741,2915440,9612620,2756373,487414
751,3089970,9659260,2588193,732051
761,3264500,9702960,2419224,010781
771,3439040,9743700,2249514,331476
781,3613570,9781480,2079124,704630
791,3788100,9816270,1908095,144554
801,3962630,9848080,1736485,671282
811,4137170,9876880,1564346,313752
821,4311700,9902680,1391737,115370
831,4486230,9925460,1218698,144346
841,4660770,9945220,1045289,514364
851,4835300,9961950,08715611,430052
861,5009830,9975640,06975614,300666
871,5184360,9986300,05233619,081137
881,5358900,9993910,03489928,636253
891,5533430,9998480,01745257,289962
901,5707961,0000000,000000
911,5882500,999848-0,017452-57,289962
921,6057030,999391-0,034899-28,636253
931,6231560,998630-0,052336-19,081137
941,6406090,997564-0,069756-14,300666
951,6580630,996195-0,087156-11,430052
961,6755160,994522-0,104528-9,514364
971,6929690,992546-0,121869-8,144346
981,7104230,990268-0,139173-7,115370
991,7278760,987688-0,156434-6,313752
1001,7453290,984808-0,173648-5,671282
1011,7627830,981627-0,190809-5,144554
1021,7802360,978148-0,207912-4,704630
1031,7976890,974370-0,224951-4,331476
1041,8151420,970296-0,241922-4,010781
1051,8325960,965926-0,258819-3,732051
1061,8500490,961262-0,275637-3,487414
1071,8675020,956305-0,292372-3,270853
1081,8849560,951057-0,309017-3,077684
1091,9024090,945519-0,325568-2,904211
1101,9198620,939693-0,342020-2,747477
1111,9373150,933580-0,358368-2,605089
1121,9547690,927184-0,374607-2,475087
1131,9722220,920505-0,390731-2,355852
1141,9896750,913545-0,406737-2,246037
1152,0071290,906308-0,422618-2,144507
1162,0245820,898794-0,438371-2,050304
1172,0420350,891007-0,453990-1,962611
1182,0594890,882948-0,469472-1,880726
1192,0769420,874620-0,484810-1,804048
1202,0943950,866025-0,500000-1,732051
1212,1118480,857167-0,515038-1,664279
1222,1293020,848048-0,529919-1,600335
1232,1467550,838671-0,544639-1,539865
1242,1642080,829038-0,559193-1,482561
1252,1816620,819152-0,573576-1,428148
1262,1991150,809017-0,587785-1,376382
1272,2165680,798636-0,601815-1,327045
1282,2340210,788011-0,615661-1,279942
1292,2514750,777146-0,629320-1,234897
1302,2689280,766044-0,642788-1,191754
1312,2863810,754710-0,656059-1,150368
1322,3038350,743145-0,669131-1,110613
1332,3212880,731354-0,681998-1,072369
1342,3387410,719340-0,694658-1,035530
1352,3561940,707107-0,707107-1,000000
1362,3736480,694658-0,719340-0,965689
1372,3911010,681998-0,731354-0,932515
1382,4085540,669131-0,743145-0,900404
1392,4260080,656059-0,754710-0,869287
1402,4434610,642788-0,766044-0,839100
1412,4609140,629320-0,777146-0,809784
1422,4783680,615661-0,788011-0,781286
1432,4958210,601815-0,798636-0,753554
1442,5132740,587785-0,809017-0,726543
1452,5307270,573576-0,819152-0,700208
1462,5481810,559193-0,829038-0,674509
1472,5656340,544639-0,838671-0,649408
1482,5830870,529919-0,848048-0,624869
1492,6005410,515038-0,857167-0,600861
1502,6179940,500000-0,866025-0,577350
1512,6354470,484810-0,874620-0,554309
1522,6529000,469472-0,882948-0,531709
1532,6703540,453990-0,891007-0,509525
1542,6878070,438371-0,898794-0,487733
1552,7052600,422618-0,906308-0,466308
1562,7227140,406737-0,913545-0,445229
1572,7401670,390731-0,920505-0,424475
1582,7576200,374607-0,927184-0,404026
1592,7750740,358368-0,933580-0,383864
1602,7925270,342020-0,939693-0,363970
1612,8099800,325568-0,945519-0,344328
1622,8274330,309017-0,951057-0,324920
1632,8448870,292372-0,956305-0,305731
1642,8623400,275637-0,961262-0,286745
1652,8797930,258819-0,965926-0,267949
1662,8972470,241922-0,970296-0,249328
1672,9147000,224951-0,974370-0,230868
1682,9321530,207912-0,978148-0,212557
1692,9496060,190809-0,981627-0,194380
1702,9670600,173648-0,984808-0,176327
1712,9845130,156434-0,987688-0,158384
1723,0019660,139173-0,990268-0,140541
1733,0194200,121869-0,992546-0,122785
1743,0368730,104528-0,994522-0,105104
1753,0543260,087156-0,996195-0,087489
1763,0717790,069756-0,997564-0,069927
1773,0892330,052336-0,998630-0,052408
1783,1066860,034899-0,999391-0,034921
1793,1241390,017452-0,999848-0,017455
1803,1415930,000000-1,0000000,000000
1813,159046-0,017452-0,9998480,017455
1823,176499-0,034899-0,9993910,034921
1833,193953-0,052336-0,9986300,052408
1843,211406-0,069756-0,9975640,069927
1853,228859-0,087156-0,9961950,087489
1863,246312-0,104528-0,9945220,105104
1873,263766-0,121869-0,9925460,122785
1883,281219-0,139173-0,9902680,140541
1893,298672-0,156434-0,9876880,158384
1903,316126-0,173648-0,9848080,176327
1913,333579-0,190809-0,9816270,194380
1923,351032-0,207912-0,9781480,212557
1933,368485-0,224951-0,9743700,230868
1943,385939-0,241922-0,9702960,249328
1953,403392-0,258819-0,9659260,267949
1963,420845-0,275637-0,9612620,286745
1973,438299-0,292372-0,9563050,305731
1983,455752-0,309017-0,9510570,324920
1993,473205-0,325568-0,9455190,344328
2003,490659-0,342020-0,9396930,363970
2013,508112-0,358368-0,9335800,383864
2023,525565-0,374607-0,9271840,404026
2033,543018-0,390731-0,9205050,424475
2043,560472-0,406737-0,9135450,445229
2053,577925-0,422618-0,9063080,466308
2063,595378-0,438371-0,8987940,487733
2073,612832-0,453990-0,8910070,509525
2083,630285-0,469472-0,8829480,531709
2093,647738-0,484810-0,8746200,554309
2103,665191-0,500000-0,8660250,577350
2113,682645-0,515038-0,8571670,600861
2123,700098-0,529919-0,8480480,624869
2133,717551-0,544639-0,8386710,649408
2143,735005-0,559193-0,8290380,674509
2153,752458-0,573576-0,8191520,700208
2163,769911-0,587785-0,8090170,726543
2173,787364-0,601815-0,7986360,753554
2183,804818-0,615661-0,7880110,781286
2193,822271-0,629320-0,7771460,809784
2203,839724-0,642788-0,7660440,839100
2213,857178-0,656059-0,7547100,869287
2223,874631-0,669131-0,7431450,900404
2233,892084-0,681998-0,7313540,932515
2243,909538-0,694658-0,7193400,965689
2253,926991-0,707107-0,7071071,000000
2263,944444-0,719340-0,6946581,035530
2273,961897-0,731354-0,6819981,072369
2283,979351-0,743145-0,6691311,110613
2293,996804-0,754710-0,6560591,150368
2304,014257-0,766044-0,6427881,191754
2314,031711-0,777146-0,6293201,234897
2324,049164-0,788011-0,6156611,279942
2334,066617-0,798636-0,6018151,327045
2344,084070-0,809017-0,5877851,376382
2354,101524-0,819152-0,5735761,428148
2364,118977-0,829038-0,5591931,482561
2374,136430-0,838671-0,5446391,539865
2384,153884-0,848048-0,5299191,600335
2394,171337-0,857167-0,5150381,664279
2404,188790-0,866025-0,5000001,732051
2414,206243-0,874620-0,4848101,804048
2424,223697-0,882948-0,4694721,880726
2434,241150-0,891007-0,4539901,962611
2444,258603-0,898794-0,4383712,050304
2454,276057-0,906308-0,4226182,144507
2464,293510-0,913545-0,4067372,246037
2474,310963-0,920505-0,3907312,355852
2484,328417-0,927184-0,3746072,475087
2494,345870-0,933580-0,3583682,605089
2504,363323-0,939693-0,3420202,747477
2514,380776-0,945519-0,3255682,904211
2524,398230-0,951057-0,3090173,077684
2534,415683-0,956305-0,2923723,270853
2544,433136-0,961262-0,2756373,487414
2554,450590-0,965926-0,2588193,732051
2564,468043-0,970296-0,2419224,010781
2574,485496-0,974370-0,2249514,331476
2584,502949-0,978148-0,2079124,704630
2594,520403-0,981627-0,1908095,144554
2604,537856-0,984808-0,1736485,671282
2614,555309-0,987688-0,1564346,313752
2624,572763-0,990268-0,1391737,115370
2634,590216-0,992546-0,1218698,144346
2644,607669-0,994522-0,1045289,514364
2654,625123-0,996195-0,08715611,430052
2664,642576-0,997564-0,06975614,300666
2674,660029-0,998630-0,05233619,081137
2684,677482-0,999391-0,03489928,636253
2694,694936-0,999848-0,01745257,289962
2704,712389-1,0000000,000000
2714,729842-0,9998480,017452-57,289962
2724,747296-0,9993910,034899-28,636253
2734,764749-0,9986300,052336-19,081137
2744,782202-0,9975640,069756-14,300666
2754,799655-0,9961950,087156-11,430052
2764,817109-0,9945220,104528-9,514364
2774,834562-0,9925460,121869-8,144346
2784,852015-0,9902680,139173-7,115370
2794,869469-0,9876880,156434-6,313752
2804,886922-0,9848080,173648-5,671282
2814,904375-0,9816270,190809-5,144554
2824,921828-0,9781480,207912-4,704630
2834,939282-0,9743700,224951-4,331476
2844,956735-0,9702960,241922-4,010781
2854,974188-0,9659260,258819-3,732051
2864,991642-0,9612620,275637-3,487414
2875,009095-0,9563050,292372-3,270853
2885,026548-0,9510570,309017-3,077684
2895,044002-0,9455190,325568-2,904211
2905,061455-0,9396930,342020-2,747477
2915,078908-0,9335800,358368-2,605089
2925,096361-0,9271840,374607-2,475087
2935,113815-0,9205050,390731-2,355852
2945,131268-0,9135450,406737-2,246037
2955,148721-0,9063080,422618-2,144507
2965,166175-0,8987940,438371-2,050304
2975,183628-0,8910070,453990-1,962611
2985,201081-0,8829480,469472-1,880726
2995,218534-0,8746200,484810-1,804048
3005,235988-0,8660250,500000-1,732051
3015,253441-0,8571670,515038-1,664279
3025,270894-0,8480480,529919-1,600335
3035,288348-0,8386710,544639-1,539865
3045,305801-0,8290380,559193-1,482561
3055,323254-0,8191520,573576-1,428148
3065,340708-0,8090170,587785-1,376382
3075,358161-0,7986360,601815-1,327045
3085,375614-0,7880110,615661-1,279942
3095,393067-0,7771460,629320-1,234897
3105,410521-0,7660440,642788-1,191754
3115,427974-0,7547100,656059-1,150368
3125,445427-0,7431450,669131-1,110613
3135,462881-0,7313540,681998-1,072369
3145,480334-0,7193400,694658-1,035530
3155,497787-0,7071070,707107-1,000000
3165,515240-0,6946580,719340-0,965689
3175,532694-0,6819980,731354-0,932515
3185,550147-0,6691310,743145-0,900404
3195,567600-0,6560590,754710-0,869287
3205,585054-0,6427880,766044-0,839100
3215,602507-0,6293200,777146-0,809784
3225,619960-0,6156610,788011-0,781286
3235,637413-0,6018150,798636-0,753554
3245,654867-0,5877850,809017-0,726543
3255,672320-0,5735760,819152-0,700208
3265,689773-0,5591930,829038-0,674509
3275,707227-0,5446390,838671-0,649408
3285,724680-0,5299190,848048-0,624869
3295,742133-0,5150380,857167-0,600861
3305,759587-0,5000000,866025-0,577350
3315,777040-0,4848100,874620-0,554309
3325,794493-0,4694720,882948-0,531709
3335,811946-0,4539900,891007-0,509525
3345,829400-0,4383710,898794-0,487733
3355,846853-0,4226180,906308-0,466308
3365,864306-0,4067370,913545-0,445229
3375,881760-0,3907310,920505-0,424475
3385,899213-0,3746070,927184-0,404026
3395,916666-0,3583680,933580-0,383864
3405,934119-0,3420200,939693-0,363970
3415,951573-0,3255680,945519-0,344328
3425,969026-0,3090170,951057-0,324920
3435,986479-0,2923720,956305-0,305731
3446,003933-0,2756370,961262-0,286745
3456,021386-0,2588190,965926-0,267949
3466,038839-0,2419220,970296-0,249328
3476,056293-0,2249510,974370-0,230868
3486,073746-0,2079120,978148-0,212557
3496,091199-0,1908090,981627-0,194380
3506,108652-0,1736480,984808-0,176327
3516,126106-0,1564340,987688-0,158384
3526,143559-0,1391730,990268-0,140541
3536,161012-0,1218690,992546-0,122785
3546,178466-0,1045280,994522-0,105104
3556,195919-0,0871560,996195-0,087489
3566,213372-0,0697560,997564-0,069927
3576,230825-0,0523360,998630-0,052408
3586,248279-0,0348990,999391-0,034921
3596,265732-0,0174520,999848-0,017455
3606,2831850,0000001,0000000,000000