PHP flag php code
$ R * cos ($ theta + $ I * 72) * $ PI/180) + $ position_X, 'y' =>-$ r * sin ($ theta + $ I * 72) * $ PI/180) + $ position_Y);} for ($ I = 0; $ I <5; $ I ++) {// five line coordinates $ j = $ I> 2? $ I-3: $ I + 2; $ lines [$ I] = array ('x1 '=> $ points [$ I] ['x'], 'y1 '=> $ points [$ I] ['Y'], 'x2' => $ points [$ j] ['x'], 'y2 '=> $ points [$ j] ['Y']);} for ($ I = 0; $ I <5; $ I ++) {// coordinates of the Five Points $ j = $ I> 3? 0: $ I + 1; $ x12 = $ lines [$ I] ['x1 ']-$ lines [$ I] ['x2']; $ x34 = $ lines [$ j] ['x1 ']-$ lines [$ j] ['x2']; $ y12 = $ lines [$ I] ['y1 ']-$ lines [$ I] ['y2']; $ y34 = $ lines [$ j] ['y1 ']-$ lines [$ j] ['y2']; $ c = $ x12 * $ y34-$ y12 * $ x34; $ a = $ lines [$ I] ['x1 '] * $ lines [$ I] ['y2']-$ lines [$ I] ['y1 '] * $ lines [$ I] ['x2 ']; $ B = $ lines [$ j] ['x1 '] * $ lines [$ j] ['y2']-$ lines [$ j] ['y1 '] * $ lines [$ j] ['x2 ']; $ x = ($ a * $ x34-$ B * $ x12)/$ c; $ Y = ($ a * $ y34-$ B * $ y12)/$ c; $ intersection [$ I] = array ('x' => $ x, 'y' => $ y) ;}for ($ I = 0; $ I <3; $ I ++) {// Three triangles $ Polygon [$ I] = array ($ points [$ I] ['x'], $ points [$ I] ['Y'], $ points [$ I + 2] ['x'], $ points [$ I + 2] ['Y'], $ intersection [$ I + 2] ['x'], $ intersection [$ I + 2] ['Y']); imagefilledpolygon ($ mFlag, $ Polygon [$ I], 3, $ yellow) ;}}?>