Intersection of a tetrahedron and quadric

Hi all,

here is a question I’ve been trying to solve for a while, it’s probably very specific but if anybody can give me some input I would really appreciate.

Here is my question: given a level set function (phi) defined on a mesh of tetrahedra, I define two volume (phi>0 and phi<0) and I need to compute for each tetrahedron the volume (phi>0) and the interface area (phi=0).

I usually do it with marching tetrahedra, if works fine except that the piecewise trilinear assumption ruins the curvature information at the interface): for the problems I deal with, that’s very important (simulation of multiphase flows).

Now, if I were to use a higher order fit (quadratic), I would not have any issue like that, but of course, that’s extremely difficult to compute, tons of different cases to handle, a real mess…

It seems that some people do research on quadric intersections, for instance, but I haven’t been able to find any information on my particular problem, namely the computation of a volume defined by the intersection of a quadric and a tetrahedron… Would anybody be able to help me on that?

Thanks a lot for any help you might be able to give me,

Jesse

I would love to see a few images to better visualize your problem.
Ie. is it possible to reconstruct the curvature information from normals, after marching cubes ? Use catmull-clark subdivision on the mesh ?

Hi ZbuffeR,

thanks for the reply, I should have given a bit more explanation.

Here is another way to see it,
(1) given a quadratic form in 3D, ie,
f(x,y,z) = a x^2 + b y^2 + c z^2 + d x y + e y z + f z x + g x + h y + i z + j,
(2) given a tetrahedron (of a cube, it’s just easier to take a simple polyhedron),
then,
(1) how to compute the volume of the the intersection of the tetrahedron with f(x,y,z)>0?
(2) how to compute the area of the surface f(x,y,z)=0 in the tetrahedron?

I know it’s not a problem one may encounter in graphics, but after looking for a while I figured I might get some interesting insights…

Thanks a lot for your help!

An idea:

  1. tesselate both surfaces finely.
  2. Loop the quadric tesselation and do your integration asking at each point whether you are in the tetrahedron or not.

(for the volume integral you would have to tesselate the quadric volume).

People use BSP trees to compute geometric intersections. You might go that route to compute the intersecting surface at which point you can do both the volume and surface integrals using Green’s theorem…