Visualization, Spring'98, Yap

HOMEWORK 3:
AUTOMATIC MODEL GENERATION

FILES

Communication between components is through the use of files.
  1. These files are also our database.
  2. All files are in ascii, and human understandable.
    • Thus, if your program uses output from the neighborhood generator, you can initially hand code your own input files. without waiting for the neighborhood generator to be completed.
    • Furthermore, you can modify any computer generated output files.
  3. Comment in a file uses C++ syntax (// for single line comments, /* ... */ for multiline comments)
  4. All white spaces and newlines are equivalent, and amount to separators of tokens. This means that you ought to use white space and newlines to format human readable files!
  5. Every data item begins with a tag, which has the form
    [tagname]
  6. The values associated with a given [tagname] is everything until the next tag.
  7. There are two kinds of values: numerical values (e.g., 0.0, 345, 21.99) and string values (e.g., "Street Parameters") which are in double quotes.
  8. Each file begins with a type: E.g., in a file containing the global parameters for a list of streets, the first item is
    [FILETYPE] "Street Parameters"
    So "Street Parameters" is the value of the tag [FILETYPE]
  9. If a tagged item has vector values, then this is enclosed in parenthesis, with components separated by commas.
    [ORIGIN] (0,0,0)
  10. If a tagged item has several components, and each component has a name, and the component values are written as comma-separated sequence of equalities:
    [BOUNDING BOX] xmin=0, ymin=0,
      xmax=1000, ymax=1500,
      hmin=0, hmax=200
  11. Some tagged items has value that is a sequence of unnamed values:
    [BOUNDING POLYGON] (0,0), (100,0), (200,150), (200,500), (0,500)
  12. The last tag is a file is always [ENDFILE].