INNER CODE UNIT · C#
grid
Blotch3D/Blotch3D · src/BlGeometry.cs:411
var grid = new VertexPositionNormalTexture[numX * numY];
for (int y = 0; y < numY; y++)
{
for (int x = 0; x < numX; x++)
{
pos.Z = (float)y / (numY-1);
var radius = (1 - pos.Z) + pos.Z * topDiameter;
radius *= .5;
if(heightMap!=null)
{
int hx = (int)(x * hmXRatio);
int hy = (int)(y * hmYRatio);
radius *= heightMap[hy, hx % heightMap.GetLength(1)];
}