comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Volume by four vectors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Volume by four vectors [message #41241 is a reply to message #41226] Thu, 14 October 2004 12:11 Go to previous messageGo to previous message
Sander Roosendaal is currently offline  Sander Roosendaal
Messages: 3
Registered: October 2004
Junior Member
Dear Ed,

I appreciate your help.

For my problem:
"Given four 3D vectors a=[a1,a2,a3] b=[b1,b2,b3] c=[c1,c2,c3] and
d=[d1,d2,d3], I want to calculate the volume defined by
i*a + j*b + k*c + l*d with i,j,k,l between 0 and 1."

You responded:

> Interesting geometry problem. The volume you're talking about is an
> irregular polyhedron--the generalization of a cube. You can dissect
> the volume into
> irregular tetrahedra, each bounded by 4 triangles, two triangles on
> each face.
> Pick an origin inside of the hexahedron, and since there are 6 faces,

There are more than 6 faces.

I calculate a 16 points. Only some of them define the polyhedron.

O(rigin),a,b,c,d,a+b,a+c,a+d,b+c,b+d,c+d, a+b+c,a+b+d,a+c+d,b+c+d, a+b+c+d

Example:
If a=[1,0,0]; b=[0,1,0]; c=[0,0,1], d=[0.01,0.01,0]
The resulting volume will be very close to 1. Actually, the 16 points are
*1: (0,0,0)
*2: (1,0,0)
*3: (0,1,0)
*4: (0,0,1)
5: (0.01,0.01,0)
6: (1,1,0)
*7: (1,0,1)
*8: (1.01,0.01,0)
*9: (0,1,1)
*10: (0.01,1.01,0)
11: (0.01,0.01,1)
12: (1,1,1)
*13: (1.01,1.01,0)
*14: (1.01,0.01,1)
*15: (0.01,1.01,1)
*16: (1.01,1.01,1)

The ones marked with * are on the outside (12 in total). This polyhedron has
8 faces.

--
hartelijke groeten,

Sander
sander@wereldraadsel.nl

If this helped, please take the time to rate the value of this post
http://rate.affero.net/sander/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLWAVE 5.4 -- idlwave.org
Next Topic: Good Materials

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 16 17:20:42 PDT 2025

Total time taken to generate the page: 0.64150 seconds