Board index » delphi » Segment inside polygon, and Segment inside cube.
Alexandre Bento Freire
![]() Delphi Developer |
Fri, 11 Jul 2003 06:06:59 GMT
|
Alexandre Bento Freire
![]() Delphi Developer |
Fri, 11 Jul 2003 06:06:59 GMT
Segment inside polygon, and Segment inside cube.I need to calculate in a fast way, the following: 2D real space: 3D real space: Thanks in advanced |
Alexander Weidaue
![]() Delphi Developer |
Fri, 11 Jul 2003 21:47:02 GMT
Re:Segment inside polygon, and Segment inside cube.
Alexandre Bento Freire schrieb: Quote> I need to calculate in a fast way, the following: point and the border polygon points. Have fun A.Weidauer If the point is inside you got a number greater then 180 degrees. Here are the routines: //------------------------------------------------------------------------- Function XYLength(A,B:TXYPoint):Double; //------------------------------------------------------------------------- Function TriXYAngle(PBegin,PMiddle,PEnd:TXYPoint):Double; //------------------------------------------------------------------------- Function TriXYArea(PBegin,PMiddle,PEnd:TXYPoint):Double; Function TriXYCos(PBegin,PMiddle,PEnd:TXYPoint):Double; //------------------------------------------------------------------------- Function TXYPointList.Inside(P:TXYPoint):Boolean; |
Earl F. Glyn
![]() Delphi Developer |
Sat, 12 Jul 2003 00:05:31 GMT
Re:Segment inside polygon, and Segment inside cube."Alexandre Bento Freire" <a-bentofre...@a-bentofreire.com.nospam> wrote in message news:3a6c1a8d_1@dnews... Quote
http://www.efg2.com/Lab/Library/Delphi/Graphics/Math.htm Non-Delphi links: -- Earl F. Glynn, Overland Park, KS USA E-mail: e...@efg2.com efg's Computer Lab: http://www.efg2.com/Lab |
Alexandre Bento Freir
![]() Delphi Developer |
Sat, 12 Jul 2003 03:41:57 GMT
Re:Segment inside polygon, and Segment inside cube.Thank you for the code ! But, i have already an algoritm for point in polygon. The title of may e-mail was incorrect. What i need is to know is if the segment intersects the polygon. Both start point, and end point may be outside, but the line still crosses the polygon. Any pointers will be most helpuf. Quote"Alexander Weidauer" <alex.weida...@ifgdv-mv.de> wrote in message Alexandre Bento Freire schrieb: You hve to construct an half plane construction for the anles of the |
Alexandre Bento Freir
![]() Delphi Developer |
Sat, 12 Jul 2003 03:47:59 GMT
Re:Segment inside polygon, and Segment inside cube.Thank you for the links! But, i have already an algoritm for point in polygon. The title of may e-mail was incorrect. What i need is to know is if the segment intersects the polygon. Both start point, and end point may be outside, but the line still crosses the polygon. Any pointers will be most helpuf. "Earl F. Glynn" <EarlGl...@att.net> wrote in message Quote> "Alexandre Bento Freire" <a-bentofre...@a-bentofreire.com.nospam> wrote in |
O
![]() Delphi Developer |
Sat, 12 Jul 2003 04:54:03 GMT
Re:Segment inside polygon, and Segment inside cube.Alexandre Bento Freire <a-bentofre...@a-bentofreire.com.nospam> wrote in Quote> Thank you for the links! between two consecutive vertexes , i think ! So your problem becomes : "how do i find intersection between two segments ( one of which is a segment of the polygon )?" i think this problem is much easier ! |
Alexandre Bento Freir
![]() Delphi Developer |
Sat, 12 Jul 2003 18:27:04 GMT
Re:Segment inside polygon, and Segment inside cube.i have an algoritm for line intersecction. But is't there a fastest way ? Quote"O " <francescos...@tiscalinet.it> wrote in message Quote
|
Thérèse Hanque
![]() Delphi Developer |
Tue, 15 Jul 2003 05:32:44 GMT
Re:Segment inside polygon, and Segment inside cube.Hi Alexandre, Quote> i have an algoritm for line intersecction. might try to use the algorithm for line intersection only for the sides that could cross your segment. For example, if both ends of one side have either a smaller or larger X Thrse |
2. FIND ERROR: Converting Segment address to segment number ?
3. FIND ERROR: Converting Segment address to segment number ?
4. File transfer segment by segment error?
5. Mouse Click Inside a TBevel Inside a TPanel
6. is point inside the polygon
7. How can I detect if a point is inside a polygon (without regions)
8. ADO bug - colon/word inside double quotes inside string being interpreted as param