To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 5675
5674  |  5676
Subject: 
Re: VB - parts and transformation matrices, Z-ordering, optional lines, bow-tied quads - help!
Newsgroups: 
lugnet.cad
Date: 
Mon, 26 Mar 2001 18:01:01 GMT
Viewed: 
475 times
  
In lugnet.cad, Steve Bliss writes:
In lugnet.cad, Daniel Crichton wrote: •   ...
4). Any algorithms for sorting out bow-tied quads? I've found a few parts
that don't render well at all, and it appears that the points are not stored
in a clockwise/anti-clockwise direction, so my filled polygons come out as 2
triangles meeting at vertices.

LDraw sorts the 4 vertices (mapped into the screen-world) by ascending Y,
then increments from min(Y) to max(Y), drawing horizontal lines between the
outermost X values at each Y.  It's ugly and slow, but it does the job.

Once upon a time I attempted to describe the 3D (world coordinate) algorithm
for this.  Try this link.

http://news.lugnet.com/cad/dev/?n=4253

Hope that helps.  Otherwise, you can look at the ldglite source code if you
don't mind C.  It uses the 2D screen coordinate method for the ldlite parser,
and the 3D coordinate method for the L3 parser.

Don



Message is in Reply To:
  Re: VB - parts and transformation matrices, Z-ordering, optional lines, bow-tied quads - help!
 
(...) Sounds like it's a problem in your code to handle type-1 lines. Could you post some images of the problem renders? (...) You can't completely sort polygons by z-order -- some polygons cross each other in z-depth. Are you using a z-buffer to (...) (24 years ago, 26-Mar-01, to lugnet.cad)

8 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR