34 real(rp),
intent(in) :: pt_x
35 real(rp),
intent(in) :: pt_y
36 integer,
intent(in) :: num_node
37 real(rp),
intent(in) :: v_x(num_node)
38 real(rp),
intent(in) :: v_y(num_node)
47 ii = mod(i, num_node) + 1
48 if ( v_y(i) <= pt_y .and. pt_y < v_y(ii))
then
49 if( pt_x < v_x(i) + (pt_y - v_y(i)) * (v_x(ii) - v_x(i))/(v_y(ii) - v_y(i)) )
then
52 else if ( v_y(i) > pt_y .and. v_y(ii) <= pt_y )
then
53 if( pt_x < v_x(i) + (pt_y - v_y(i)) * (v_x(ii) - v_x(i))/(v_y(ii) - v_y(i)) )
then
logical function, public polygon_inpoly(pt_x, pt_y, num_node, v_x, v_y)
Check whether the point is located inside a polyngon.