anchor.diff:  End;
   
   { ClothSpring }
  -Procedure ClothSpring.Init(PID1, PID2: Integer; Len: Single);
  +Procedure ClothSpring.Init(Index, PID1, PID2: Integer; Len: Single);
   Begin
     Self.ball1 := PID1;
     Self.ball2 := PID2;
     Self.naturalLength := Len;
     Self.springConstant := DefaultSpringConstant;
  +
  +  Particles[PID1].AddSpring(Index);
  +  Particles[PID2].AddSpring(Index);
  +End;
  +
  +{ ClothParticle }
  +Procedure ClothParticle.AddSpring(Index: Integer);
  +Begin
  +  Inc(SpringCount);
  +  SetLength(Springs, SpringCount);
  +  Springs[Pred(SpringCount)] := Index;
   End;
   
   {$IFDEF IPHONE}
  
positive.code:   For J:=0 To Pred(gridSize-1) Do
      For I:=0 To Pred(gridSize-1) Do
  		Begin
        currentSpring.Init(J*gridSize+I, (J+1)*gridSize+I+1, naturalLength*sqrt(2.0));
  			Inc(currentSpring);
  		End;
  
  
negative.code:         Force := gravity;
  
  				//Loop through springs
          //For J:=0 To Pred(numSprings) Do
          For K:=0 To Pred(Particles[I].SpringCount) Do
  				Begin
            J := Particles[I].Springs[K];
  					//If this ball is "ball1" for this spring, add the tension to the force
  					If(springs[j].ball1 = i)  Then
  					Begin
  						tensionDirection :=	VectorSubtract(Particles[springs[j].ball2].CurrentPosition, Particles[i].CurrentPosition);
  						tensionDirection.Normalize();
  
              tensionDirection.Scale(springs[j].tension);
  