I have a curve going through tetrahedron elements. How to find the intersections of this curve with the tetrahedrons?
The curve is constructed by a few points and represents the axis of the artery going through tissue and I have tissue elements which are tetrahedron elements. I need to find those tetrahedron elements and the intersection points. I attached the image of my problem below. Pink elements are the ones that I have found manually and the blue elements show the elements constructing the tissue. The curve is white and the yellow colour shows an artery with the axis.


A brute force approach:
Your problem isn't that easy and will require some sophistication to achieve efficiency. Anyway, a first solution can obtained by brute-forcing.
In any case, you have to discretize the curve as a contiguous sequence of line segments, i.e. a polyline, otherwise the equations are too complicated.
The brute-force approach consists in:
for every tetrahedron:
for every segment:
You can also perform the search with the two loops swapped.
For the intersection operation, preprocess the tetrahedra to get the equations of the planes of the faces, oriented in such a way that the internal points make the equation positive, $ax+by+cz+d\ge0$. Now take the line of support of the segment and intersect the four faces. Use the parametric equation of the segment, $p=p_0+t\cdot p_0p_1$, and solve for $t$. You will get four intersections but at most two of them are valid: check which intersections belong to the inside of the tetrahedron by checking the sign when plugged in the equations of the three other planes.
Finally, consider the range of $t$ values that cross the tetrahedron, and take the intersection with the interval $[0,1]$ to restrict to the line segment. Notice that several segments may intersect a given tetrahedron.
To accelerate the process, several techniques can be used.
First it is advisable to compute the axis-aligned bounding boxes of the tetrahedra and also of the segments. This will allow quick rejection of non-intersecting elements.
Much more efficiency can be gained if you arrange the bounding boxes in a hierarchy of bounding boxes. When a segment does not interfere with a high-level box, all lower-level tests are avoided.
If your tetrahedrization allows it, you can also work with the topology of the mesh: when you exit a tetrahedron, by a face, you perforce enter the neighboring tetrahedron that shares that face. Then by following the polyline, you will enter and leave tetrahedra at the same time that you follow the trajectory. This way, you only visit the relevant tetrahedra. But degeneracies are t be feared (segment meeting an edge or a vertex).