     simulator.put pattern, cx, cy #pattern roughly at the center
     
     order = 3
-    interpSteps = 2
+    interpSteps = 1
     smoothing = 4
     @tubeRadius = 0.1
     @isim = new CircularInterpolatingSimulator simulator, order, interpSteps, smoothing


prevTime = null
stepsLeft = 0
stepsPerMs = 5 / 1000

animate = ->
  requestAnimationFrame animate

      pushXYZ x,y+yn2,z+zn2
      pushXYZ x+xn1,y,z+zn1
      pushXYZ x,y-yn2,z-zn2
      if iz >0 and Math.abs(dx)+Math.abs(dy) < jumpTreshold
        for j in [0...4]
          j1 = (j+1)%4
          pushQuad vindex-4+j, vindex+j, vindex-4+j1, vindex+j1

    if curIx isnt ixs.length
      #then throw new Error "Not all indices filled"
      console.log "Indices skip: #{ixs.length - curIx}"
      ixs = ixs.subarray 0, curIx
    if curV isnt vs.length then throw new Error "Not all vertices filled"

    tube = new THREE.BufferGeometry()
