3
\$\begingroup\$

The 2d case is simple. You generate the segments. You find the intersections. Then you can easily outline the shape of the connecting joint in the 2d embedded graph. 3d corridors However, in 3d or n-d with a whole new variety of directions (corridors from above and bellow), it is more complicated and I'd like to hear some advice. The corridors themselves are simple. The challenge is the "connecting room" between them (you can imagine that room as convex hull of the red in blue dots). This is the goal here.

One way to overcome this, is using voxels and then leaving only the exterior of the connected corridors. This is not optimal however. Is there any simply way to generate the room in the center without complex binary operations?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ What about reversing the process - first generate connecting room and then, according to its shape generate corridors? \$\endgroup\$
    – wondra
    Commented Aug 21, 2015 at 19:24
  • \$\begingroup\$ @wondra This is one brilliant idea! There could be a limited set of connectors and the corridors could be interpolated to suit that connector. \$\endgroup\$
    – AturSams
    Commented Aug 22, 2015 at 9:18

1 Answer 1

1
\$\begingroup\$

Your observation about the convex hull of intersection points still works in 3d & can be computed relatively quickly.

You could simplify things by restricting the the orientation of the corridors.
E.G. restricting to 90 degree turns reduces the 3d problem to a series of 2d problems.

\$\endgroup\$
1
  • \$\begingroup\$ Never mind the previous comment, got it now. :) \$\endgroup\$
    – AturSams
    Commented Aug 22, 2015 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .