Index: trunk/packages/vizservers/vtkvis/RpStreamlines.cpp
===================================================================
--- trunk/packages/vizservers/vtkvis/RpStreamlines.cpp	(revision 2317)
+++ trunk/packages/vizservers/vtkvis/RpStreamlines.cpp	(revision 2318)
@@ -14,4 +14,5 @@
 #include <vtkCellArray.h>
 #include <vtkPolyLine.h>
+#include <vtkRegularPolygonSource.h>
 #include <vtkPointData.h>
 #include <vtkCellData.h>
@@ -213,5 +214,5 @@
     seed->SetVerts(cells);
 
-    TRACE("Seed points: %d", seed->GetNumberOfVerts());
+    TRACE("Seed points: %d", seed->GetNumberOfPoints());
 
     _streamTracer->SetMaximumPropagation(maxBound);
@@ -314,5 +315,5 @@
         seed->SetVerts(cells);
 
-        TRACE("Seed points: %d", seed->GetNumberOfVerts());
+        TRACE("Seed points: %d", seed->GetNumberOfPoints());
         vtkSmartPointer<vtkDataSet> oldSeed;
         if (_streamTracer->GetSource() != NULL) {
@@ -330,5 +331,5 @@
 
 /**
- * \brief Use randomly distributed seed points
+ * \brief Use seed points along a line
  *
  * \param[in] numPoints Number of random seed points to generate
@@ -350,5 +351,4 @@
         }
 
-        srand((unsigned int)time(NULL));
         polyline->GetPointIds()->SetNumberOfIds(numPoints);
         for (int i = 0; i < numPoints; i++) {
@@ -366,5 +366,5 @@
         seed->SetLines(cells);
 
-        TRACE("Seed points: %d", seed->GetNumberOfVerts());
+        TRACE("Seed points: %d", seed->GetNumberOfPoints());
         vtkSmartPointer<vtkDataSet> oldSeed;
         if (_streamTracer->GetSource() != NULL) {
@@ -378,4 +378,39 @@
 
         _seedMapper->SetInput(seed);
+    }
+}
+
+/**
+ * \brief Use seed points from an n-sided polygon
+ *
+ * \param[in] numPoints Number of random seed points to generate
+ */
+void Streamlines::setSeedToPolygon(double center[3],
+                                   double normal[3],
+                                   double radius,
+                                   int numSides)
+{
+    if (_streamTracer != NULL) {
+        // Set up seed source object
+        vtkSmartPointer<vtkRegularPolygonSource> seed = vtkSmartPointer<vtkRegularPolygonSource>::New();
+
+        seed->SetCenter(center);
+        seed->SetNormal(normal);
+        seed->SetRadius(radius);
+        seed->SetNumberOfSides(numSides);
+        seed->GeneratePolygonOn();
+
+        TRACE("Seed points: %d", numSides);
+        vtkSmartPointer<vtkDataSet> oldSeed;
+        if (_streamTracer->GetSource() != NULL) {
+            oldSeed = _streamTracer->GetSource();
+        }
+
+        _streamTracer->SetSourceConnection(seed->GetOutputPort());
+        if (oldSeed != NULL) {
+            oldSeed->SetPipelineInformation(NULL);
+        }
+
+        _seedMapper->SetInputConnection(seed->GetOutputPort());
     }
 }
Index: trunk/packages/vizservers/vtkvis/RpStreamlines.h
===================================================================
--- trunk/packages/vizservers/vtkvis/RpStreamlines.h	(revision 2317)
+++ trunk/packages/vizservers/vtkvis/RpStreamlines.h	(revision 2318)
@@ -46,4 +46,7 @@
 
     void setSeedToRake(double start[3], double end[3], int numPoints);
+
+    void setSeedToPolygon(double center[3], double normal[3],
+                          double radius, int numSides);
 
     void setMaxPropagation(double length);
Index: trunk/packages/vizservers/vtkvis/RpVtkRenderer.cpp
===================================================================
--- trunk/packages/vizservers/vtkvis/RpVtkRenderer.cpp	(revision 2317)
+++ trunk/packages/vizservers/vtkvis/RpVtkRenderer.cpp	(revision 2318)
@@ -3123,4 +3123,8 @@
 }
 
+/**
+ * \brief Set the streamlines seed to points distributed randomly inside
+ * cells of DataSet
+ */
 void Renderer::setStreamlinesSeedToRandomPoints(const DataSetId& id, int numPoints)
 {
@@ -3147,4 +3151,7 @@
 }
 
