Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!sgi!shinobu!odin!sgihub!dragon!bananapc.wpd.sgi.com!ciemo From: ciemo@bananapc.wpd.sgi.com (Dave Ciemiewicz) Newsgroups: comp.sys.sgi Subject: Re: quad strips bugs ? Message-ID: <1991Apr29.164513.8056@dragon.wpd.sgi.com> Date: 29 Apr 91 16:45:13 GMT References: <9104280445.AA10669@karron.med.nyu.edu> Sender: news@dragon.wpd.sgi.com (CNews Account) Reply-To: ciemo@bananapc.wpd.sgi.com (Dave Ciemiewicz) Organization: Silicon Graphics, CASE Group Lines: 67 In article <9104280445.AA10669@karron.med.nyu.edu>, Dan Karron@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 \___/\__/\_/ /_/ / \__/ *