public void Create(IslandTop surface) { this.surface = surface; float highestPoint = surface.HighestPoint; int d = (int)(surface.diameter / 2f) + 1; treePositions = Poisson.GeneratePoisson(d, d, density, iterationPointCount, (point) => { return(surface.PointMap.ContainsKey(point) ? Mathf.Abs(highestPoint - (surface.PointMap[point].Position.y * heightWeighting)) : 0f); }) .Where(p => surface.PointMap.ContainsKey(p)) .Select(p => surface.PointMap[p]) .ToList(); }