quad strips bugs ?
Dave Ciemiewicz
ciemo at bananapc.wpd.sgi.com
Tue Apr 30 02:45:13 AEST 1991
In article <9104280445.AA10669 at karron.med.nyu.edu>, Dan Karron at UCBVAX.BERKELEY.EDU writes:
|>
|> I am trying to use the bgnqstrip and endqstrip commands to draw
|> filled squares.
|>
|> I keep getting a figure that looks like it is starting at the
|> local origin, then drawing my square, then returns to the origin.
|>
|> I have worked around it by using the polygon functions, but
|> I was wondering if this was a known problem. My data is good because
|> I get the expected results from the poly calls.
|>
|> Cheers!
|>
Quad-strips are a bit tricky for the uninitiated. The following example
may clarify things enough for you to be successful.
EXAMPLE
To create a quad strip for the following diagram:
v0 v2 v4
(0,1,0) (1,1,0) (2,1,0)
o-----o-----o
| | |
| | |
| | |
o-----o-----o
(0,0,0) (1,0,0) (2,0,0)
v1 v3 v5
thus drawing the quadrilaterals (v0, v1, v3, v2) and (v2, v3, v5, v4),
you should specify the vertices in the order:
bgnqstrip();
v3f(v0);
v3f(v1);
v3f(v2);
v3f(v3);
v3f(v4);
v3f(v5);
endqstrip();
Notice that this zigzag traversal is special:
v0 v2 v4
(0,1,0) (1,1,0) (2,1,0)
o _ o _ o
| / | / |
| / | / |
v / v / v
o o o
(0,0,0) (1,0,0) (2,0,0)
v1 v3 v5
v0, v1, and v2 (in this example) specify a normal for backface removal
which is pointing out of the screen or page toward you.
Hope this helps.
--
__ * __ _ __ ___
/ \ / / / / \/ \/ \ "Me brain hurts!"
/ / \/ / /\ / / --- P.T. Gumby
\___/\__/\_/ /_/ / \__/
*
More information about the Comp.sys.sgi
mailing list