0

I have some dinamically created walls on the canvas, and I know the start end the end positions for every wall. The positions consist of the X and Z coordinate (y coordinate is constant, because the wall's height is predefined).

So, technically, I have some sections on the 2D plane (with start and end points).

The thing what I need is the polygon, wrap exactly the polygon which made by walls from plan view. Can anyone describe or link me an algorythm to do this?

Thanks in advance, R

Szabolcs
  • 24,728
  • 9
  • 85
  • 174
RobbeR
  • 485
  • 6
  • 23
  • Sorry, I don't understand the question. If you have the coordinates of the walls then surely you have coordinates of the floor and ceiling. What am I missing? How do you have the wall coordinates ordered? – beaker Nov 08 '12 at 17:39
  • Yes, exactly. Meanwhile I realized that, I need a polyhedron to make the "room" by the walls coordinates, but if I haven't the order of points, I haven't the normalvectors of walls. And I haven't the information, which side is "inside" of polyhedron, and which is outside. Any ideas? Thanks – RobbeR Nov 11 '12 at 12:26
  • The simplest way is to generate the points for the walls in a consistent ordering (usually counter-clockwise as you look at the wall). Can you show us some sample data and how you generate it? – beaker Nov 11 '12 at 15:56

1 Answers1

0

I found this: https://gis.stackexchange.com/questions/1200/concave-hull-definition-algorithms-and-practical-solutions

It's visualize my problem, I need an algorithm for get the concave hull!

R

Community
  • 1
  • 1
RobbeR
  • 485
  • 6
  • 23