diff --git a/src/Sphere.cs b/src/Sphere.cs index 1c8ebc0..b7ecc91 100644 --- a/src/Sphere.cs +++ b/src/Sphere.cs @@ -85,7 +85,7 @@ namespace Engine_silk.NET Vector2D percent = new Vector2D(x, y) / (_resolution - 1); // place vertex on correct position of the plane to easily calculate indices Vector3D vertexPosition = _localUp + (percent.X - 0.5f) * 2 * _localX + (percent.Y - 0.5f) * 2 * _localY; - vertices[i] = ConvertToPointOnSphere(vertexPosition); + vertices[i] = PointOnCubeToPointOnSphere(vertexPosition); if (x != _resolution - 1 && y != _resolution - 1) // we didn't reach the bottom right point yet { @@ -110,7 +110,7 @@ namespace Engine_silk.NET // Smooth mapping so that the points are not clumped on the former corners of the cube // http://mathproofs.blogspot.com/2005/07/mapping-cube-to-sphere.html - private Vector3D ConvertToPointOnSphere(Vector3D point) + private Vector3D PointOnCubeToPointOnSphere(Vector3D point) { float x2 = point.X * point.X; float y2 = point.Y * point.Y;