Question about polygons in object graphics [message #10995] |
Mon, 23 February 1998 00:00 |
bowman
Messages: 121 Registered: September 1991
|
Senior Member |
|
|
I am trying to convert some direct graphics 3-D rendering programs to
object graphics, and I am very low on the object graphics learning curve.
For simplicity in my education at this point I generate a set of triangles
that form a 3-D surface mesh. The data consists of 3 lists of the x, y,
and z-coordinates of each vertex, and a (4 x n_triangles) array 'tri' of
indices that define the triangles. These are set up in the manner used by
POLYSHADE, and I can successfully plot the surface, i.e.
image3 = POLYSHADE(x, y, z, tri, /T3D)
after setting up the 3-D transform, etc.
The documentation for the IDLgrPolygon object gives the impression that it
takes polygon data in the same format, i.e.,
surface = OBJ_NEW('IDLgrPolygon', x, y, z, POLYGONS = tri)
However, when I try to render the surface, I get a blank (white) window.
I have tried adding triangles one at a time omitting the POLYGONS
keyword. This works only when I transpose the coordinate array from what
the documentation indicates, which then renders an incorrect (black)
triangle.
The possible explanations that I have come up with for this behavior (in
order of highest to lowest probability) are:
1. I'm doing something wrong.
a. Colors all set to white?
b. Vertices in wrong order?
c. I don't have a clue what I'm doing and will never understand
object graphics.
2. Documentation is incorrect.
3. There's a bug somewhere.
Any help here would be greatly appreciated. I have tried a large number
of possible permutations of parameters, etc. to no avail. I have not
screamed in frustration yet, but I'm getting ready to.
E-mail responses appreciated. Replace the AT in my e-mail address with
the symbol of the same name.
k-bowmanATtamu.edu
Thanks, Ken Bowman
|
|
|