 
     # x, y pairs of the tube cross-section
     @tubeShape = nGonVertices (options.tubeSides ? 3), (options.tubeRadius ? 0.1)
+
+    # Normals from the previous call
+    @prevNormals = new Float32Array @nCells*3
+    for i in [0...@nCells*3] by 3
+      @prevNormals[i] = 1
+      @prevNormals[i+1] = 0
+      @prevNormals[i+2] = 0
+    return
     
   #to make chunk of N segments, we need n+3 states.
   # before-first, first, ... , last, after-last.

      x=xy[tubeIndex]
      y=xy[tubeIndex+1]

      #vectr from the previous point to this
      dx = xyNext[tubeIndex] - xyPrev[tubeIndex]
      dy = xyNext[tubeIndex+1] - xyPrev[tubeIndex+1] #y-y0
      #dz = @stepZ

      #x0 = x
      #y0 = y

      #compute normals
      # noraml of form

      
    r = @tubeRadius

    x_pn=@prevNormals[tubeIndex/2]
    y_pn=@prevNormals[tubeIndex/2+1]
    z_pn=@prevNormals[tubeIndex/2+2]

    #x0 = xys[0][i]
    #y0 = xys[0][i]
    dz = @stepZ
