INNER CODE UNIT · C#

radius

Blotch3D/Blotch3D · src/BlGeometry.cs:418

					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)];
					}

					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);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…