-*- Text -*-

This file hold descriptions of various development tasks. They are
split into two groups: Stories and Ideas. 

Stories are (supposed to be) well defined and approved features that
merely await implementation. Go right a head and do one.

Ideas are stories in incubation, in need of more details, thought,
etc. Go right ahead and add or refine one.

Once a story becomes a work in progress, the person(s) working on it
should note so at the story-description.

Once a story is finished it should be moved from this file to DONE.

-------------------------------------------------------------------------

STORIES

Better Rendering Window

   Closing the window: if the image is being written to file as well,
   the rendering should not be interrupted. If no file is being
   written the rendering should stop.

   This sounds like a good idea, but should we at some point implement
   a ``proper'' way to interrupt rendering.  Perhaps this should be
   part of the feature that allows us to dump internal state to a
   file.


PNG Output

   If the image is being rendered to a file ending with an extension
   ".png", then it should be written as a PNG image. 

   This may require some modifications to the way images are
   represented internally, but that is OK as long as the performance
   does not degrade. Can be probably implemented with cl-png.

JPG Output

   If the image is being rendered to a file ending with an extension
   ".jpg" or ".jpeg", then it should be written as a JPEG image.

   This may require some modifications to the way images are
   represented internally, but that is OK as long as the performance
   does not degrade. Can be probably implemented with cl-png.

New Primitive: Cylinder

   Implement a finite cylinder primitive. The design should correspond to
   implementation of sphere, plane and box.

First / Any / All Intersections

   WIP: Nikodemus

   Implements a first / any / all scheme for intersection 
   calculations: each object type must implement all three
   intersection functions. It might be possible to allow object to
   implement only a subset, and automatically generate wrappers for
   the missing ones, though. 

CSG

   WIP: Nikodemus

   Intersection, difference, union, inverse, merge.

-------------------------------------------------------------------------

IDEAS

Additional Color Constants

   All the named colors in rgb.txt should be available. There are over
   700 of them, so having them in constants might be less than
   ideal. There should be a nice interface to search and preview them.
   Like: 

      FIND-COLOR regexp => list

  Etc. Other alternatives include a color mixer -- which would be nice
  anyways.

  One way to make this more efficent would be to add support for
  parsing various file formats.  Then this information could be stored
  in a file that is included in the scene, the relevant data parsed
  and the rest thrown away. -dagit

  I'm cool with parsing rgb.txt, otherwise I think we could just write
  color objects to file: no need to parse since it already has a
  written representation that the lisp-reader can read. Damn Lisp is
  cool! -nikodemus

  Are there any existing widget sets we could use to create a simple
  color preview selector?  Perhaps Garnet? -dagit

  I think almost anything should work, but I don't think enough people
  run Garnet, and it's a bit big to include in the distro. Maybe SDL /
  CLX for the duration, since a color picker is rather trivial. In the
  future I'd like to see our GUI stuff made with McClim: that way
  seems to lie the best way combine the scripting aspects and GUI
  stuff of using GRT. But McClim isn't exactly stable yet... -nikodemus

Better Sphere Constructor

   Sphere constructor should accept radius and location in either order,
   and provide reasonable defaults for both. Or maybe they should be
   keyword arguments? It's not as if it were a performance critical function.

Object Definition Macros

   Write macroes that provide a neat abstraction to defining new
   scene-object:

    (def-object sphere 
       (constructor (radius location)
            (do-things-with radius and location)
            (values final-radius final-location))
       (intersect (ray)
            (do-things-with radius location and ray))
       (normal (pos)
            (do-things-with radius location and pos)))

Map-based patterns

Patterned normals

Bounding Volumes

   All finite primitives should be automatically bounded by
   AA-bounding boxes. 

Octree

   Implement spatial subdivision via octree.

Light Buffer

Vista buffer

   Project bounding volumes of objects to image plane: use as
   first-hit speedup: hits nothing / hits small number of objects
   (bypass octree) / hits many objects.

New Primitives

   * cone
   * torus
   * quadric
   * mesh
   * metaballs
   * lathe & SOR

   The program should be smart enough to use SOR when it can stand in
   for lathe, and cylinder instead of a cone. For the user the api should
   be identical. (Just a thought)

Redesign Patterns API

   Basically we want to be able to say (checker +black+ +white+),
   (solid +red+), (solid 0.7), or whatever, and have GRT do what
   we mean without spelling it out. DEFMETHOD is one option,
   typecase & co another.

Enhanced Constructors

   * Automatic conversion of vector to grt-vector. After that
     there is no more need to export GRT-VECTOR. Or is there?

   * Automatic conversion from integer to float.

   * Automatic conversion from number to solid-pattern.

   * Automatic conversion from color to solid-pigment.

Better patterns

   Non-list patterns should take as arguments
   an arbitrary sized list of float->value mappings
   to be used as blend map.

   Alternatively arbitrary number of values can be specified,
   which have implicitly evenly spaced mappings.

Documentation

   TexInfo ? documentation for the system so that it can be read within
   emacs. Once the documentation is up to date, each story that is
   completed also needs to be documented to keep the doc up to date.

