[SciPy-User] Calculate surface area and volume from intersection of volume and plane.
Wed Aug 31 07:20:52 CDT 2011
sorry for the dup post and thanks for the pointers I think that gives me enough ideas to build something.
>>> Robert Kern <firstname.lastname@example.org> 8/30/2011 1:41 PM >>>
On Tue, Aug 30, 2011 at 08:44, Dharhas Pothina
> We have an old ArcGIS aml script that we are trying to replace. The original
> script takes the input from an ArcGIS TIN model (basically a 2D delaunay
> triangulation of irregular xy data points with z's defining the depth at
> each xy) and calculates the surface area and volume of the lake at different
> elevations (i.e. z cut planes)
> From my googling it looks like I have options for the delaunay triangulation
> using scipy, matplotlib, cgal or mayavi. I'm not sure how to do the surface
> area and volume calculations at various z planes once I have the
> triangulation. I would appreciate any pointers.
Your previous email came through fine. There is no need to repeat it.
It's relatively straightforward to find the polygon of intersection
between the Z plane and the TIN. Just loop through the triangles and
check each of the 3 sides to see if one end is above while the other
end is below. Simple geometry determines the point of contact of that
side. Join up the two sides into a line segment and add that to your
list of line segments. The line segments join up into an irregular
polygon, probably with holes. The area of this polygon can be found by
a formula that you can Google for. E.g.:
The volume can be calculated similarly. You can break up the volume
into triangular prisms projecting up from each of the triangles in the
TIN below the Z-plane. You can calculate the volume of each of those
prisms easily. Just be sure to properly take into account the
triangles that intersect the Z-plane. You only want to count the part
that's below the Z-plane.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User