Вниз
Скачать: CL | DM;

Находится ли точка в полигоне 2D?   Найти похожие ветки 

 
Moroz4   (2008-04-22 15:16) [0]

как узнать находится ли точка в полигоне 2D?


 
DVM ©   (2008-04-22 15:27) [1]

PtInRegion + CreatePolygonRgn


 
MBo ©   (2008-04-22 15:38) [2]

http://local.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/
http://tog.acm.org/editors/erich/ptinpoly/
http://en.wikipedia.org/wiki/Point_in_polygon


 
DVM ©   (2008-04-22 15:42) [3]

function PtInPolygon(const Points: TPoints; P: TPoint): Boolean;
var
 Cnt, I, J: Integer;
begin
 Result := False;
 Cnt := Length(Points);
 J := Cnt - 1;
 for I := 0 to Cnt - 1 do
 begin
   if ((Points[I].y <= P.y) and (P.y < Points[J].y)) or
     ((Points[J].y <= P.y) and (P.y < Points[I].y)) then
   begin
     if (P.x < (Points[J].x - Points[I].x) * (P.y - Points[I].y) /
       (Points[J].y - Points[I].y) + Points[I].x) then
       Result := not Result;
   end;
   J := I;
 end;
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.012 c
15-1285044372
12
2010-09-21 08:46
2011.01.02
столбец(+) в oracle, что-то не могу найти, google мимо все ходит


2-1286353881
Jacksotnik
2010-10-06 12:31
2011.01.02
Проблема с отладкой


2-1279887034
Mishenka
2010-07-23 16:10
2011.01.02
Как в cxVerticalGrid из DevExpress задать EditorProperties ?


15-1284046698
@!!ex
2010-09-09 19:38
2011.01.02
Фриланс заказ:3 функции для работы с географическими координатами


8-1208862988
Moroz4
2008-04-22 15:16
2011.01.02
Находится ли точка в полигоне 2D?




   Наверх