performance of intersectWithLine alg

Miller, James V (CRD) millerjv at crd.ge.com
Wed Jun 16 08:52:21 EDT 1999


A lot of effort was put into CellLocator::IntersectWithLine() to make it efficient.  I haven't
looked at OBBTree yet to see what can be done.

One hint is that I do NOT use the automatic max depth and bucket size adjustments for CellLocator.  I
explicitly set the depth to the maximum depth that I can use comfortably in memory.  This usually
works out to be a depth of 6, dividing space into 64x64x64 "buckets".

On your tolerance value,  if your boxes are 0.025 units you probably want your tolerance on the
intersect with line call to be much smaller.  This tolerance is used to "force" an intersection
whenever a line comes "close" to cell (but doesn't actually need to hit it). If this tolerance is too
high, you'll get an incorrect intersection point.

Finally, try to limit the length of your line if possible.  It is tempting to construct lines that
span the entire dataset and have IntersectWithLine find the intersection.  But depending on your
needs you might be able to shorten the span of this line.  The shorter the span the faster
IntersectWithLine will be. 'Course this is only useful if you are looking for cells within a
specified distance along a line.



-----Original Message-----
From: Eddy Kuo [mailto:ekuo at homemail.com]
Sent: Tuesday, June 15, 1999 9:10 PM
To: vtkusers
Subject: performance of intersectWithLine alg


Hello vtkers:

I am trying to cast rays into a scene consists of 10000 randomly
distributed boxes with average width about 0.025 unit.
I have tried to use intersectWithLine from vtkCellLocator, and
vtkOBBTree, the performance was terrible,
and what strike me is that vtkCellLocator out perform vtkOBBTree by a
significant amount (in 100 times magnitude)
I have set both alg to use Automatic max depth and bucket size ajustment
(for celllocator).  I also set tolerance to
be 0.025   Is there something that I did wrong?

Appreciate for any help or comment.

Ed.



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list