Added formulas to Terrain.cs