Skip to content

ludoro/Matlab_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matlab_project

The project is divided in three parts: 2D, 3D and C++.

2D

Given a segment and a triangulated polygon, we need to understand if the segment "cuts" the polygon. If that is the case, we need to triangulate the cut figures. Images are worth many words:

img img

In red we can see the segment, in blue the triangles that are cut, in gray the triangles that are near triangles that are cut. The red dot are the intersections between the segment and a triangle. The light blue lines are the triangulations of the triangels that are cut.

3D

Given a polygon in the space and a parallelepiped, we need to understand if the polygon "cuts" the parallelepiped. If that is the case, we need to divide the cut sections in subsections. As before, images:

img img img img

In red we have the polygon. In blue we have the cut tetrahedrons, in pink we have the tetrahedron that are near cut tetrahedrons. In yellow we have the polygons formed by the cut.

C++

Just a translation of the 2D project in C++, with the same functionality.