home *** CD-ROM | disk | FTP | other *** search
/ Encyclopedia of Graphics File Formats Companion / GFF_CD.ISO / formats / radiance / spec / langs.txt < prev    next >
Text File  |  1994-06-01  |  5KB  |  207 lines

  1. Altogether there are at least 4 "languages"
  2. involved with Radiance scene descriptions: the basic scene input
  3. language, the function file language, the data file language and
  4. the font language. All except the function file language are
  5. exceedingly simple.
  6.  
  7. Scene Input
  8. ===========
  9.  
  10. statement:     primitive
  11.                | alias
  12.                | command
  13.                | comment
  14.  
  15. primitive:     STRING type STRING
  16.                INTEGER string_args
  17.                INTEGER integer_args
  18.                INTEGER real_args
  19.  
  20. alias:         STRING alias STRING STRING
  21.  
  22. command:       `!' STRING string_args
  23.  
  24. comment:       `#' string_args
  25.  
  26. string_args:   /* nothing */
  27.                | STRING string-args
  28.  
  29. integer_args:  /* nothing */
  30.                | INTEGER integer_args
  31.  
  32. real_args:     /* nothing */
  33.                | REAL real_args
  34.  
  35. type:          "polygon"
  36.                | "cone"
  37.                | "sphere"
  38.                | "texfunc"
  39.                | "ring"
  40.                | "cylinder"
  41.                | "instance"
  42.                | "cup"
  43.                | "bubble"
  44.                | "tube"
  45.                | "plastic"
  46.                | "metal"
  47.                | "glass"
  48.                | "trans"
  49.                | "dielectric"
  50.                | "interface"
  51.                | "plasfunc"
  52.                | "metfunc"
  53.                | "brightfunc"
  54.                | "brightdata"
  55.                | "brighttext"
  56.                | "colorpict"
  57.                | "glow"
  58.                | "source"
  59.                | "light"
  60.                | "illum"
  61.                | "spotlight"
  62.                | "mirror"
  63.                | "transfunc"
  64.                | "BRTDfunc"
  65.                | "plasdata"
  66.                | "metdata"
  67.                | "transdata"
  68.                | "colorfunc"
  69.                | "antimatter"
  70.                | "colordata"
  71.                | "colortext"
  72.                | "texdata"
  73.                | "mixfunc"
  74.                | "mixdata"
  75.                | "mixtext"
  76.                | "prism1"
  77.                | "prism2"
  78.  
  79. Function File
  80. =============
  81.  
  82. decl:          ';'
  83.                | function_decl ';'
  84.                | variable_decl ';'
  85.  
  86. function_decl: ID '(' id_list ')' assign_op e1
  87.  
  88. variable_decl: ID assign_op el
  89.  
  90. id_list:       ID
  91.                | ID ',' id_list
  92.  
  93. assign_op:     '='
  94.                | ':'
  95.  
  96. e1:            e1 '+' e2
  97.                | e1 '-' e2
  98.                | e2
  99.  
  100. e2:            e2 '*' e3
  101.                | e2 '/' e3
  102.                | e3
  103.  
  104. e3:            e4 '^' e3
  105.                | e4
  106.  
  107. e4:            '+' e5
  108.                | '-' e5
  109.                | e5
  110.  
  111. e5:            '(' e1 '('
  112.                | ID
  113.                | ID '(' id_list ')'
  114.                | REAL
  115.                | '$' INTEGER
  116.  
  117. Comments may appear between any two tokens set off by curly
  118. braces {}, and may be nested to any level.
  119.  
  120. Data File
  121. =========
  122.  
  123. data:          dimensions value_list
  124.  
  125. dimensions:    INTEGER dim_list
  126.  
  127. dim_list:      dim
  128.                | dim dim_list
  129.  
  130. dim:           REAL REAL INTEGER
  131.                | '0' '0' INTEGER indep_list
  132.  
  133. indep_list:    REAL
  134.                | REAL indep_list
  135.  
  136. value_list:    /* nothing */
  137.                | REAL value_list
  138.  
  139. Font File
  140. =========
  141.  
  142. glyph_list:    /* nothing */
  143.                | glyph glyph_list
  144.  
  145. glyph:         INTEGER INTEGER coord_list
  146.  
  147. coord-list:    /* nothing */
  148.                | INTEGER INTEGER coord_list
  149.  
  150. --------------------------------------------------------------
  151.  
  152. With regards to your topics, I have the following comments.
  153.  
  154. Specification of scene parameters:
  155.      - Radiance uses a right-hand coordinate system
  156.      - The eyepoint and view direction are given as options to
  157.             the renderers, and can be stored in a separate file
  158.  
  159.  
  160. Supported primitives:
  161.      - N-sided polygons
  162.      - spheres
  163.      - cones, cylinders, rings
  164.      - hierarchical instancing for very complex geometries
  165.  
  166. Lighting models:
  167.      - Completely general
  168.      - Converter provided for IES luminaire specification
  169.  
  170. Textures:
  171.      - I break "textures" into two kinds, patterns and textures
  172.      - Patterns are variation in color, and can be specified as
  173.                pictures, data or functions in any combination
  174.      - Textures are perturbations in surface normal, and can
  175.                be specified in the same ways as patterns
  176.      - A light source distribution is a pattern
  177.  
  178. Bit Mapping:
  179.  
  180.      - Usually given as a picture-type pattern (ie. "colorpict"
  181.                type)
  182.      - True bit-maps (ie. 1-bit depth images) may also be
  183.                produced using a special bit font
  184.  
  185. CSG:
  186.  
  187.      - Radiance has an "antimatter" type which supports some
  188.                rudimentary CSG subtraction, but otherwise we are
  189.                strictly B-rep
  190.  
  191. Looping constructs or Recursion:
  192.      - The function file language supports recursion
  193.      - The "xform" program provides iteration for repeated
  194.                objects
  195.  
  196. Functions or Procedures:
  197.      - The function file language supports functions without side
  198.                effects
  199.  
  200. User extensibility:
  201.      - The user may create function files, data files and font
  202.                files, or provide his/her own images for patterns
  203.      - General bidirectional reflection distribution functions
  204.                may also be specified in the same way as patterns  
  205.              and textures
  206.  
  207.