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 / 3481
3480  |  3482
Subject: 
Re: Line in the Sand
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 15 Dec 1999 16:16:42 GMT
Viewed: 
2550 times
  
In lugnet.cad.dev, Jacob Sparre Andersen wrote:

[ Still discussing
http://www.geocities.com/SouthBeach/Lagoon/8641/bfcspecv4.txt ]

Steve:

4 INVERTNEXT
4 This option is used directly before a subfile command (linetype 1).  It is
4 a flag, indicating to the renderer that the subfile reference should
4 have its orientation inverted, i.e. the inside/outside definition should be
4 swapped.  Inverted subfiles must be preceeded by a 0 BFC INVERTNEXT statement,
4 and the 0 BFC INVERTNEXT statement may not appear anywhere else in a file.
9 The INVERTNEXT flag applies *only* to the one subfile which immediately
9 follows.  Any subfile commands afterward are processed normally.

# I'll try a complete reformulation:

4 INVERTNEXT
J This option is used to swap the definitions of "inside" and "outside" (i.e.
J from which side the polygons can be seen) of a single subfile.
J This option can only be used on a line immediately preceeding a line with a
J subfile command (linetype 1), and it only influences that single subfile
J reference.
J Specifically, the sign of the determinant of the orientation matrix should
J not be considered, when a rendering program determines if a subfile is
J turned inside-out.

# Is it clear this way?

I like your explanation better, but I think we're both missing the point: this
paragraph is supposed to be about INVERTNEXT, not inversion.  Fewer details are
appropriate at this point.  More details should go in (1) the explanation of
inversion in the "Language Extension Functionality" and (2) pseudo-code for the
BFC() function.

The documentation for INVERTNEXT should be focused the specifics of INVERTNEXT,
not on the definition/affect of inversion:

S INVERTNEXT
S This option inverts a subfile.  It may only be used immediately before a
S subfile command line, and nowhere else.
S
S Example:
S 0 BFC INVERTNEXT
S 1 16 0 0 0 1 0 0 0 1 0 0 0 1 somefile.dat
S 1 16 0 0 0 1 0 0 0 1 0 0 0 1 another.dat
S
S In this example, somefile.dat would be rendered as inverted.  Another.dat
S would not be inverted.
S
S For further information, see "Inversion" in the Language Extension
S Functionality section.

For now, I'm not going to change the INVERTNEXT paragraph.  It does need to be
clarified, and I'll add that to the issues list.  But before making changes, I'd
like to hear back from you (and anyone else) on my comments and suggestions.

--------------------------------------------------------------------------------
[Matrix inversions]

Question:  should there be a definition-entry for matrix-inversion?
Second question: why did we decide that matrix-inversions were evil?  I remember
being thick-headed about seeing the problem, but now I don't remember what the
problem is.

Try this:
  Matrix Inversions.  Rendering engines will need to correct for transformation
1 matrices which inadvertently invert a subfile.  They will also need to
1 allow for situations in which the matrix is deliberately given a negative
9 determinant, in order to mirror the subfile.
9
9 The typical method of determining that the file has been manually inverted is
9 to calculate the determinate of the transformation matrix.  If the determinate
9 is negative, then the subfile has been inverted.  This document does not
9 attempt to address the details of 3D graphics algorithms and issues.

# %s/determinate/determinant/g ?

Er, yes.

BTW, should I change "transformation matrix" to "orientation matrix" when
discussing the matrix being used to map the current (sub)file onto the screen?
(This corresponds to AccumTransformMatrix in the pseudo-code) (which can also be
renamed)

9 The typical way to adjust for matrix inversions is to switch the winding of
9 the polygon vertices.  That is, if the DAT specifies the winding as CW, and
9 the current subfile has been inverted, the rendering program would proceed as
9 if the winding is CCW.

# I am not sure this actually clarifies things more. See if
# the text with the INVERTNEXT is enough.

OK, let me check. (scroll, scroll, scroll).  Nope.  You suggested the following
text:

J Specifically, the sign of the determinant of the orientation matrix should
J not be considered, when a rendering program determines if a subfile is
J turned inside-out.

But that is not sufficient.  AFAIK, an inverted orientation matrix will reverse
the results of BFC-testing.  So the rendering program must do more than
disregard the determinants.  It must adjust for the effects of the matrix on the
polygons and their normal vectors.

I changed it to:

9    If Command.LineType != BFC Then
4       InvertNext = FALSE
9    ElseIf No Option in Command is INVERTNEXT Then
9       InvertNext = FALSE
4    End If

... to avoid any problems with evaluating tests in compound boolean expressions.

# Probably better, even though the "or else" is very clear
# (for Ada programmers ;-).

It's clear, especially one-liners like this example, but I like having verbiage
wrap around both the beginning and end of nested statement blocks, to keep
everything straight.

Steve



Message has 1 Reply:
  Re: Line in the Sand
 
[ Still discussing (URL) ] Steve: [...] (...) Correct. (...) J subfile command line, and it only influences the immediately J following subfile command. I don't think the "and nowhere else" is that important. You already have written "only". (...) (...) (24 years ago, 16-Dec-99, to lugnet.cad.dev)

Message is in Reply To:
  Re: Line in the Sand
 
[ Still discussing (URL) ] Steve: (...) That makes sense. (...) I'll reuse the notation. ---...--- (...) # Fine. (...) # I'll try a complete reformulation: 4 INVERTNEXT J This option is used to swap the definitions of "inside" and "outside" (i.e. J (...) (24 years ago, 14-Dec-99, to lugnet.cad.dev)

85 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