IDL Graphics Objects & Heap Variables [message #47587] |
Wed, 15 February 2006 11:34  |
Mike[3]
Messages: 1 Registered: February 2006
|
Junior Member |
|
|
I cluged together the following code in an attempt to render 3D obj
files (similar to CAD models) in an interactive IDL window. By
"cluged", I mean that I modified the existing XPLOT3D code to create
PolyPlot3D. PolyPlot3D renders individual facets into an interactive
window. Using the OVERPLOT keyword, I can place many facets on the
same window, ultimately building a 3D rendering of an object.
While the code appears to work, it slows down tremendously for obj
files with more than 2,000 facets. I believe it slows down b/c the
code generates a heap variable to keep track of every rendered facet.
My opinion here: the heap variable is necessary to maintain z-buffer
heirarchy information.
A few questions: (1) Can anyone confirm that the heap variables are
causing my code to slow down? (2) Does anyone have any suggestions for
how I might be able to speed up my renderings?
If anyone is inclined to check out my code, they are attached on my
wiki page at the following URL:
http://wiki.cis.rit.edu/bin/view/People/MikeFosterGUIFinalPr oject?CGISESSID=01bde2a2d02fcd405336d0b5fe490658
To actually run the code, please download the following files from the
wiki site:
(1) vertex.dat
(2) faces2.dat
(3) polyplot3d.pro
(4) Renderedpickup.obj.pro
Compile the polyplot3d.pro function before running
Renderedpickup.obj.pro. Vertex.dat and faces2.dat are ASCII files with
all of the vertex / connectivity information associated with the pickup
model.
Thanks for reading this far,
Mike
|
|
|