anchor.diff:          If (X+I<GridSize) And (Y+J<GridSize) Then
           Begin
             Index := (J+Y)* gridSize + (I + X) * 2;
  -          Normal.Add(ClothGroup.GetTriangleNormal(Index));
  +          Normal.Add(_Group.GetTriangleNormal(Index));
   
             Inc(Index);
  -          Normal.Add(ClothGroup.GetTriangleNormal(Index));
  +          Normal.Add(_Group.GetTriangleNormal(Index));
           End;
   
           //Normal := VectorUp;
         Normal.Normalize();
  -      ClothGroup.Vertices.SetVector3D(BallID, vertexNormal, Normal);
  +      _Group.Vertices.SetVector3D(BallID, vertexNormal, Normal);
       End;
   
     For J:=0 To Pred(gridSize) Do
       For I:=1 To Pred(gridSize) Do
   		Begin
         BallID := J*gridSize+I;
  -      ClothGroup.Vertices.SetVector3D(BallID, vertexPosition, Particles[BallID].CurrentPosition);
  -      ClothGroup.Vertices.SetVector2D(BallID, vertexUV0, VectorCreate2D(I/GridSize, J/GridSize));
  -      ClothGroup.Vertices.SetColor(BallID, vertexColor, ColorWhite);
  +      _Group.Vertices.SetVector3D(BallID, vertexPosition, _Particles[BallID].CurrentPosition);
  +      _Group.Vertices.SetVector2D(BallID, vertexUV0, VectorCreate2D(I/GridSize, J/GridSize));
  +      _Group.Vertices.SetColor(BallID, vertexColor, ColorWhite);
       End;
   
  -  ClothGroup.ReleaseBuffer();
  -  ClothMesh.UpdateBoundingBox();
  -End;
  -
  -Procedure MyScene.SimulateCloth();
  +  _Group.ReleaseBuffer();
  +  _Mesh.UpdateBoundingBox();
  +End;
  +
  +Procedure ClothSystem.Simulate;
   Var
     currentTime, timePassed:Cardinal;
     updateMade:Boolean;
  
positive.code:     For I:=0 To Pred(gridSize) Do
  		Begin
        BallID := J*gridSize+I;
  			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
  	Particles[0].fixed := true;
  	Particles[gridSize-1].fixed :=true;
  
  	//Fix the bottom left & bottom right Particles
  	Particles[gridSize*(gridSize-1)].fixed := true;
  	Particles[gridSize*gridSize-1].fixed := true;
  
  	//Initialise the springs
  	currentSpring := 0;
  
negative.code:   For J:=0 To Pred(gridSize) Do
      For I:=0 To Pred(gridSize-2) Do
  		Begin
        _Springs[CurrentSpring].Init(J*gridSize+I, J*gridSize+I+2, naturalLength*2);
  			Inc(currentSpring);
  		End;
  
  