public void CanEstimateNormalsAsync_FromZeroToThreePoints()
        {
            var r = new Random();

            for (var n = 0; n < 4; n++)
            {
                var ps = new V3f[n].SetByIndex(_ => new V3f(r.NextDouble(), r.NextDouble(), r.NextDouble()));

                var kd = ps.BuildKdTreeAsync().Result;

                var ns = Normals.EstimateNormalsAsync(ps, 16, kd).Result;
                Assert.IsTrue(ns.Length == n);
            }
        }
        public void CanEstimateNormalsWithoutKdTreeAsync()
        {
            var ps = new[]
            {
                new V3f(0, 0, 0),
                new V3f(1, 0, 0),
                new V3f(1, 1, 0),
                new V3f(0, 1, 0),
            };

            var ns = Normals.EstimateNormalsAsync(ps, 16).Result;

            Assert.IsTrue(ns.Length == 4);
            Assert.IsTrue(ns.All(n => n == V3f.ZAxis));
        }