"Thomas Clark" wrote in message <hepkrb$2th$1@fred.mathworks.com>...
> Rely on the geometrical precept that, if two volumes are convex, their intersecting volume (if they intersect) must also be convex.
>
> If you have R2009a or later, you have access to the DelaunayTri routine and it's associates. You can do the following with earlier versions of MATLAB them, its just a little more involved / computationally intensive.
>
> So, what I would do:
>
>  Build a delaunay triangulation DT1 of the points (x1, y1, z1) from your first volume.
>
>  Build a second delaunay triangulation, DT2 of the points (x2, y2, z2) which make up your second volume.
>
>  Use TriScatteredInterp (which usefully returns NaN where points are outside the hull) or some other method (there might be a dedicated one for this) to determine whether each point (x2, y2, z2) is inside or outside the convex hull DT1.
>
>  Same again to determine whether each point (x1, y1, z1) is inside or outside the convex hull of DT2.
>
>  Take all points (x1 y1 z1) which lie inside (or on) the convex hull of DT2 and group them with all points in (x2 y2 z2) which lie inside or on the convex hull DT1.
>
>  This list comprises all points which make up the intersecting volume. Compute its convex hull, from which you can determine volume fairly easily.
>
>
> ** NOTE **
>
> This method is a good approximation, unless data are very coarsely spaced. It isn't exact unless points on one or other of DT2 or DT1 lie exactly on the line of volume intersection.
>
> To make it exact, if necessary, take the triangular simplices which make the convex hulls of DT1 and DT2, determine which simplices from CHDT1 cross through simplices from CHDT2. Where they cross, solve for the intersection points, giving you a series of points around the border of the intersection. Then add these into the final list above before computing the convex hull of the intersecting volumes.
> Note that this method may become confusing if there is more than one 'borderline' of intersection  which can occur where the volumes are a different shape (e.g. one convex hull is a long ellipse, the other is a sphere whose diameter is between the major
and minor lengths of the ellipsoid).
>
> Hope this helps
>
Hello Mr. Thomas
I am perhaps taking you to very old question here. I am creating a bunch of 3D Delaunay Triangulations from the different set of points and for any pair of 3D Delaunay Triangulations, I need to calculate the volume which is common to both 3D Delaunay Triangulations. There are number of pairs which share volume and I need to calculate the values of these shared volumes.
I had been doing this rather the crude way. I am generating more than 5000 random points [RANDOM! so points are obviously not evenly distributed inside the Delaunay Triangulation] inside my Delaunay Triangulations and hoping that this would generate enough number of points so that I could find out points common to both the volumes and then create a Delaunay Triangulation of these common points and gets it volume from creating a Convex Hull of it.
This is crude ...very crude and it is incredibly slow. I was hoping to get some insights about solving this mathematically.
But I could also do with another solution which is to generate a small number of points inside the Delaunay and but that they should be very evenly and uniformly distributed in the Delaunay Triangulation, this would ensure that I do not loose a lot on the common volume because of the sparse nature of the distribution of points.
Is there any method where I can create say for example 500 uniformly distributed points inside the Delaunay Triangulation ? I think TriScatteredInterp can do that but I am confused about its exact usage
Does anyone have a quick and nice method to calculate this ?
