home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / RAY.TXT < prev    next >
Text File  |  1996-08-18  |  27KB  |  594 lines

  1. This month there is only one article, Ray-Tracing with Affine Transforms.
  2. We will be adding the following articles over the next few months. An high
  3. efficiency single phase motor (Patent No. 5,300,870, granted April 5,
  4. 1994). The IMint interface (Patent applied for). Contouring in Hyperspace.
  5. Strange Recursion. And many others.
  6.  
  7. (C)opyright 1995, Seven seas Software Inc., MathVISION Inc.
  8. ---------------------------------------------------------------------------
  9.  
  10.                      Ray-Tracing with Affine Transforms
  11.                               Otto J. A. Smith
  12.                                June 13, 1995
  13. ---------------------------------------------------------------------------
  14.     For a hard copy version of this paper mail requests to the author at
  15.                               otto@olympus.net
  16.        This article is available in post script by anonymous FTP from
  17.                  pub/sites/7seas under the name CONTAIN.PS
  18. ---------------------------------------------------------------------------
  19.  
  20. Abstract:
  21.  
  22.      We derive affine transformations that change the basis of a three
  23.      dimensional world space. The new basis for this space is chosen in
  24.      such a manner that many ray-tracing calculations are simplified,
  25.      particularly when doing z-buffering. We begin with the simple problem
  26.      of determining whether a point is contained in a triangle and extend
  27.      our derivation to three space. We present some algorithm optimizations
  28.      that can make real-world computer programs faster.
  29.  
  30. ---------------------------------------------------------------------------
  31.  
  32. Triangle Containment:
  33.  
  34.      Let Tri( v1, v2, v3) be a triangle in 2-space. Each v and x are
  35.      2-dimensional row vectors. The parameters p1 and p2 are scalars.
  36.      Figure 1
  37.  
  38.      Given a point x, determine if x is interior to Tri( v1, v2, v3). In
  39.      order to make this determination use vectors from the triangle to form
  40.      a basis for the space, then any point can be represented by a
  41.      parametric equation:
  42.  
  43.      (A.) x = v1 + p1( v2 - v1) + p2( v3 - v2)
  44.  
  45.      Now observe the following:
  46.  
  47.        1. When p1 = 1 and 0 < p2 < 1 ,then x is on the line segment ( v2 ,
  48.           v3) .
  49.        2. When p2 = 0 and 0 < p1 < 1 , then x is on the line segment ( v1 ,
  50.           v2) .
  51.        3. When 0 < p1 < 1 and 0 < p2 < 1 and p1 = p2 , then x is on the
  52.           line segment ( v1 , v3) .
  53.  
  54.      We constructed equation (A.) in the manner given here in order to
  55.      insure that the three observations made above were true. Now if p2 <
  56.      p1 then x is on the same side of the line determined by ( v1, v3) as
  57.      v2 . If p2 > p1 then x is on the opposite side of the line. In other
  58.      words, the point x is inside the triangle Tri( v1, v2, v3) when all of
  59.      the following are true:
  60.  
  61.        1. p2 < p1
  62.        2. 0 < p1 < 1
  63.        3. 0 < p2 < 1
  64.  
  65.      Given the triangle Tri( v1, v2, v3) and x one can calculate p1 and p2.
  66.  
  67.      Given the triangle Tri( v1, v2, v3) alone, one can calculate a two by
  68.      two working matrix W such that ( x - v1) W =[ p1, p2 ] where [ p1, p2
  69.      ] is a row vector.
  70.  
  71.      We construct a matrix M and define W = Inv(M) . The notation Inv(M) is
  72.      used to indicate the matrix that is the inverse of M . That is Inv(M)M
  73.      = I , where I is the identity matrix.
  74.  
  75.      x = v1 + p1( v2 - v1) + p2( v3 - v2)
  76.  
  77.      Let M =
  78.  
  79.              |   v2 -  v1  |
  80.  
  81.              |   v3 -  v2  |
  82.  
  83.      Then:
  84.        1. [ p1, p2 ] M = x - v1
  85.        2. [ p1, p2 ] = ( x - v1)Inv(M)
  86.        3. [ p1, p2 ] = ( x - v1) W
  87.  
  88.      In applications where many points will be checked against a single
  89.      triangle this is a fast algorithm. It is fastest if p1 is calculated
  90.      before p2 and verified against the limits zero and one so the
  91.      algorithm can terminate prematurely if the point x is not contained in
  92.      the triangle. If there are many points, the cost of calculating W =
  93.      Inv( M ) is amortized over many points. W is a feature of the triangle
  94.      and not the point being checked which is used in a multiplication with
  95.      the matrix Inv( M ). When M is singular, W does not exist since v1, v2
  96.      and v3, all lie on a straight line. If this is the case the point is
  97.      contained in the "triangle" ( line segment ) only if it is on the line
  98.      defined by any two verticies from v1 , v2 and v3, and in addition has
  99.      verticies from this set in both a positive and a negative direction.
  100.  
  101. Discussion of Basic Algorithm:
  102.  
  103.      I have found no references to the derivation of this technique in the
  104. literature although the technique presented here produces an algorithm that
  105. could also be derived starting from barycentric coordinates. A discussion
  106. of this relationship is included in the appendix for this paper.
  107.  
  108. Before extending the algorithm to three (and higher dimensional spaces) and
  109. showing how it can simplify Ray-Tracing, particularly when doing
  110. z-buffering, we would like to enumerate some of its advantages and
  111. disadvantages.
  112.  
  113. One traditional method of determining containment in a triangle, or convex
  114. polygon, is to generate the equations for the bounding lines and then to
  115. determine which side of each bounding line the point falls on.
  116.  
  117. A second technique is based on the Jorden curve theorem. footnote1
  118.  
  119. I believe there are several reasons why the advantages of the triangle and
  120. hypertriangle containment algorithms presented here are not commonly used.
  121. One reason is that most computer 3-D graphics geometry has been based on
  122. homogeneous footnote7 system of coordinates and transforms taken from the
  123. theory of projective geometry, rather than affine transformations based in
  124. the theory of linear algebra.
  125.  
  126. Another reason is that normally a basis for the space would be constructed
  127. from the vectors (v2 - v1 ) and (v3 - v1) ( instead of (v3 - v2) ) so that
  128. hidden advantages of choosing other sets of vectors for the basis of the
  129. space have not been explored. We will call techniques, such as the one
  130. presented above, in which the vectors are not constructed from a common
  131. origin, Free Choice techniques. We will call techniques in which a common
  132. origin is used, Common Origin techniques. In common origin techniques, one
  133. point in the triangle, ( or hyper-triangle ) is chosen as the origin. In
  134. order to generate the set of vectors that form the basis for the new
  135. coordinate system, the value of this origin is subtracted from the values
  136. of the remaining points in the triangle.
  137.  
  138. I posted a common-origin algorithm on the Internet without comment about
  139. its derivation and recieved a reply from Prof. Dr. Heinrich Giesen pointing
  140. out that it is equivalent to the Barycentric coordinate technique, which is
  141. a well known technique. The demonstration of equivalency is included in the
  142. Appendix .
  143.  
  144. We will not use the common origin technique in this paper because by using
  145. free choice techniques, we can customize the results of our basis change to
  146. give us additional information that is useful and increases the efficiency
  147. of our algorithms.
  148.  
  149. Multi Dimensional Extensions:
  150.  
  151.      The techniques presented above are easily extended to
  152. multi-deminsional spaces.
  153.  
  154. Let Tri( v1, v2, ... , vn) be a hypertriangle in (n-1) -space.
  155.  
  156. Given a point x, determine if x is interior to Tri( v1, v2, ... , vn) .
  157.  
  158. In order to make this determination use vectors from the hypertriangle
  159. Tri( v1, v2, ... , vn) to form a basis for the space.
  160.  
  161. The Free Choice Extension:
  162.  
  163.      Any point x can be represented by a parametric equation:
  164.  
  165.      (B.) x = v1 + p1( v2 - v1) + p2( v3 - v2) + ... + pn-1( vn - vn-1)
  166.  
  167.      When the following conditions are true, the point is contained in the
  168.      hypertriangle.
  169.  
  170.        1. 0 < pi < 1
  171.        2. Given any i , j such that i < j then pi > = pj
  172.  
  173. Common Origin Extension:
  174.  
  175.      In the common origin technique represent an arbitrary point x as
  176.      follows:
  177.  
  178.      (C.) x = v1 + p1( v2 - v1) + p2( v3 - v1) + ... + pn-1( vn - v1)
  179.  
  180.      When the following conditions are true, the point is contained in the
  181.      hypertriangle.
  182.  
  183.        1. 0 < pi < 1
  184.        2. p1 + p2 + ... + pn < 1 .
  185.  
  186. Given the triangle
  187. Tri( v1, v2, ... , vn) and x we can calculate p1 + ... + pn.
  188.  
  189. Given the triangle
  190. Tri( v1, v2, ... , vn) alone we can calculate a working matrix
  191. W = Inv( M ) such that ( x - v1) W =[p1, p2, ... , pn] .
  192.  
  193. In this paper we will most frequently use the free choice technique to
  194. choose vectors with which to calculate the matrix.
  195.  
  196. Two Perspective Problems:
  197.  
  198.      There are two perspective problems that are easily solved using
  199. hypertriangle containment.
  200.  
  201. The two problems for which we disclose new solutions here are,
  202.  
  203.   1. The ray tracing perspective projection problem.
  204.   2. The standard perspective problem.
  205.  
  206. The Standard Perspective Problem:
  207.  
  208.      The standard perspective problem is as follows. Figure 4 We are given
  209.      the following information:
  210.  
  211.        1. The location of a single point t, in world coordinates in
  212.           three-space.
  213.        2. The location of the focal point f, of an eye or a camera in world
  214.           coordinates in three space.
  215.        3. The location of the projection plane P in world coordinates in
  216.           three space. This location is determined by a set of three
  217.           vectors.
  218.           P is defined by the set { r1, r2, r3 } . footnote2
  219.  
  220.      We are asked to determine the point at which a line from the focal
  221.      point of the eye f to the single point t intersects the projection
  222.      plane P. If this point of intersection exists, we will call it t'. We
  223.      are asked to determine the coordinates of t' in the rectangular
  224.      coordinate system of the projection plane P. The projection plane
  225.      represents the surface of a video display device, such as a CRT tube
  226.      and the coordinate system in which we want the information returned is
  227.      the two dimensional pixel coordinates of the CRT tube.
  228.  
  229. The Ray Tracing Perspective Problem:
  230.  
  231.      The ray tracing perspective problem is as follows, Figure 5 We are
  232.      given the following information:
  233.  
  234.        1. The location of the focal point, f of an eye or a camera in world
  235.           coordinates in three space.
  236.        2. The location of the projection plane P in world coordinates in
  237.           three space, (this is three points, the origin of the screen, the
  238.           upper left of the screen and the lower right).
  239.        3. A point x on P in world coordinates footnote3
  240.        4. A two dimensional triangle T = Tri( v1, v2, v3 ) in world
  241.           coordinates. This is a two dimensional triangle embedded in three
  242.           space, its verticies are vectors with three coordinates. In the
  243.           real world systems, the triangle is a portion of the surface of
  244.           an object being ray-traced.
  245.  
  246.      We are asked to determine two different things:
  247.  
  248.        1. Does the line starting at the focal point f and passing through
  249.           the point x, intersect the triangle T? If the intersect exists
  250.           call it x'.
  251.        2. If the intersection exists, what is a measure of the distance
  252.           from the point x to its intersection on the triangle T at x'.
  253.  
  254. Ray Tracing Problem Solved:
  255.  
  256.      Let us use the free choice tetrahedron containment algorithm to
  257. develope a ray tracing perspective technique. If the line starting at the
  258. focal point f and passing through the point x intersects the triangle T,
  259. the first item we are asked to determine, is equivalent to asking if the
  260. point x is contained in the tetrahedron Tri( v1, v2, v3, f) . That is, is x
  261. contained in the tetrahedron defined by the union of the triangle with the
  262. focal point.? ( T U f ). The second item we are asked to determine, is a
  263. measure of the distance from x to its intersection on T.
  264.  
  265. We use this measure for z-buffering. We get this measure as a side benefit
  266. when we use the free choice technique of detecting whether x is in Tri( v1,
  267. v2, v3, f ) . Let the point x be represented as: footnote4
  268.  
  269. (D.) x = f + p1( v1 - f) + p2( v2 - v1) + p3( v3 - v2)
  270.  
  271. Calculate the working matrix W = Inv( M ) that transforms a point into the
  272. new coordinate system represented by the above equation.
  273.  
  274. The three by three matrix of row vectors vectors M is represented as:
  275.  
  276. M =
  277.  
  278.         | v1 -  f  |
  279.  
  280.         | v2 -  v1  |
  281.  
  282.         | v3 -  v2  |
  283.  
  284. from the three by three matrix M calculate W = Inv( M ). Represent W = Inv(
  285. M ) as a matrix of column vectors.
  286.  
  287. W =
  288.  
  289.      | c1   c2   c3 |
  290.  
  291.  
  292.  
  293. The algorithm to obtain the information we need is then as follows:
  294.  
  295.   1. Calculate the dot product p1 = ( x - f) * c1 . If this product is
  296.      greater than one or less than zero the algorithm terminates. Point x
  297.      is not in the tetrahedron.
  298.   2. Calculate the dot product p2 = ( x - f) * c2 . If this product is
  299.      greater than p1 or less than zero the algorithm terminates. Point x is
  300.      not in the tetrahedron.
  301.   3. Calculate the dot product p3 = ( x - f) * c3 . If this product is
  302.      greater than p2 or less than zero the algorithm terminates. Point x is
  303.      not in the tetrahedron.
  304.   4. If the algorithm has not terminated, and we reach this step, We can
  305.      use p1 as a measure of the distance from x to the triangle T since p1
  306.      is simply the ratio of the length of the line segment ( f, x) to the
  307.      length of the line segment ( f, x') where x' is the point at which the
  308.      line intersects T. Since ( f, x) has a fixed length, we can use the
  309.      ratio as a measure.
  310.  
  311. In an actual computer system several things must happen in order to perform
  312. a ray tracing of a world object. First, areas that are not partially
  313. contained on the screen are clipped. One technique for doing this is
  314. disclosed as part of the algorithm for the standard perspective technique
  315. footnote5, then the real world coordinates for each pixel on the display
  316. screen is generated, then the ray from the focal point through the screen
  317. pixel is compared against triangles. The value of p1, our measure, is used
  318. for z-buffering to determine which points are in front of or behind other
  319. points.
  320.  
  321. Standard Perspective Problem Solved:
  322.  
  323.      In the standard perspective problem we are given the following
  324. information:
  325.  
  326.   1. The location of a single point t in world coordinates in three-space.
  327.   2. The location of the focal point f of an eye or a camera in world
  328.      coordinates in three-space.
  329.   3. The location of the projection plane P in world coordinates in three
  330.      space, (this is three points, the origin of the screen, the upper left
  331.      of the screen and the lower right.).
  332.  
  333. Let the viewing area of P that we are interested in be represent by three
  334. coordinates in world-space. P = { r1, r2, r3 } .
  335.  
  336. That is, P is represented by the set of three vectors { r1, r2, r3 } . In
  337. "real world" situations, the vectors ( r2 - r1 ) and ( r3 - r1 ) are
  338. frequently chosen to be orthogonal, simply because the viewing area of the
  339. CRT is rectangular and has right angle corners. We can think of r1 as the
  340. lower left hand corner of the CRT, r2 as the lower right hand corner and r3
  341. as the upper left hand corner. Let t be represented by the equation,
  342.  
  343. (E.) t = f + p1( v1 - f) + p2( v2 - v1) + p3( v3 - v1)
  344.  
  345. This equation has been generated differently than any of the above
  346. equations. It has been constructed this way in order to make two questions
  347. easy to answer.
  348.  
  349.   1. Is t a point that can be projected onto P such that t', the projected
  350.      point is in the rectangle determined by { r1, r2, r3, r2 + ( r3 - r1)
  351.      } ?
  352.   2. What are the coordinates of t' in the two dimensional coordinate
  353.      system determined by P where: footnote6
  354.        1. r1 is chosen to have the coordinates (0,0)
  355.        2. r2 is chosen to have the coordinates (1,0)
  356.        3. r3 is chosen to have the coordinates (0,1)
  357.  
  358. Now construct W = Inv( M ) from M as determined by equation (E.) above
  359. where we express M as:
  360.  
  361. M =
  362.  
  363.         | v1 -  f  |
  364.  
  365.         | v2 -  v1  |
  366.  
  367.         | v3 -  v1  |
  368.  
  369. We calculate W = Inv( M ) from M and let the columns of W be represented
  370. as:
  371.  
  372. W =
  373.  
  374.        |  c1  c2  c3 |
  375.  
  376.  
  377.  
  378. Now in order to solve the standard perspective problem we do the following:
  379.  
  380.   1. Calculate p1 = ( t - f) * c1 . If p1 < 1 then the point t does not
  381.      project onto the rectangle of interest on P and the algorithm
  382.      terminates.
  383.   2. Calculate p2 = ( t - f) * c2 . If p2 < 0 or p2 > 1 then the point t
  384.      does not project onto the rectangle of interest on P and the algorithm
  385.      terminates.
  386.   3. Calculate p3 = ( t - f) * c3. If p3 < 0 or p3 > 1 then the point t
  387.      does not project onto the rectangle of interest on P and the algorithm
  388.      terminates.
  389.   4. If the algorithm has not terminated, then the point t does project
  390.      onto P in the area of interest and t' has the coordinates t' = (
  391.      p2/p1, p3/p1 )
  392.  
  393. Optimizing the algorithm:
  394.  
  395.      There are several ways in which the algorithm can be optimized.
  396. Without going into extensive detail we will give several of them here. Some
  397. properties of the triangles are invarient from different viewpoints. In the
  398. ray tracing problem only one of the rows of the three by three matrix M
  399. depends upon the viewpoint when the matrix is generated using the
  400. free-choice technique. Consequently, two rows of the matrix M are invarient
  401. and need be calculated only once for all viewpoints. This has the added
  402. benefit, that if the inversion is done by calculating the determinant by
  403. expansion of minterms, some of the minterms need be calculated only once
  404. for all viewpoints. Optimizations similar to the above can be realized for
  405. triangles that share a common edge.
  406.  
  407. One can avoid dividing by the determinant when calculating the inverses and
  408. postpone this computation until the comparisons have been made. In this
  409. case comparisons are made against the values of the determinant instead of
  410. one, and the divisions are only made if the containment has been
  411. established and we need to complete the computation.
  412.  
  413. Any set of four non-coplanar (non-colinear) points in three space can act
  414. as a basis for the space. From these four points we can find an affine
  415. transformation that takes any point in world space into a new coordinate
  416. system defined by these points. We can also find an inverse transformation
  417. that takes points from our new coordinate system back into world space.
  418.  
  419. The affine transformation shares the advantages of the homogeneous
  420. coordinate system with transforms. In both systems it is possible to
  421. multiply (concatenate) transforms in order to obtain a new transform
  422. equivalent to applying the transforms in sequence. Transforms for scaling,
  423. reflecting, rotating and distorting are easily constructed and combined and
  424. the inverses of these operations are easily found. This fact is not new,
  425. and has been mentioned in the literature before. The main arguments in
  426. favor of using a homogeneous coordinate system have been that, first, it
  427. reduces the complexity of code. With modern object oriented languages the
  428. code is only minimally more complex for the basic operations with a great
  429. increase in simplicity for more complex operations. Secondly, homogeneous
  430. coordinate systems are used because of the ease of explaining there use and
  431. for historical reasons.
  432.  
  433. This paper is an outgrowth of a larger research project in computer
  434. graphics that began with a 3-D modelling and display program that ran on an
  435. Apple II-E written around 1983. That system did not use a homogeneous
  436. system of coordinates and transformations but used affine transforms
  437. instead to translate points and calculate perspective. The free choice
  438. algorithms are a recent invention derived from that work. Containment is
  439. calculated by generating an affine transformation that takes the the point
  440. we are interested into a space in which simple comparisons can determine
  441. containment and the new coordinate system contains desirable information.
  442.  
  443. In that 1983 computer system, "cameras", that is coordinate systems
  444. associated with a viewpoint were stored or created from four points in
  445. three space. For orthographic projections the three vectors generated from
  446. these four points were orthogonal. Each camera could be used to generate an
  447. affine transformation that would move a vector from world space to camera
  448. space. Perspective transforms were done as they are traditionally done
  449. rather than as presented herein above. Transforms could be convolved into
  450. new transforms as they are in systems using homogeneous coordinates.
  451. Inverses of transforms could also be calculated to take a vector from
  452. camera space to world space. Transforms could also be converted back to
  453. cameras.
  454.  
  455. The system provided a simple language in which sequences of transforms and
  456. objects could be generated mathematically.
  457.  
  458. Some major advantages of the system were.
  459.  
  460.   1. It was significantly faster than equivalent systems on the same
  461.      machine.
  462.   2. Planes and lines did not need to be expressed in their cartesian form
  463.      since they were easily expressed simply as two points or three points
  464.      respectively.
  465.   3. Projections onto polygons were simplified.
  466.   4. The 30% overhead associated with storage of homogeneous coordinate
  467.      system matricies was avoided.
  468.   5. Transformations from any camera (coordinate system) to any other
  469.      camera in the system was easily and simply achieved.
  470.  
  471. On a completely biased note, I prefer the kind of system presented here not
  472. only because it is fast, but because the Mathematics of what is happening
  473. appears to me to be simpler and more transparent to a user of the system.
  474.  
  475. ---------------------------------------------------------------------------
  476.  
  477. Appendix:
  478.  
  479. The Barycentric Coordinate Technique
  480.  
  481.      Represent an arbitrary point x using the equation:
  482.  
  483.      (F.) x = v1 + p1( v2 - v1) + p2( v3 - v1)
  484.  
  485.      Now the point x is contained in the triangle only when all of the
  486.      following conditions hold:
  487.  
  488.        1. When 0 < p2 and
  489.        2. When 0 < p1 and
  490.        3. When p1 + p2 < 1 .
  491.  
  492.      We call this technique, the common origin technique. Figure 3 This is
  493.      based upon a traditional convention that when calculating a new basis
  494.      for a space, the origin of the vectors originate from a common point.
  495.  
  496.      This is equivalent to the using barycentric coordinates. Barycentric
  497.      coordinates are based upon the fact that any point can be represented
  498.      as the sum of the verticies of a triangle times a weight, where the
  499.      sum of the weights equals one.
  500.  
  501.      (G.)
  502.        1. x = p0v1 + p1v2 + p2v3
  503.        2. p0 + p1 + p2 = 1
  504.      Let p0 = 1 - p1 - p2, then (G.)-1 above becomes
  505.  
  506.      x = (1 - p1 - p2) v1 + p1v2 + p2v3 x = v1 + p1( v2 - v1) + p2( v3 -
  507.      v1)
  508.  
  509.      This is identical to (F.) above.
  510.      Return to referance to appendix
  511.  
  512. ---------------------------------------------------------------------------
  513.  
  514.                                  Foot Notes
  515.  
  516.    * footnote 1, Triangle Containment Techniques Compared
  517.  
  518.      Several of these techniques are compared by Eric Haines in Volume 5,
  519.      Number 3, September 2, 1992, of the Ray Tracing News, an internet
  520.      electronic journal. For triangles, his version of the barycentric
  521.      coordinate system algorithm worked best for triangles, but the
  522.      advantages were rapidly lost for polygons with more than three sides.
  523.      We have some optimizations of the algorithm that drastically speed up
  524.      these calculations.
  525.      Return to place document
  526.  
  527.    * footnote 2, Coordinates of CRT
  528.  
  529.      That is, the three points { r1, r2, r3 } determine a rectalinear area
  530.      in three space that we are interested in, possibly the origin, the
  531.      upper left hand corner and the lower right hand corner of a CRT tube.
  532.      Return to place document
  533.  
  534.    * footnote 3, Translating pixel to world coordinates.
  535.  
  536.      Translating pixel coordinates to world coordinates is easily
  537.      accomplished. Let w0 be the world space coordinate of the origin of
  538.      the screen at pixel coordinates (0,0) , let w1 be the world space
  539.      coordinates of the top left of the screen at pixel coordinates (0,399)
  540.      , let w2 be the world space coordinates of the bottom right of the
  541.      screen at pixel coordinates (639,0) . .
  542.  
  543.      The world space coordinates of (X,Y) is then
  544.  
  545.      w0 + Y( w1 - w0 )/399 + X( w2 - w0 )/639.
  546.  
  547.      Generate 640 values for x and 400 values for y and access them by
  548.      their indicies to avoid frequent recalculations when generating scan
  549.      lines.
  550.      Return to place document
  551.  
  552.    * footnote 4, Other free choice vector constructs
  553.  
  554.      It is also possible to substitute a representation as in equation (E.)
  555.      below for equation (D.) and change some of the checking conditions.
  556.      This may be desirable in some real world programs.
  557.      Return to place document
  558.  
  559.    * footnote5, Other algorithms for clipping are known.
  560.  
  561.      There are other more effective ways of doing this clipping when using
  562.      BSD trees and other data structures that partition the world space,
  563.      rather than depending on the algorithms presented here alone.
  564.      Return to place document
  565.  
  566.    * footnote6, Coordinates for projection plane should match CRT
  567.  
  568.      This coordinate system is used to make reading this paper easy. In
  569.      "real world" computer applications, the coordinates would be chosen to
  570.      represent pixel coordinates on a CRT tube.
  571.  
  572.      In otherwords, for a full screen 400 X 640 VGA system appropriate
  573.      coordinates might be r1=(0,0), r2=(640,0), r3=(0,400).
  574.      Return to place document
  575.  
  576.    * footnote7, Definition of homogeneous
  577.  
  578.      "homogenous", as used here does NOT mean a homogeneous system of
  579.      equations, but derives from a projective geometry construct.
  580.      Homogeneous coordinates are used in computer graphics as a redundant
  581.      method of storing vectors. That is in 3-space a vector of length 4 is
  582.      used to store a coordinate. The fourth coordinate is used to scale the
  583.      first three coordinates. For example (12, 8, 4, 4), and (9, 6, 3, 3)
  584.      both represent the coordinate (3, 2, 1).
  585.  
  586.      In a homogenous system of coordinates, the equivalent of a matrix
  587.      multiply, combined with a vector addition, is stored in a four by four
  588.      matrix.
  589.      Return to place document
  590.  
  591. ---------------------------------------------------------------------------
  592.        To MathVision Inc., (formerly 7seas software) Corporate page.
  593. 
  594.