Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: How to comp...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 5597 of 6457
Post > Topic >>

Re: How to compute the merged volume of two 3D objects

by Rick Towler <rick.towler@[EMAIL PROTECTED] > Apr 4, 2008 at 09:52 AM

I think you're going to have to do this the hard way.  As you have 
found, MESH_MERGE in its most basic form simply combines the two vertex 
and polygon arrays and MESH_VOLUME still computes the volume for the two 
"solid" polygons.  You need to combine the vertices and find the 
equilibrium surface.

If your combined objects are convex, you could possibly use QHULL to
create the convex hull of the combined vertices.  I have to admit that I
haven't done this and after playing around with it briefly I really have
no idea *how* to use QHULL to do this.  If anyone wants to share...

If you need to handle concave objects then you'll need to step outside 
IDL.  If you're lucky you will find a library that contains functions to 
do this and you would simply need to write a DLM wrapper.  (I would 
think that there has been a lot of work developing algorithms to
do this but a couple of quick searches brings up very little of 
interest).  If you come up empty then you're in for a bit of work.  In 
this case I would forget MESH_VOLUME because its requirement of a 
"solid" polygon makes this task much more difficult.

Off the top of my head, I would try a plane sweep approach where you 
integrate the combined area formed by the intersection of a plane and 
your two objects as the plane sweeps across them.  Calculating the area 
of the plane+objects would take some thought but (at least for me) it is 
a far more tractable problem.

Look at QHULL first, it may work and save you a lot of time.  Otherwise, 
good luck!


-Rick



yingjie, Peng wrote:
> Dear all,
> 
> If I want to compute the merged volume of two 3D objects, for instance
> a overlapped sphere and  cube, I first use MESH_MERGE to merge the
> polygonal meshes of the two objects and then use MESH_VOLUME to get
> the merged volume.
> 
> The problem is that I found the MESH_MERGE, if  I am right,  just
> simply put together the vertices and connectivity of the two objects
> and did not do any real mergence of the overlapped vertices.
> Therefore, the volume I got after applied MESH_MERGE, still equel to
> Volume1 + Volume2 and not the merged volume.
> 
> Is there any good idea how to compute the merged volume, or I have to
> "manually" get rid of the overlapped vertices and rewrite the
> connectivity array...?
> 
> Any idea or suggestion would be greatly appreciated.
> 
> Cheers,
> yingjie
 




 2 Posts in Topic:
How to compute the merged volume of two 3D objects
"yingjie, Peng"  2008-04-03 14:14:35 
Re: How to compute the merged volume of two 3D objects
Rick Towler <rick.towl  2008-04-04 09:52:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 21:10:40 CST 2008.