INNER CODE UNIT · C#
hy
Blotch3D/Blotch3D · src/BlGeometry.cs:425
int hy = (int)(y * hmYRatio);
radius *= heightMap[hy, hx % heightMap.GetLength(1)];
}
var offsetX = (double)x / (numX-1);
var angle = offsetX * Math.PI * 2;
pos.X = (float)(Math.Sin(angle) * radius);
pos.Y = (float)(-Math.Cos(angle) * radius);
pos.Z -= .5f;
pos = Vector3.Transform(pos, matrixy);
var i = x + y * numX;
grid[i].TextureCoordinate.X = (float)offsetX;