INNER CODE UNIT · C#

hx

Blotch3D/Blotch3D · src/BlGeometry.cs:424

						int hx = (int)(x * hmXRatio);
						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;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…