public HypercubeDisplay(Rectangle displayRectangle, int hypercubeCount, Random random, float layerDepth)
{
this.DisplayRectangle = displayRectangle;
this.layerDepth = layerDepth;
this.hypercubes = new List<Hypercube>();
Rectangle bounceRectangle = new Rectangle(this.DisplayRectangle.X, this.DisplayRectangle.Y, this.DisplayRectangle.Width, this.DisplayRectangle.Height);
bounceRectangle.Inflate(this.DisplayRectangle.Height, this.DisplayRectangle.Width);
for (int i = 0; i < hypercubeCount; i++)
{
float greyscale = MathHelper.Lerp(0f, 1f, (i + 1f) / (hypercubeCount + 2f));
this.hypercubes.Add(new Hypercube(
new Vector2(displayRectangle.Center.X, displayRectangle.Center.Y),
new Color(0, 0, greyscale, 1f),
this.DisplayRectangle,
bounceRectangle,
random,
this.layerDepth + 0.001f * (i + 1)));
}
}