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:
8 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|