anchor.diff:      For I:=0 To Pred(gridSize) Do
   		Begin
         BallID := J*gridSize+I;
  -			Particles1[BallID].position := VectorCreate(ClothScale * (I/Pred(gridSize)), 8.5, ClothScale * (J/ Pred(GridSize)));
  -			Particles1[BallID].velocity := VectorZero;
  -			Particles1[BallID].InverseMass := 1 / Mass;
  -			Particles1[BallID].fixed := false;
  +			Particles[BallID].CurrentPosition := VectorCreate(ClothScale * (I/Pred(gridSize)), 8.5, ClothScale * (J/ Pred(GridSize)));
  +			Particles[BallID].CurrentVelocity := VectorZero;
  +
  +			Particles[BallID].InverseMass := 1 / Mass;
  +			Particles[BallID].fixed := false;
   		End;
   
     NaturalLength := ClothScale * (1/Pred(gridSize));
   
   	//Fix the top left & top right Particles in place
  -	Particles1[0].fixed := true;
  -	Particles1[gridSize-1].fixed :=true;
  +	Particles[0].fixed := true;
  +	Particles[gridSize-1].fixed :=true;
   
   	//Fix the bottom left & bottom right Particles
  -	Particles1[gridSize*(gridSize-1)].fixed := true;
  -	Particles1[gridSize*gridSize-1].fixed := true;
  -
  -	//Copy the Particles into the other array
  -  For I:=0 To Pred(numParticles) Do
  -		Particles2[i] := Particles1[i];
  -
  -	//Set the currentParticles and nextParticles pointers
  -	currentParticles := @Particles1;
  -	nextParticles := @Particles2;
  +	Particles[gridSize*(gridSize-1)].fixed := true;
  +	Particles[gridSize*gridSize-1].fixed := true;
   
   	//Initialise the springs
  -	currentSpring := @springs[0];
  +	currentSpring := 0;
   
   	//The first (gridSize-1)*gridSize springs go from one ball to the next,
   	//excluding those on the right hand edge
     For J:=0 To Pred(gridSize) Do
       For I:=0 To Pred(gridSize-1) Do
   		Begin
  -			currentSpring.Init(J*gridSize+I, J*gridSize+I+1, naturalLength);
  +			springs[currentSpring].Init(currentSpring, J*gridSize+I, J*gridSize+I+1, naturalLength);
   			Inc(currentSpring);
   		End;
   
  
positive.code: 	  springConstant:Single;
    	naturalLength:Single;
  
      Procedure Init(PID1, PID2: Integer; Len: Single);
    End;
  
    ClothParticle = Record
  	  Position:Vector3D;
    	Velocity:Vector3D;
  
  	  InverseMass:Single;
  
  	//Is this ball held in position?
  	  Fixed:Boolean;
    End;
  
    ClothParticleArray = Array Of ClothParticle;
    PClothParticleArray = ^ClothParticleArray;
  
  Var
  //Array of springs
  
negative.code:   Floor:MeshInstance;
  
    numParticles:Integer;
    Particles:Array Of ClothParticle;
  
    lastTime:Cardinal;
    timeSinceLastUpdate:Cardinal;
  