x - poly_verts[ loop ].x; // y = test_point->y - poly_verts[ loop ].y; // // // Dot with edge normal to find side. // if ( ( x * nx ) + ( y * ny ) > 0 ) // return 0; // } // // return 1; //} //// cn_PnPoly(): crossing number test for a point in a polygon //// Input: P = a point, //// V[] = vertex points of a polygon V[n+1] with V[n]=V[0] //// Return: 0 = outside, 1 = inside //// This code is patterned after [Franklin, 2000] //int //cn_PnPoly( Point P, Point* V, int n ) //{ // int cn = 0; // the crossing number counter // // // loop through all edges of the polygon // for (int i=0; i P.y)) // an upward crossing // || ((V[i].y > P.y) && (V[i+1].y <= P.y))) { // a downward crossing // // compute the actual edge-ray intersect x-coordinate // float vt = (float)(P.y - V[i].y) / (V[i+1].y - V[i].y); // if (P.x < V[i].x + vt * (V[i+1].x - V[i].x)) // P.x < intersect // ++cn; // a valid crossing of y=P.y right of P.x // } // } // return (cn&1); // 0 if even (out), and 1 if odd (in) // //} //=================================================================== // } // $polygon01 = array(array($x1,$y1),array($x2,$y2),array($x3,$y3),array($x4,$y4),array($x5,$y5),array($x6,$y6)); $imgsrc = JPGopen("../pics/wtexture.jpg"); // $imgsrc = GIFopen("../pics/worldmap.gif"); $imgdst = GIFopen("../pics/cursor5x5.gif"); $src_width = imagesx($imgsrc); $src_height = imagesy($imgsrc); $dst_width = imagesx($imgdst); $dst_height = imagesy($imgdst); $a = rand(0,$src_width); $b = rand(0,$src_height); if ( $a > $src_width ) { $a = $src_width; } if ( $b > $src_height ) { $b = $src_height; } imagecopymerge($imgsrc, $imgdst, $a, $b, 0, 0, $dst_width, $dst_height, 100); imagepng($imgsrc); imagedestroy($imgsrc); imagedestroy($imgdst); /*
Your ip seems to be : 

Your browser says he is : 

You came from : 

You requested the following URL :  

self */ ?>