Collision with polytopes (II).

New Message Reply Date view Thread view Subject view Author view

Francesc Blanes Kirchner (cesc++at++matrust.es)
Wed, 20 Oct 1999 09:29:11 +0100


Hello all,

I' ve been making more tests and I think I don't understand how
polytopes works concerning intersections.

I made two test, as you can see below, with results that are very
strange for me.

Is there anybody that can explain me what I'm doing wrong?
How can I test for collision between two objects (not between boundary
boxes).

Running Performer 2.2 on a Onyx RE2 with IRIX 6.2

Thanks again!!

********** TEST 1 **********************
===========================================
ptope1 (should be a cube)
===========================================
pfPolytope: 0x1807acd0 6 facets
_facets[0]
pfPlane: normal 1.000000 0.000000 0.000000
offset 1.000000
_facets[1]
pfPlane: normal 0.000000 1.000000 0.000000
offset 1.000000
_facets[2]
pfPlane: normal 0.000000 0.000000 1.000000
offset 1.000000
_facets[3]
pfPlane: normal -1.000000 0.000000 0.000000
offset 1.000000
_facets[4]
pfPlane: normal 0.000000 -1.000000 0.000000
offset 1.000000
_facets[5]
pfPlane: normal 0.000000 0.000000 -1.000000
offset 1.000000
===========================================
ptope2 (should be 3 planes)
===========================================
pfPolytope: 0x1807ad00 3 facets
_facets[0]
pfPlane: normal 1.000000 0.000000 0.000000
offset 2.000000
_facets[1]
pfPlane: normal 0.000000 1.000000 0.000000
offset 2.000000
_facets[2]
pfPlane: normal 0.000000 0.000000 1.000000
offset 2.000000

pfPtopeContainsPtope(ptope2,ptope1) is 3 (I expected 7)
pfPtopeContainsPtope(ptope1,ptope2) is 3

********** TEST 2 **********************
===========================================
ptope1 (should be a cube)
===========================================
pfPolytope: 0x1807acd0 6 facets
_facets[0]
pfPlane: normal 1.000000 0.000000 0.000000
offset 1.000000
_facets[1]
pfPlane: normal 0.000000 1.000000 0.000000
offset 1.000000
_facets[2]
pfPlane: normal 0.000000 0.000000 1.000000
offset 1.000000
_facets[3]
pfPlane: normal -1.000000 0.000000 0.000000
offset 1.000000
_facets[4]
pfPlane: normal 0.000000 -1.000000 0.000000
offset 1.000000
_facets[5]
pfPlane: normal 0.000000 0.000000 -1.000000
offset 1.000000
===========================================
ptope2 (should be 4 planes, on more than in test1)
===========================================
pfPolytope: 0x1807ad00 4 facets
_facets[0]
pfPlane: normal 1.000000 0.000000 0.000000
offset 2.000000
_facets[1]
pfPlane: normal 0.000000 1.000000 0.000000
offset 2.000000
_facets[2]
pfPlane: normal 0.000000 0.000000 1.000000
offset 2.000000
_facets[3] <--- NEW
pfPlane: normal -1.000000 0.000000 0.000000
offset 2.000000

pfPtopeContainsPtope(ptope2,ptope1) is 0 (I expected 7)
pfPtopeContainsPtope(ptope1,ptope2) is 3

--
+----------------------------------------------------------------------+
|   Francesc Blanes Kirchner          Email:   mailto:cesc++at++matrust.es  |
|   Matrust, S.L.                     Phone:   (34) 934.090.115        |
|   Barcelona - Spain                 Fax  :   (34) 934.090.116        |
+----------------------------------------------------------------------+


Hello all, 

I' ve been making more tests and I think I don't understand how polytopes works concerning intersections. 

I made two test, as you can see below, with results that are very strange for me. 

Is there anybody that can explain me what I'm doing wrong?

How can I test for collision between two objects (not between boundary boxes).

Running Performer 2.2 on a Onyx RE2 with IRIX 6.2

Thanks again!!


********** TEST 1 ********************** 
=========================================== 
ptope1 (should be a cube) 
=========================================== 
pfPolytope: 0x1807acd0 6 facets 
_facets[0] 
pfPlane: normal 1.000000 0.000000 0.000000 
offset 1.000000 
_facets[1] 
pfPlane: normal 0.000000 1.000000 0.000000 
offset 1.000000 
_facets[2] 
pfPlane: normal 0.000000 0.000000 1.000000 
offset 1.000000 
_facets[3] 
pfPlane: normal -1.000000 0.000000 0.000000 
offset 1.000000 
_facets[4] 
pfPlane: normal 0.000000 -1.000000 0.000000 
offset 1.000000 
_facets[5] 
pfPlane: normal 0.000000 0.000000 -1.000000 
offset 1.000000 
=========================================== 
ptope2 (should be 3 planes) 
=========================================== 
pfPolytope: 0x1807ad00 3 facets 
_facets[0] 
pfPlane: normal 1.000000 0.000000 0.000000 
offset 2.000000 
_facets[1] 
pfPlane: normal 0.000000 1.000000 0.000000 
offset 2.000000 
_facets[2] 
pfPlane: normal 0.000000 0.000000 1.000000 
offset 2.000000 

pfPtopeContainsPtope(ptope2,ptope1) is 3 (I expected 7) 
pfPtopeContainsPtope(ptope1,ptope2) is 3 

********** TEST 2 ********************** 
=========================================== 
ptope1 (should be a cube) 
=========================================== 
pfPolytope: 0x1807acd0 6 facets 
_facets[0] 
pfPlane: normal 1.000000 0.000000 0.000000 
offset 1.000000 
_facets[1] 
pfPlane: normal 0.000000 1.000000 0.000000 
offset 1.000000 
_facets[2] 
pfPlane: normal 0.000000 0.000000 1.000000 
offset 1.000000 
_facets[3] 
pfPlane: normal -1.000000 0.000000 0.000000 
offset 1.000000 
_facets[4] 
pfPlane: normal 0.000000 -1.000000 0.000000 
offset 1.000000 
_facets[5] 
pfPlane: normal 0.000000 0.000000 -1.000000 
offset 1.000000 
=========================================== 
ptope2 (should be 4 planes, on more than in test1) 
=========================================== 
pfPolytope: 0x1807ad00 4 facets 
_facets[0] 
pfPlane: normal 1.000000 0.000000 0.000000 
offset 2.000000 
_facets[1] 
pfPlane: normal 0.000000 1.000000 0.000000 
offset 2.000000 
_facets[2] 
pfPlane: normal 0.000000 0.000000 1.000000 
offset 2.000000 
_facets[3]     <--- NEW 
pfPlane: normal -1.000000 0.000000 0.000000 
offset 2.000000 

pfPtopeContainsPtope(ptope2,ptope1) is 0  (I expected 7) 
pfPtopeContainsPtope(ptope1,ptope2) is 3 

-- 
+----------------------------------------------------------------------+
|   Francesc Blanes Kirchner          Email:   mailto:cesc++at++matrust.es  |
|   Matrust, S.L.                     Phone:   (34) 934.090.115        |
|   Barcelona - Spain                 Fax  :   (34) 934.090.116        |
+----------------------------------------------------------------------+

 


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Wed Oct 20 1999 - 00:29:10 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.