0
$\begingroup$

I have a workspace containing a polyhedral shape so I sliced the workspace into different 3D circles. For each circle, it is either there occurs an intersection with the polyhedral or not. Is it possible to determine if the circle intersects with the polyhedron in MATLAB and if yes, how can I determine the polygon formed by the intersection of a 3d circle with a polyhedral shape?

Please I will be glad if the computational geometry is also added but more emphsasis on the MATLAB programming.

NB: 3D circle is a circular shaped object in the 3D space. For ease of understanding, I have attached a MATLAB plot3D circle-polyhedral intersections

There are 3 circles and four polyhedral shapes in the plot. Any help will be appreciated

  • 0
    I assume you mean the "disk" instead of the "circle", i.e., you include also the interior of the circle. Otherwise it would mean that if the polyhedron crosses the interior of the circle like a lion in a circus, you are not interested by the result?2017-02-02
  • 0
    2nd question: how is your polyhedron descripted. If it by faces, the problem boils down to the description of the intersection of a triangle with a disk.2017-02-02
  • 0
    @JeanMarie, yes you are right. I better called the circles disks because the interior parts are also considered. Secondly, the polyhedral are described by the coordinates of their vertices.2017-02-02

1 Answers 1

1

I assume that all polyhedra are convex.

For a given circle and a given polyhedron:

  • you have first to convert the representation of your polyhedra into a face representation (in Matlab, use convex hull operator "convhull" for that).

  • then, for each triangular face, you have to test whether or not this face meets the plane of the circle (see appendix below):

    -if no, proceed to the next face.

    -if yes, test if the intersection points $P_k$ are inside the circle or not (by testing the distance to the circles' center.)

Once you have processed all faces in this way, take the convex hull of all points $P_k$s inside the plane of your circle.

Appendix: How is it possible to know if a triangular face $A_1A_2A_3$ with vertices $A_i(x_i,y_i,z_i)$ intersects the plane with equation $f(x,y,z):=ux+vy+wz+h=0$ ? It is the same as testing if line segments $A_1A_2$ or $A_1A_3$ or $A_2A_2$ intersects it, knowing that $A_iA_j$ intersects the plane if and only if:

$$f(x_i,y_i,z_i)*f(x_j,y_j,z_j)<0$$

a classical criterion that you have surely met if you have had lectures in Computational Geometry.

  • 0
    Yes, the polyhedra are regular but I was thinking the intersection of a polyhedral object and 3d circle should be a polygon. Anyway, this is my little fear. Thanks very much, i will implement this and get back...2017-02-03