home *** CD-ROM | disk | FTP | other *** search
/ Avalon - 3D Objects & Resources / Avalon.iso / frmtspcs / enff.doc < prev    next >
Text File  |  1995-01-01  |  3KB  |  113 lines

  1. ******************************************
  2. *  Extensions of the Neutral File Format *
  3. *                                        *
  4. *  April 16, 1993                        *
  5. ******************************************
  6.  
  7. Positional Light
  8. ================
  9. Description:
  10. "l" X Y Z I R G B
  11. Format:
  12. l %g %g %g %g %g %g %g
  13. A light is now defined by it's XYZ position, intensity and color. Intensity
  14. is a value between 0 and 1 and color is defined as RGB with values between
  15. 0 and 1 like bachground color.
  16.  
  17. Fill color and shading parameters
  18. =================================
  19. Description:
  20. "f" red green blue Kd Ks Shine T index_of_refraction Ka
  21. Format:
  22. f %g %g %g %g %g %g %g %g %g 
  23. A ambient component Ka was added to the original description of fill color
  24. and shading parameters. Ka should be between 0 and 0.3, the default value 
  25. is 0.2. 
  26.  
  27. Bezier patch
  28. ============
  29. Description:
  30. "pb" u_degree v_degree
  31. x00 y00 z00
  32. x10 y10 z10
  33. ..
  34. xmn ymn zmn    // m==u_degree; m==v_degree
  35.  
  36. Format:
  37. pb %d %d
  38. %g %g %g
  39. ..
  40. %g %g %g
  41.  
  42. u_dgree and v_degree are the degrees of the Bezier patch in direction of
  43. parameters u and v. The description of the degrees is followed by the
  44. coordinates of the Bezier points. A Bezier patch is described by
  45. (u_degree+1)*(v_degree+1) points. The Bezier points are listed in columnwise
  46. order with u as line index and v as column index.
  47.  
  48. NURBS
  49. =====
  50. Description:
  51. "pn" 
  52. u_degree v_degree u_count v_count u_points v_points
  53. u1 u2 ... u_u_points
  54. v1 v2 ... v_v_points
  55. x1 y1 z1 w1
  56. ..
  57. xr vr wr zr            // r = u_points * v_points
  58. [description of trimming curves]
  59. "pn_end"
  60.  
  61. Format:
  62. pn 
  63. %d %d %d %d %d %d
  64. %g %g .. %g
  65. %g %g .. %g
  66. %g %g %g %g
  67. ..
  68. %g %g &g &g 
  69. [description of trimming curves]
  70. pn_end
  71.  
  72. In the first line of a description of a non-uniform rational B-Spline patch
  73. the degree, the dimension of knot vectors and the number of control points
  74. in direction of parameter u and v are listed. This is followed by the listing
  75. of knot vectors, first in direction of u, then in direction of v. After that
  76. the control points (deBoor points) of the patch are listed. The deBoor points
  77. are described in homogeneous coordinates with the weight w as it's fourth
  78. component. The points have to be listed in linewise order with u as line index
  79. and v as column index.
  80.  
  81. There is another kind of NURBS: "nonrational" NURBS. These have the same
  82. description as listed before, only with a new descriptor: "pnn" and without
  83. the weights "w..." in the control points.
  84.  
  85. It is possible to list any number of trimming curves for a NURBS patch
  86. immediately after the description of the patch.
  87.  
  88. Description of a trimming curve:
  89. t_ord t_count t_points
  90. t1 t2 .. t_t_count
  91. x1 y1 z1 w1
  92. ..
  93. xr yr zr wr        // r=t_points
  94.  
  95. Format:
  96. %d %d %d
  97. %g %g .. %g
  98. %g %g %g %g
  99. ..
  100. %g %g %g %g
  101.  
  102. t_ord is the order of the trimming curve, t_count is the dimension of the knot
  103. vector and t_points is the number of control points. The control points are
  104. listed after the description of the knot vector.
  105.  
  106. The whole description of a NURBS patch including trimming curves has to be
  107. completed by the string "pn_end".
  108.  
  109.  
  110.  
  111.  
  112.  
  113.