+/**
+ * \brief Set the streamlines seed to points along a line
+ */
 void Renderer::setStreamlinesSeedToRake(const DataSetId& id, double start[3], double end[3], int numPoints)
 {
@@ -3166,4 +3173,33 @@
     do {
         itr->second->setSeedToRake(start, end, numPoints);
+    } while (doAll && ++itr != _streamlines.end());
+
+    _needsRedraw = true;
+}
+
+/**
+ * \brief Set the streamlines seed to vertices of an n-sided polygon
+ */
+void Renderer::setStreamlinesSeedToPolygon(const DataSetId& id,
+                                           double center[3], double normal[3],
+                                           double radius, int numSides)
+{
+    StreamlinesHashmap::iterator itr;
+
+    bool doAll = false;
+
+    if (id.compare("all") == 0) {
+        itr = _streamlines.begin();
+        doAll = true;
+    } else {
+        itr = _streamlines.find(id);
+    }
+    if (itr == _streamlines.end()) {
+        ERROR("Streamlines not found: %s", id.c_str());
+        return;
+    }
+
+    do {
+        itr->second->setSeedToPolygon(center, normal, radius, numSides);
     } while (doAll && ++itr != _streamlines.end());
 
@@ -3397,4 +3433,5 @@
         lut->DeepCopy(cmap->getLookupTable());
 
+#if 0
         if (_useCumulativeRange) {
             lut->SetRange(_cumulativeDataRange);
@@ -3406,4 +3443,5 @@
             }
         }
+#endif
 
         itr->second->setLookupTable(lut);
Index: trunk/packages/vizservers/vtkvis/RpVtkRenderer.h
===================================================================
--- trunk/packages/vizservers/vtkvis/RpVtkRenderer.h	(revision 2317)
+++ trunk/packages/vizservers/vtkvis/RpVtkRenderer.h	(revision 2318)
@@ -358,9 +358,10 @@
     Streamlines *getStreamlines(const DataSetId& id);
 
-    void setStreamlinesSeedToDataSet(const DataSetId& id, vtkDataSet *seed);
-
     void setStreamlinesSeedToRandomPoints(const DataSetId& id, int numPoints);
 
     void setStreamlinesSeedToRake(const DataSetId& id, double start[3], double end[3], int numPoints);
+
+    void setStreamlinesSeedToPolygon(const DataSetId& id, double center[3], double normal[3],
+                                           double radius, int numSides);
 
     void setStreamlinesLength(const DataSetId& id, double length);
Index: trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp
===================================================================
--- trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp	(revision 2317)
+++ trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp	(revision 2318)
@@ -2490,4 +2490,33 @@
 
 static int
+StreamlinesSeedPolygonOp(ClientData clientData, Tcl_Interp *interp, int objc, 
+                         Tcl_Obj *const *objv)
+{
+    double center[3], normal[3], radius;
+    int numSides;
+    for (int i = 0; i < 3; i++) {
+        if (Tcl_GetDoubleFromObj(interp, objv[3+i], &center[i]) != TCL_OK) {
+            return TCL_ERROR;
+        }
+        if (Tcl_GetDoubleFromObj(interp, objv[6+i], &normal[i]) != TCL_OK) {
+            return TCL_ERROR;
+        }
+    }
+    if (Tcl_GetDoubleFromObj(interp, objv[9], &radius) != TCL_OK) {
+        return TCL_ERROR;
+    }
+    if (Tcl_GetIntFromObj(interp, objv[10], &numSides) != TCL_OK) {
+        return TCL_ERROR;
+    }
+    if (objc == 12) {
+        const char *name = Tcl_GetString(objv[11]);
+        g_renderer->setStreamlinesSeedToPolygon(name, center, normal, radius, numSides);
+    } else {
+        g_renderer->setStreamlinesSeedToPolygon("all", center, normal, radius, numSides);
+    }
+    return TCL_OK;
+}
+
+static int
 StreamlinesSeedRakeOp(ClientData clientData, Tcl_Interp *interp, int objc, 
                       Tcl_Obj *const *objv)
@@ -2551,4 +2580,5 @@
 static Rappture::CmdSpec streamlinesSeedOps[] = {
     {"color",   1, StreamlinesSeedColorOp, 6, 7, "r g b ?dataSetName?"},
+    {"polygon", 1, StreamlinesSeedPolygonOp, 11, 12, "centerX centerY centerZ normalX normalY normalZ radius numSides ?dataSetName?"},
     {"rake",    3, StreamlinesSeedRakeOp, 10, 11, "startX startY startZ endX endY endZ numPoints ?dataSetName?"},
     {"random",  3, StreamlinesSeedRandomOp, 4, 5, "numPoints ?dataSetName?"},
Index: trunk/packages/vizservers/vtkvis/protocol.txt
===================================================================
--- trunk/packages/vizservers/vtkvis/protocol.txt	(revision 2317)
+++ trunk/packages/vizservers/vtkvis/protocol.txt	(revision 2318)
@@ -169,4 +169,5 @@
             degrees offset from normal orientation
 streamlines seed color <r> <g> <b> <?datasetName?>
+streamlines seed polygon <centerX> <centerY> <centerZ> <normalX> <normalY> <normalZ> <radius> <numSides> <?dataSetName?>
 streamlines seed rake <startX> <startY> <startZ> <endX> <endY> <endZ> <numPoints> <?datasetName?>
 streamlines seed random <numPoints> <?datasetName?>
