Exemplo n.º 1
0
 private double IDWFromBiome(Biome biome)
 {
     return(1 / Math.Pow((Math.Sqrt(Math.Pow(Math.Abs(biome.x - position.X), 2) +
                                    Math.Pow(Math.Abs(biome.y - position.Y), 2) +
                                    Math.Pow(Math.Abs(biome.z - position.Z), 2))), potency));
 }
Exemplo n.º 2
0
 private double DistanceFromBiome(Biome biome)
 {
     return(Math.Sqrt(Math.Pow(biome.x - position.X, 2) + Math.Pow(biome.y - position.Y, 2) + Math.Pow(biome.z - position.Z, 2)));
 }
Exemplo n.º 3
0
 //distancia entre biomas
 public static double Distance(Biome biome1, Biome biome2)
 {
     return(Math.Sqrt(Math.Pow(biome1.x - biome2.x, 2) + Math.Pow(biome1.y - biome2.y, 2) + Math.Pow(biome1.z - biome2.z, 2)));
 }
Exemplo n.º 4
0
 public void AddBiome(string name, Biome biome)
 {
     biomes.Add(name, biome);
     potency     = 3;
     rayDistance = 1000;
 }
Exemplo n.º 5
0
 public Biome(string biome_type)
 {
     if (biome_type == "basic")
     {
         this.temperature = Weather.Simple(25, 5);
         this.umidity     = t => (Biome.ferrel(this.temperature(t), this.temperature(t) - 7) / Biome.tetens(this.temperature(t))) * 100;
     }
 }