To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 2948
2947  |  2949
Subject: 
Re: Hidden surface removal, and vertex order in part/primitive DAT files
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 30 Sep 1999 23:25:22 GMT
Viewed: 
534 times
  
Jean-Pierre PARIS wrote in message <37F3B871.74AE196F@wanadoo.fr>...
...
Here is a rough sketch of my algorithm. It's based on ray tracing too.
But, the algorithm presented by Gary has a major problem: it supposes
that the part IS a real solid, and this is not always the case. For some
parts, the quads/triangles did not sit exactly aside because of number
rounding problems.
...


My algorithm doesn't require the vertices to exactly match; I was intending
to pass one ray per polygon through the dat object, not an arbitrarily large
number.  And only if a ray penetrated an even number of polygons would those
polygons be automatically processed.


...
7. Once this poly is oriented, you can also orient all the polys that
are connected to it (and so on): two connected polys share one edge.
This edge orientation is opposite in the tow polys.
8. Repeat from step 1 until all polys are oriented.
...


That's a clever algorithm.

Assuming (after all close vertices are matched up) that no polygons have
zero neighbors, after determining the orientation of one polygon, you could
visit each neighboring polygon (somewhat like a flood fill algorithm) and
determine its orientation easily.  Only one ray would be needed in the
entire process.

-Gary



Message has 2 Replies:
  Re: Hidden surface removal, and vertex order in part/primitive DAT files
 
Gary Williams wrote in message ... (...) Okay, I made a bad assumption there, since a group of polygons may terminate flush against another polygon, without touching its edges. But still I think a performance improvement could be realized by using (...) (25 years ago, 30-Sep-99, to lugnet.cad.dev)
  Re: Hidden surface removal, and vertex order in part/primitive DAT files
 
(...) Sorry, but I think that the even/odd algorithm only work on 'correct' solids. For example, if you take a 'bad' box made of 6 faces that have holes beween them, your algorithm can lit an inside face. And in some parts, such a situation exists. (...) (25 years ago, 2-Oct-99, to lugnet.cad.dev)

Message is in Reply To:
  Re: Hidden surface removal, and vertex order in part/primitive DAT files
 
Hello, Ok guys, I already announced that I coded such a tool in Java. At present, only one Ldrawer has asked for the code. In fact, it's an alpha release. Thus, I should find beta testers first. Anyway it has already translated some pieces! Here is (...) (25 years ago, 30-Sep-99, to lugnet.cad.dev)

56 Messages in This Thread:
















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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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